From 278a35e729d2bc06e6d24cc5874456703d73d812 Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Wed, 25 Feb 2026 09:16:18 +1100 Subject: [PATCH] Revert "Fix segment object parenting and add Claude Code to .gitignore" This reverts commit e1bf717af517ff1b0cabf985c6ed439a9de29063. --- .gitignore | 5 ----- src/bonsai/bonsai/tool/alignment.py | 12 +----------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/.gitignore b/.gitignore index c52c58a42f..8a7482ab8e 100644 --- a/.gitignore +++ b/.gitignore @@ -115,8 +115,3 @@ dev_environment.bat src/ifcopenshell-python/ifcopenshell/express/*.exp src/ifcopenshell-python/ifcopenshell/express/*.exp.cache.dat - -# Claude Code -.claude/ -.mcp.json -CLAUDE.md diff --git a/src/bonsai/bonsai/tool/alignment.py b/src/bonsai/bonsai/tool/alignment.py index 6cbbf7fac4..711ce528eb 100644 --- a/src/bonsai/bonsai/tool/alignment.py +++ b/src/bonsai/bonsai/tool/alignment.py @@ -571,7 +571,6 @@ class Alignment: mapped_segments = ifcopenshell.api.alignment.get_mapped_segments(segment) tool.Loader.load_settings() - obj = None for curve_segment in mapped_segments: if curve_segment is not None: geometry = tool.Loader.create_generic_shape(curve_segment) @@ -579,16 +578,7 @@ class Alignment: mesh = ifc_importer.create_mesh(curve_segment, geometry) obj = bpy.data.objects.new(tool.Loader.get_name(curve_segment), mesh) tool.Ifc.link(curve_segment, obj) - - # Parent to layout object for proper hierarchy - if parent_obj: - obj.parent = parent_obj - - # Assign to same collection as parent (avoid "Unsorted") - if parent_obj and parent_obj.users_collection: - parent_obj.users_collection[0].objects.link(obj) - else: - tool.Collector.assign(obj) + tool.Collector.assign(obj) return obj @classmethod