mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 18:16:40 +00:00
Added IfcPropertySingleValue to EnablePsetEditing to fix bug
Noticed bug trying to edit "Data" in psets from ifc modifiers and fixed it.
Traceback:
Error: Python: Traceback (most recent call last):
File "\blenderbim\bim\module\pset\operator.py", line 94, in execute
self.load_from_pset_data(pset)
File "\blenderbim\bim\module\pset\operator.py", line 206, in load_from_pset_data
metadata.set_value(value)
UnboundLocalError: local variable 'value' referenced before assignment
This commit is contained in:
@@ -197,7 +197,7 @@ class EnablePsetEditing(bpy.types.Operator):
|
||||
setattr(new, data_type, enum)
|
||||
new.is_selected = enum in selected_enum_items
|
||||
else:
|
||||
if prop.is_a("IfcSimplePropertyTemplate"):
|
||||
if prop.is_a() in ("IfcSimplePropertyTemplate", "IfcPropertySingleValue"):
|
||||
value = prop.NominalValue.wrappedValue
|
||||
elif prop.is_a("IfcPhysicalSimpleQuantity"):
|
||||
value = prop[3]
|
||||
|
||||
Reference in New Issue
Block a user