Skip to content

Commit 5c003b0

Browse files
committed
Animation: fix animation naming with root
1 parent 3a1fda4 commit 5c003b0

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

hrt/prefab/Model.hx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,10 @@ class Model extends Object3D {
4242
throw 'Could not load model $source needed in ${shared.currentPath} \n\n ${e}';
4343
}
4444

45-
if (obj.defaultTransform != null && this.find(Object3D, (p) -> { return p != this; }) != null) {
45+
if (obj.defaultTransform != null && children.length > 0) {
4646
obj.name = "root";
4747
var root = new h3d.scene.Object();
48+
root.name = name;
4849
root.addChild(obj);
4950
obj = root;
5051
}

0 commit comments

Comments
 (0)