mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-18 14:31:39 +00:00
poll message that non-IfcSurfaceStyles are not currently supported
https://i.imgur.com/EBbMUaI.png
This commit is contained in:
@@ -540,6 +540,14 @@ class EnableAddingPresentationStyle(bpy.types.Operator, tool.Ifc.Operator):
|
|||||||
bl_label = "Enable Add Presentation Style"
|
bl_label = "Enable Add Presentation Style"
|
||||||
bl_options = {"REGISTER", "UNDO"}
|
bl_options = {"REGISTER", "UNDO"}
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def poll(cls, context):
|
||||||
|
style_type = bpy.context.scene.BIMStylesProperties.style_type
|
||||||
|
if style_type != "IfcSurfaceStyle":
|
||||||
|
cls.poll_message_set(f"Adding {style_type} is not currently supported.")
|
||||||
|
return False
|
||||||
|
return True
|
||||||
|
|
||||||
def _execute(self, context):
|
def _execute(self, context):
|
||||||
props = bpy.context.scene.BIMStylesProperties
|
props = bpy.context.scene.BIMStylesProperties
|
||||||
props.is_adding = True
|
props.is_adding = True
|
||||||
|
|||||||
Reference in New Issue
Block a user