mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-20 23:36:20 +00:00
Minor fix to 46a6356 to use the collector tool
This has a few advantages: - The collection logic is centralised - The collection logic is configurable based on the collection mode - The name is not hardcoded
This commit is contained in:
@@ -99,8 +99,7 @@ def update_name(self: "BIMContainer", context: bpy.types.Context) -> None:
|
|||||||
tool.Spatial.edit_container_name(element, self.name)
|
tool.Spatial.edit_container_name(element, self.name)
|
||||||
if obj := tool.Ifc.get_object(element):
|
if obj := tool.Ifc.get_object(element):
|
||||||
tool.Root.set_object_name(obj, element)
|
tool.Root.set_object_name(obj, element)
|
||||||
if collection := tool.Blender.get_object_bim_props(obj).collection:
|
tool.Collector.assign(obj)
|
||||||
collection.name = f"{element.is_a()}/{element.Name or 'Unnamed'}"
|
|
||||||
bonsai.bim.handler.refresh_ui_data()
|
bonsai.bim.handler.refresh_ui_data()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user