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:
Andrej730
2023-03-03 15:33:09 +05:00
parent f0733cb148
commit 42110e7f63
@@ -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]