From 853698ea5168c938ad3b790fb1d8e613fd50c569 Mon Sep 17 00:00:00 2001 From: JackGamesFTW <28160910+JackGamesFTW@users.noreply.github.com> Date: Fri, 10 Apr 2026 20:56:29 +0100 Subject: [PATCH] fix: hairband attaching to wrong parent node --- characters/chicken.json | 16 ++++++++++++++++ pkg/merger/merger.go | 8 ++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 characters/chicken.json diff --git a/characters/chicken.json b/characters/chicken.json new file mode 100644 index 0000000..97cd1d0 --- /dev/null +++ b/characters/chicken.json @@ -0,0 +1,16 @@ +{ + "bodyCharacteristic": "Default.04", + "ears": "Default", + "eyebrows": "Thin.BrownDark", + "eyes": "Large_Eyes.BrownLight", + "face": "Face_MakeUp_HeavyEyeliner", + "gloves": "Straps_Leather.BrownDark", + "haircut": "PonytailBraidedLong.BlondSand", + "headAccessory": "Hairband.Brown", + "mouth": "Mouth_Makeup", + "overtop": "Shark_Tooth_Necklace.White", + "pants": "HighSkirt_Punk.Brown.HiddenBelt", + "shoes": "ThickSandals.Brown", + "undertop": "Top_Wasteland_Marauder.Black", + "underwear": "Boxer.Black" +} \ No newline at end of file diff --git a/pkg/merger/merger.go b/pkg/merger/merger.go index 5ecd507..3d05e4d 100644 --- a/pkg/merger/merger.go +++ b/pkg/merger/merger.go @@ -137,10 +137,14 @@ func (m *Merger) isAttachmentPoint(node *blockymodel.Node) bool { if node.IsSkeletonReference() { return true } - // Also check if it matches a bone name and has no geometry + // Also check if it matches a bone name and has no geometry. + // The matching base node must also be a non-geometry node (type "none") to avoid + // false matches against geometry nodes that happen to share the same name. if node.Shape != nil && node.Shape.Type == "none" { baseNode := findNodeByName(m.base.Nodes, node.Name) - return baseNode != nil + if baseNode != nil && baseNode.Shape != nil && baseNode.Shape.Type == "none" { + return true + } } return false }