Skip to content

Commit

Permalink
Prevents attachement nodes to have the NumBone parameter set
Browse files Browse the repository at this point in the history
  • Loading branch information
Nehon committed Nov 28, 2017
1 parent 9c0b977 commit 96836de
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions jme3-core/src/main/java/com/jme3/animation/Bone.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -723,6 +723,8 @@ Node getAttachmentsNode(int boneIndex, SafeArrayList<Geometry> 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;
Expand Down

0 comments on commit 96836de

Please sign in to comment.