mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-16 21:42:19 +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
|
@classmethod
|
||||||
def poll(cls, context):
|
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()
|
props = tool.Material.get_material_props()
|
||||||
active_style = tool.Blender.get_enum_safe(props, "styles")
|
active_style = tool.Blender.get_enum_safe(props, "styles")
|
||||||
if not active_style:
|
if not active_style:
|
||||||
|
|||||||
Reference in New Issue
Block a user