mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 18:16:40 +00:00
bonsai bcf - poll message for adding bim snippet
This commit is contained in:
@@ -379,12 +379,14 @@ class AddBcfBimSnippet(bpy.types.Operator):
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return all(
|
||||
(
|
||||
getattr(context.scene.BCFProperties, attr, False)
|
||||
for attr in ("bim_snippet_reference", "bim_snippet_schema", "bim_snippet_type")
|
||||
)
|
||||
props = context.scene.BCFProperties
|
||||
props_are_filled = all(
|
||||
(getattr(props, attr) for attr in ("bim_snippet_reference", "bim_snippet_schema", "bim_snippet_type"))
|
||||
)
|
||||
if not props_are_filled:
|
||||
cls.poll_message_set("Some BIM snippet fields are empty.")
|
||||
return False
|
||||
return True
|
||||
|
||||
def execute(self, context):
|
||||
bcfxml = bcfstore.BcfStore.get_bcfxml()
|
||||
|
||||
Reference in New Issue
Block a user