mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-30 08:33:10 +00:00
Removing material from IfcMaterialList removes all occurences of the material
This commit is contained in:
@@ -365,6 +365,7 @@ class RemoveListItem(bpy.types.Operator):
|
||||
obj: bpy.props.StringProperty()
|
||||
list_item_set: bpy.props.IntProperty()
|
||||
list_item: bpy.props.IntProperty()
|
||||
list_item_index: bpy.props.IntProperty()
|
||||
|
||||
def execute(self, context):
|
||||
return IfcStore.execute_ifc_operator(self, context)
|
||||
@@ -377,7 +378,7 @@ class RemoveListItem(bpy.types.Operator):
|
||||
self.file,
|
||||
**{
|
||||
"material_list": self.file.by_id(self.list_item_set),
|
||||
"material": self.file.by_id(self.list_item),
|
||||
"material_index": self.list_item_index,
|
||||
},
|
||||
)
|
||||
Data.load_lists()
|
||||
|
||||
@@ -258,6 +258,8 @@ class BIM_PT_object_material(Panel):
|
||||
if self.product_data["type"] == "IfcMaterialList":
|
||||
setattr(op, "list_item_set", self.material_set_id)
|
||||
setattr(op, self.set_item_name, item["id"])
|
||||
if hasattr(op, f"{self.set_item_name}_index"):
|
||||
setattr(op, f"{self.set_item_name}_index", index)
|
||||
|
||||
def draw_read_only_set_ui(self):
|
||||
if (
|
||||
|
||||
Reference in New Issue
Block a user