mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-18 19:30:25 +00:00
Fix #5410 : bim.enable_adding_presentation_style no longer throws an error in a file with no ifc project when launching the search operator (F3)
This commit is contained in:
@@ -547,6 +547,8 @@ class EnableAddingPresentationStyle(bpy.types.Operator):
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
if not tool.Ifc.get():
|
||||
return False
|
||||
style_type = tool.Style.get_active_style_type()
|
||||
if style_type != "IfcSurfaceStyle":
|
||||
cls.poll_message_set(f"Adding {style_type} is not currently supported.")
|
||||
|
||||
Reference in New Issue
Block a user