Skip to content

Commit

Permalink
added 'product' parameter to a few usages of 'pset.remove_pset' after e…
Browse files Browse the repository at this point in the history
  • Loading branch information
brunoperdigao committed May 13, 2024
1 parent a9cba30 commit 1dff2f7
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/blenderbim/blenderbim/bim/module/aggregate/operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def _execute(self, context):
pset = ifcopenshell.util.element.get_pset(element, 'BBIM_Linked_Aggregate')
if pset:
pset = tool.Ifc.get().by_id(pset["id"])
ifcopenshell.api.run("pset.remove_pset", tool.Ifc.get(), pset=pset)
ifcopenshell.api.run("pset.remove_pset", tool.Ifc.get(), product=element, pset=pset)


class BIM_OT_enable_editing_aggregate(bpy.types.Operator, Operator):
Expand Down
2 changes: 1 addition & 1 deletion src/blenderbim/blenderbim/bim/module/geometry/operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,7 @@ def remove_linked_aggregate_data(old_to_new):
pset = ifcopenshell.util.element.get_pset(new[0], "BBIM_Linked_Aggregate")
if pset:
pset = tool.Ifc.get().by_id(pset["id"])
ifcopenshell.api.run("pset.remove_pset", tool.Ifc.get(), pset=pset)
ifcopenshell.api.run("pset.remove_pset", tool.Ifc.get(), product=new[0],pset=pset)

if new[0].is_a("IfcElementAssembly"):
linked_aggregate_group = [
Expand Down
2 changes: 1 addition & 1 deletion src/blenderbim/blenderbim/bim/module/model/door.py
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,6 @@ def _execute(self, context):
obj.BIMDoorProperties.is_editing = False

pset = tool.Pset.get_element_pset(element, "BBIM_Door")
ifcopenshell.api.run("pset.remove_pset", tool.Ifc.get(), pset=pset)
ifcopenshell.api.run("pset.remove_pset", tool.Ifc.get(), product=element, pset=pset)

return {"FINISHED"}
2 changes: 1 addition & 1 deletion src/blenderbim/blenderbim/bim/module/model/railing.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,5 +535,5 @@ def _execute(self, context):
obj.BIMRailingProperties.is_editing = False

pset = tool.Pset.get_element_pset(element, "BBIM_Railing")
ifcopenshell.api.run("pset.remove_pset", tool.Ifc.get(), pset=pset)
ifcopenshell.api.run("pset.remove_pset", tool.Ifc.get(), product=element, pset=pset)
return {"FINISHED"}
2 changes: 1 addition & 1 deletion src/blenderbim/blenderbim/bim/module/model/roof.py
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,7 @@ def _execute(self, context):
obj.BIMRoofProperties.is_editing = False

pset = tool.Pset.get_element_pset(element, "BBIM_Roof")
ifcopenshell.api.run("pset.remove_pset", tool.Ifc.get(), pset=pset)
ifcopenshell.api.run("pset.remove_pset", tool.Ifc.get(), product=element, pset=pset)
return {"FINISHED"}


Expand Down
2 changes: 1 addition & 1 deletion src/blenderbim/blenderbim/bim/module/model/stair.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,6 @@ def _execute(self, context):
obj.BIMStairProperties.is_editing = False

pset = tool.Pset.get_element_pset(element, "BBIM_Stair")
ifcopenshell.api.run("pset.remove_pset", tool.Ifc.get(), pset=pset)
ifcopenshell.api.run("pset.remove_pset", tool.Ifc.get(), product=element, pset=pset)

return {"FINISHED"}
2 changes: 1 addition & 1 deletion src/blenderbim/blenderbim/bim/module/model/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,6 @@ def _execute(self, context):
obj.BIMWindowProperties.is_editing = False

pset = tool.Pset.get_element_pset(element, "BBIM_Window")
ifcopenshell.api.run("pset.remove_pset", tool.Ifc.get(), pset=pset)
ifcopenshell.api.run("pset.remove_pset", tool.Ifc.get(), product=element, pset=pset)

return {"FINISHED"}
2 changes: 1 addition & 1 deletion src/blenderbim/blenderbim/tool/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ def unmark_manual_booleans(cls, element, boolean_ids):
data = tool.Ifc.get().createIfcText(json.dumps(data))
ifcopenshell.api.run("pset.edit_pset", tool.Ifc.get(), pset=pset, properties={"Data": data})
else:
ifcopenshell.api.run("pset.remove_pset", tool.Ifc.get(), pset=pset)
ifcopenshell.api.run("pset.remove_pset", tool.Ifc.get(), product=element, pset=pset)

@classmethod
def get_flow_segment_axis(cls, obj):
Expand Down

0 comments on commit 1dff2f7

Please sign in to comment.