Removing unnecessary operations from ArmatureModifier.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8248 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
a9f87c4df7
commit
393c67c9b7
@ -20,7 +20,6 @@ import com.jme3.math.Matrix4f;
|
|||||||
import com.jme3.scene.Geometry;
|
import com.jme3.scene.Geometry;
|
||||||
import com.jme3.scene.Mesh;
|
import com.jme3.scene.Mesh;
|
||||||
import com.jme3.scene.Node;
|
import com.jme3.scene.Node;
|
||||||
import com.jme3.scene.Spatial;
|
|
||||||
import com.jme3.scene.VertexBuffer;
|
import com.jme3.scene.VertexBuffer;
|
||||||
import com.jme3.scene.VertexBuffer.Format;
|
import com.jme3.scene.VertexBuffer.Format;
|
||||||
import com.jme3.scene.VertexBuffer.Type;
|
import com.jme3.scene.VertexBuffer.Type;
|
||||||
@ -174,21 +173,8 @@ import com.jme3.util.BufferUtils;
|
|||||||
anims.put(boneAnimation.getName(), boneAnimation);
|
anims.put(boneAnimation.getName(), boneAnimation);
|
||||||
}
|
}
|
||||||
|
|
||||||
// getting meshes
|
|
||||||
Mesh[] meshes = null;
|
|
||||||
List<Mesh> meshesList = new ArrayList<Mesh>();
|
|
||||||
List<Spatial> children = node.getChildren();
|
|
||||||
for (Spatial child : children) {
|
|
||||||
if (child instanceof Geometry) {
|
|
||||||
meshesList.add(((Geometry) child).getMesh());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (meshesList.size() > 0) {
|
|
||||||
meshes = meshesList.toArray(new Mesh[meshesList.size()]);
|
|
||||||
}
|
|
||||||
|
|
||||||
// applying the control to the node
|
// applying the control to the node
|
||||||
SkeletonControl skeletonControl = new SkeletonControl(meshes, animData.skeleton);
|
SkeletonControl skeletonControl = new SkeletonControl(animData.skeleton);
|
||||||
AnimControl control = new AnimControl(animData.skeleton);
|
AnimControl control = new AnimControl(animData.skeleton);
|
||||||
|
|
||||||
control.setAnimations(anims);
|
control.setAnimations(anims);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user