Assigning an ifc class to an object now displays a message if the object is not in OBJECT mode

This commit is contained in:
Gorgious56
2024-02-09 17:26:48 +01:00
parent e2ef636209
commit 1f10b2415e
@@ -158,6 +158,9 @@ class AssignClass(bpy.types.Operator, Operator):
ifc_context = tool.Ifc.get().by_id(ifc_context)
active_object = context.active_object
for obj in objects:
if obj.mode != "OBJECT":
self.report({"ERROR"}, "Object must be in OBJECT mode to assign class")
continue
core.assign_class(
tool.Ifc,
tool.Collector,