From 96836de6e8dba64415f33c29d408e6d22639cc3a Mon Sep 17 00:00:00 2001 From: Nehon Date: Tue, 28 Nov 2017 08:47:32 +0100 Subject: [PATCH] Prevents attachement nodes to have the NumBone parameter set --- jme3-core/src/main/java/com/jme3/animation/Bone.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/jme3-core/src/main/java/com/jme3/animation/Bone.java b/jme3-core/src/main/java/com/jme3/animation/Bone.java index 15ac6cc6fb..5b4568cd9a 100644 --- a/jme3-core/src/main/java/com/jme3/animation/Bone.java +++ b/jme3-core/src/main/java/com/jme3/animation/Bone.java @@ -32,15 +32,15 @@ package com.jme3.animation; import com.jme3.export.*; +import com.jme3.material.MatParamOverride; import com.jme3.math.*; -import com.jme3.scene.Geometry; -import com.jme3.scene.Mesh; -import com.jme3.scene.Node; -import com.jme3.scene.Spatial; +import com.jme3.scene.*; +import com.jme3.shader.VarType; import com.jme3.util.SafeArrayList; import com.jme3.util.TempVars; -import com.jme3.util.clone.JmeCloneable; import com.jme3.util.clone.Cloner; +import com.jme3.util.clone.JmeCloneable; + import java.io.IOException; import java.util.ArrayList; @@ -723,6 +723,8 @@ Node getAttachmentsNode(int boneIndex, SafeArrayList targets) { if (attachNode == null) { attachNode = new Node(name + "_attachnode"); attachNode.setUserData("AttachedBone", this); + //We don't want the node to have a numBone set by a parent node so we force it to null + attachNode.addMatParamOverride(new MatParamOverride(VarType.Int, "NumberOfBones", null)); } return attachNode;