mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-10-02 13:04:49 +00:00
Keep active object as active when creating ifc file
This commit is contained in:
@@ -43,6 +43,7 @@ class CreateProject(bpy.types.Operator):
|
|||||||
return result
|
return result
|
||||||
|
|
||||||
def _execute(self, context):
|
def _execute(self, context):
|
||||||
|
active_object = context.view_layer.objects.active
|
||||||
self.file = IfcStore.get_file()
|
self.file = IfcStore.get_file()
|
||||||
if self.file:
|
if self.file:
|
||||||
return {"FINISHED"}
|
return {"FINISHED"}
|
||||||
@@ -79,6 +80,7 @@ class CreateProject(bpy.types.Operator):
|
|||||||
bpy.ops.bim.assign_object(related_object=building.name, relating_object=site.name)
|
bpy.ops.bim.assign_object(related_object=building.name, relating_object=site.name)
|
||||||
bpy.ops.bim.assign_object(related_object=building_storey.name, relating_object=building.name)
|
bpy.ops.bim.assign_object(related_object=building_storey.name, relating_object=building.name)
|
||||||
|
|
||||||
|
context.view_layer.objects.active = active_object
|
||||||
return {"FINISHED"}
|
return {"FINISHED"}
|
||||||
|
|
||||||
def get_name(self, ifc_class, name):
|
def get_name(self, ifc_class, name):
|
||||||
|
|||||||
Reference in New Issue
Block a user