Fix creating arbitrary profile without object after e74adcb

Error: Python: Traceback (most recent call last):
  File "\bonsai\bim\ifc.py", line 443, in execute_ifc_operator
    result = getattr(operator, "_execute")(context)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "\bonsai\bim\module\profile\operator.py", line 172, in _execute
    if not indices:
           ^^^^^^^
UnboundLocalError: cannot access local variable 'indices' where it is not associated with a value
This commit is contained in:
Andrej730
2024-11-25 16:52:54 +05:00
parent 29f9f04d92
commit 4d44ec7174
@@ -156,6 +156,7 @@ class AddProfileDef(bpy.types.Operator, tool.Ifc.Operator):
profile_class = props.profile_classes
if profile_class == "IfcArbitraryClosedProfileDef":
obj = props.object_to_profile
indices = []
if obj:
if len(obj.data.polygons) == 0:
self.report(