mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-21 09:15:21 +00:00
Auto-add the currently loaded IFC when creating a drawing for the first time
This commit is contained in:
@@ -2419,6 +2419,9 @@ class CutSection(bpy.types.Operator):
|
|||||||
camera = bpy.context.scene.camera
|
camera = bpy.context.scene.camera
|
||||||
if not (camera.type == "CAMERA" and camera.data.type == "ORTHO"):
|
if not (camera.type == "CAMERA" and camera.data.type == "ORTHO"):
|
||||||
return {"FINISHED"}
|
return {"FINISHED"}
|
||||||
|
if not bpy.context.scene.DocProperties.ifc_files and bpy.context.scene.BIMProperties.ifc_file:
|
||||||
|
new = bpy.context.scene.DocProperties.ifc_files.add()
|
||||||
|
new.name = bpy.context.scene.BIMProperties.ifc_file
|
||||||
bpy.ops.bim.activate_view(
|
bpy.ops.bim.activate_view(
|
||||||
drawing_index=bpy.context.scene.DocProperties.drawings.find(camera.name.split("/")[1])
|
drawing_index=bpy.context.scene.DocProperties.drawings.find(camera.name.split("/")[1])
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user