mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
Fix poll error after 3de9915
The error was
Traceback (most recent call last):
File "\blenderbim\bim\module\model\covering.py", line 64, in poll
return element.is_a("IfcCovering")
AttributeError: 'NoneType' object has no attribute 'is_a'
This commit is contained in:
@@ -61,7 +61,7 @@ class RegenSelectedFlooringObject(bpy.types.Operator, tool.Ifc.Operator):
|
||||
def poll(cls, context):
|
||||
active_obj = bpy.context.active_object
|
||||
element = tool.Ifc.get_entity(active_obj)
|
||||
return element.is_a("IfcCovering")
|
||||
return element and element.is_a("IfcCovering")
|
||||
|
||||
def _execute(self, context):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user