io_import_dxf: Fix switch scene #104552

Merged
Brecht Van Lommel merged 3 commits from :oxicid-dxf into main 2023-04-17 20:39:21 +02:00
Showing only changes of commit 1077db3a63 - Show all commits

View File

@ -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: