mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-23 15:06:25 +00:00
The IfcOpenShell API now supports automatic primitive casting for editing properties. See #1943.
This commit is contained in:
@@ -148,7 +148,6 @@ class EnablePsetEditing(bpy.types.Operator):
|
||||
new.is_null = data.get(prop_template.Name, None) is None
|
||||
new.is_optional = True
|
||||
new.data_type = data_type
|
||||
new.enum_data_type = prop_template.PrimaryMeasureType
|
||||
|
||||
if data_type == "string":
|
||||
new.string_value = "" if new.is_null else data[prop_template.Name]
|
||||
@@ -161,7 +160,7 @@ class EnablePsetEditing(bpy.types.Operator):
|
||||
elif data_type == "enum":
|
||||
new.enum_items = json.dumps(enum_items)
|
||||
if data.get(prop_template.Name):
|
||||
new.enum_value = data[prop_template.Name]
|
||||
new.enum_value = str(data[prop_template.Name])
|
||||
|
||||
def load_from_pset_data(self, pset_data):
|
||||
for prop_id in pset_data["Properties"]:
|
||||
|
||||
Reference in New Issue
Block a user