See #1917. Refactor and fix warning message when you haven't got any contexts in a project yet.

This commit is contained in:
Dion Moult
2021-12-10 13:31:23 +11:00
parent 62236c44ae
commit de4659570a
10 changed files with 87 additions and 35 deletions
@@ -91,8 +91,8 @@ class CreateProject(bpy.types.Operator):
tool.Ifc, context_type="Plan", context_identifier="Annotation", target_view="PLAN_VIEW", parent=plan
)
ContextData.load(tool.Ifc.get())
context.scene.BIMProperties.contexts = str(body_context.id())
blenderbim.bim.handler.refresh_ui_data()
context.scene.BIMRootProperties.contexts = str(body_context.id())
bpy.ops.bim.assign_class(obj=site.name, ifc_class="IfcSite")
bpy.ops.bim.assign_class(obj=building.name, ifc_class="IfcBuilding")