From c9a9748ec053fe69641555df75ade9cc3136fa79 Mon Sep 17 00:00:00 2001 From: Oxicid Date: Mon, 17 Apr 2023 19:53:53 +0200 Subject: [PATCH 1/3] Fix switch scene --- io_import_dxf/dxfimport/do.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/io_import_dxf/dxfimport/do.py b/io_import_dxf/dxfimport/do.py index 346c26c54..a6b7bc08b 100644 --- a/io_import_dxf/dxfimport/do.py +++ b/io_import_dxf/dxfimport/do.py @@ -1379,7 +1379,7 @@ class Do: return o def _recenter(self, scene, name): - bpy.context.screen.scene = scene + bpy.context.window.scene = scene bpy.context.view_layer.update() bpy.ops.object.select_all(action='DESELECT') -- 2.30.2 From 904d284a2835b04a5e6453a52190576fa7de3671 Mon Sep 17 00:00:00 2001 From: Oxicid Date: Mon, 17 Apr 2023 20:03:25 +0200 Subject: [PATCH 2/3] Update 'io_import_dxf/__init__.py' --- io_import_dxf/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/io_import_dxf/__init__.py b/io_import_dxf/__init__.py index ecda11e42..131655024 100644 --- a/io_import_dxf/__init__.py +++ b/io_import_dxf/__init__.py @@ -16,7 +16,7 @@ except: bl_info = { "name": "Import AutoCAD DXF Format (.dxf)", "author": "Lukas Treyer, Manfred Moitzi (support + dxfgrabber library), Vladimir Elistratov, Bastien Montagne, Remigiusz Fiedler (AKA migius)", - "version": (0, 9, 6), + "version": (0, 9, 7), "blender": (2, 80, 0), "location": "File > Import > AutoCAD DXF", "description": "Import files in the Autocad DXF format (.dxf)", -- 2.30.2 From 1077db3a63dfc476df46cfc16184bc105163e613 Mon Sep 17 00:00:00 2001 From: Oxicid Date: Mon, 17 Apr 2023 20:16:27 +0200 Subject: [PATCH 3/3] Replace all bpy.context.screen.scene --- io_import_dxf/dxfimport/do.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/io_import_dxf/dxfimport/do.py b/io_import_dxf/dxfimport/do.py index a6b7bc08b..79e2b9c27 100644 --- a/io_import_dxf/dxfimport/do.py +++ b/io_import_dxf/dxfimport/do.py @@ -949,7 +949,7 @@ class Do: # create the block if len(block_group.objects) == 0 or name not in self.known_blocks.keys(): - bpy.context.screen.scene = block_scene + bpy.context.window.scene = block_scene block_inserts = [en for en in entity if is_.insert(en.dxftype)] bc = (en for en in entity if is_.combined_entity(en)) bs = (en for en in entity if is_.separated_entity(en) and not is_.insert(en.dxftype)) @@ -985,7 +985,7 @@ class Do: else: bbox = self.known_blocks[name][2] - bpy.context.screen.scene = scene + bpy.context.window.scene = scene o = bbox.copy() # o.empty_display_size = 0.3 o.instance_type = "COLLECTION" @@ -1621,7 +1621,7 @@ class Do: elif self.pScene is not None: # assume Proj scene['SRID'] = re.findall(r"\+init=(.+)\s", self.pScene.srs)[0] - #bpy.context.screen.scene = scene + #bpy.context.window.scene = scene return self.errors # trying to import dimensions: -- 2.30.2