bim.add_bsdd_properties - add poll check

This commit is contained in:
Andrej730
2025-08-05 10:57:29 +05:00
parent 9d83eec674
commit eb7550b63e
@@ -85,6 +85,14 @@ class AddBSDDProperties(bpy.types.Operator, tool.Ifc.Operator):
obj: bpy.props.StringProperty()
obj_type: bpy.props.StringProperty()
@classmethod
def poll(cls, context):
props = tool.Bsdd.get_bsdd_props()
if not props.selected_properties:
cls.poll_message_set("No properties selected to add.")
return False
return True
def _execute(self, context):
self.file = tool.Ifc.get()
bprops = tool.Bsdd.get_bsdd_props()