mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-30 03:59:55 +00:00
Fix bug related to Linked Aggregates
This commit is contained in:
@@ -304,7 +304,7 @@ class BIM_OT_break_link_to_other_aggregates(bpy.types.Operator, tool.Ifc.Operato
|
|||||||
for part in parts:
|
for part in parts:
|
||||||
pset = ifcopenshell.util.element.get_pset(part, "BBIM_Linked_Aggregate")
|
pset = ifcopenshell.util.element.get_pset(part, "BBIM_Linked_Aggregate")
|
||||||
pset = tool.Ifc.get().by_id(pset["id"])
|
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=part, pset=pset)
|
||||||
|
|
||||||
linked_aggregate_group = [
|
linked_aggregate_group = [
|
||||||
r.RelatingGroup
|
r.RelatingGroup
|
||||||
|
|||||||
@@ -1000,7 +1000,8 @@ class OverrideDuplicateMove(bpy.types.Operator):
|
|||||||
if r.is_a("IfcRelAssignsToGroup")
|
if r.is_a("IfcRelAssignsToGroup")
|
||||||
if "BBIM_Linked_Aggregate" in r.RelatingGroup.Name
|
if "BBIM_Linked_Aggregate" in r.RelatingGroup.Name
|
||||||
]
|
]
|
||||||
tool.Ifc.run("group.unassign_group", group=linked_aggregate_group[0], products=[new[0]])
|
if linked_aggregate_group:
|
||||||
|
tool.Ifc.run("group.unassign_group", group=linked_aggregate_group[0], products=[new[0]])
|
||||||
|
|
||||||
|
|
||||||
class OverrideDuplicateMoveLinkedMacro(bpy.types.Macro):
|
class OverrideDuplicateMoveLinkedMacro(bpy.types.Macro):
|
||||||
@@ -1282,8 +1283,9 @@ class RefreshLinkedAggregate(bpy.types.Operator):
|
|||||||
pset = ifcopenshell.util.element.get_pset(part, self.pset_name)
|
pset = ifcopenshell.util.element.get_pset(part, self.pset_name)
|
||||||
except:
|
except:
|
||||||
continue
|
continue
|
||||||
index = pset["Index"]
|
if pset:
|
||||||
original_names[group][index] = tool.Ifc.get_object(part).name
|
index = pset["Index"]
|
||||||
|
original_names[group][index] = tool.Ifc.get_object(part).name
|
||||||
|
|
||||||
return original_names
|
return original_names
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user