We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7ee2581 commit 4925630Copy full SHA for 4925630
io_mesh_3mf/import_3mf.py
@@ -149,8 +149,12 @@ def execute(self, context):
149
if area.type == 'VIEW_3D':
150
for region in area.regions:
151
if region.type == 'WINDOW':
152
- override = {'area': area, 'region': region, 'edit_object': bpy.context.edit_object}
153
- bpy.ops.view3d.view_selected(override)
+ context = bpy.context.copy()
+ context['area'] = area
154
+ context['region'] = region
155
+ context['edit_object'] = bpy.context.edit_object
156
+ with bpy.context.temp_override(**context):
157
+ bpy.ops.view3d.view_selected()
158
159
log.info(f"Imported {self.num_loaded} objects from 3MF files.")
160
0 commit comments