Skip to content

Commit 96836de

Browse files
committed
Prevents attachement nodes to have the NumBone parameter set
1 parent 9c0b977 commit 96836de

File tree

1 file changed

+7
-5
lines changed
  • jme3-core/src/main/java/com/jme3/animation

1 file changed

+7
-5
lines changed

jme3-core/src/main/java/com/jme3/animation/Bone.java

+7-5
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@
3232
package com.jme3.animation;
3333

3434
import com.jme3.export.*;
35+
import com.jme3.material.MatParamOverride;
3536
import com.jme3.math.*;
36-
import com.jme3.scene.Geometry;
37-
import com.jme3.scene.Mesh;
38-
import com.jme3.scene.Node;
39-
import com.jme3.scene.Spatial;
37+
import com.jme3.scene.*;
38+
import com.jme3.shader.VarType;
4039
import com.jme3.util.SafeArrayList;
4140
import com.jme3.util.TempVars;
42-
import com.jme3.util.clone.JmeCloneable;
4341
import com.jme3.util.clone.Cloner;
42+
import com.jme3.util.clone.JmeCloneable;
43+
4444
import java.io.IOException;
4545
import java.util.ArrayList;
4646

@@ -723,6 +723,8 @@ Node getAttachmentsNode(int boneIndex, SafeArrayList<Geometry> targets) {
723723
if (attachNode == null) {
724724
attachNode = new Node(name + "_attachnode");
725725
attachNode.setUserData("AttachedBone", this);
726+
//We don't want the node to have a numBone set by a parent node so we force it to null
727+
attachNode.addMatParamOverride(new MatParamOverride(VarType.Int, "NumberOfBones", null));
726728
}
727729

728730
return attachNode;

0 commit comments

Comments
 (0)