mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 18:16:40 +00:00
bim.add_bsdd_properties - add poll check
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user