mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-28 11:18:18 +00:00
WIP psets now use partial editing with new features! See full message. See #1222.
* Psets are now sensitive to data type * Psets now support null vs empty * Psets now respect shared STEP IDs
This commit is contained in:
@@ -12,7 +12,6 @@ class Data:
|
||||
return
|
||||
product = file.by_id(product_id)
|
||||
cls.products[product_id] = []
|
||||
attributes = product.get_info()
|
||||
declaration = IfcStore.get_schema().declaration_by_name(product.is_a())
|
||||
for attribute in declaration.all_attributes():
|
||||
data_type = str(attribute.type_of_attribute())
|
||||
|
||||
@@ -76,11 +76,10 @@ class EditAttributes(bpy.types.Operator):
|
||||
attributes[attribute["name"]] = blender_attribute.float_value
|
||||
elif attribute["type"] == "enum":
|
||||
attributes[attribute["name"]] = blender_attribute.enum_value
|
||||
usecase = edit_attributes.Usecase(self.file, {
|
||||
edit_attributes.Usecase(self.file, {
|
||||
"product": self.file.by_id(props.ifc_definition_id),
|
||||
"attributes": attributes
|
||||
})
|
||||
usecase.execute()
|
||||
}).execute()
|
||||
Data.load(props.ifc_definition_id)
|
||||
bpy.ops.bim.disable_editing_attributes()
|
||||
return {"FINISHED"}
|
||||
|
||||
@@ -20,9 +20,6 @@ class BIM_PT_attributes(Panel):
|
||||
if props.ifc_definition_id not in Data.products:
|
||||
Data.load(props.ifc_definition_id)
|
||||
|
||||
props = context.active_object.BIMObjectProperties
|
||||
|
||||
|
||||
if props.is_editing_attributes:
|
||||
row = self.layout.row(align=True)
|
||||
row.operator("bim.edit_attributes", icon="CHECKMARK", text="Save Attributes")
|
||||
|
||||
Reference in New Issue
Block a user