mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-22 19:52:36 +00:00
bim.show_loads - handle absence of structural items
This commit is contained in:
@@ -52,7 +52,11 @@ class ShowLoads(bpy.types.Operator):
|
|||||||
return {"PASS_THROUGH"}
|
return {"PASS_THROUGH"}
|
||||||
|
|
||||||
def invoke(self, context, event):
|
def invoke(self, context, event):
|
||||||
collection = bpy.data.collections["IfcStructuralItem"]
|
collection = bpy.data.collections.get("IfcStructuralItem")
|
||||||
|
if collection is None:
|
||||||
|
self.report({"ERROR"}, "No IfcStructuralItems found.")
|
||||||
|
return {"CANCELLED"}
|
||||||
|
|
||||||
collection.hide_viewport = False
|
collection.hide_viewport = False
|
||||||
context.window.cursor_modal_set("WAIT")
|
context.window.cursor_modal_set("WAIT")
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user