mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +00:00
Fix console errors when project is not loaded
This commit is contained in:
@@ -882,6 +882,9 @@ class EditMaterialStyle(bpy.types.Operator, tool.Ifc.Operator):
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
if not tool.Ifc.get():
|
||||
cls.poll_message_set("No IFC project loaded")
|
||||
return False
|
||||
props = tool.Material.get_material_props()
|
||||
active_style = tool.Blender.get_enum_safe(props, "styles")
|
||||
if not active_style:
|
||||
|
||||
Reference in New Issue
Block a user