mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-16 13:46:54 +00:00
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:
@@ -156,6 +156,7 @@ class AddProfileDef(bpy.types.Operator, tool.Ifc.Operator):
|
|||||||
profile_class = props.profile_classes
|
profile_class = props.profile_classes
|
||||||
if profile_class == "IfcArbitraryClosedProfileDef":
|
if profile_class == "IfcArbitraryClosedProfileDef":
|
||||||
obj = props.object_to_profile
|
obj = props.object_to_profile
|
||||||
|
indices = []
|
||||||
if obj:
|
if obj:
|
||||||
if len(obj.data.polygons) == 0:
|
if len(obj.data.polygons) == 0:
|
||||||
self.report(
|
self.report(
|
||||||
|
|||||||
Reference in New Issue
Block a user