Browse Source

Skeletal Animation: remove deprecated SkeletonControl ctor
- it is not useful, because targets / materials are gathered on every update() call

shadowislord 10 years ago
parent
commit
5760a48eea

+ 2 - 3
jme3-core/src/main/java/com/jme3/animation/AnimControl.java

@@ -372,9 +372,8 @@ public final class AnimControl extends AbstractControl implements Cloneable {
             // When backward compatibility won't be needed anymore this can deleted        
             Savable[] sav = in.readSavableArray("targets", null);
             if (sav != null) {
-                Mesh[] targets = new Mesh[sav.length];
-                System.arraycopy(sav, 0, targets, 0, sav.length);
-                skeletonControl = new SkeletonControl(targets, skeleton);
+                // NOTE: allow the targets to be gathered automatically
+                skeletonControl = new SkeletonControl(skeleton);
                 spatial.addControl(skeletonControl);
             }
         }

+ 0 - 13
jme3-core/src/main/java/com/jme3/animation/SkeletonControl.java

@@ -205,19 +205,6 @@ public class SkeletonControl extends AbstractControl implements Cloneable {
         this.skeleton = skeleton;
     }
 
-    /**
-     * Creates a skeleton control.
-     *
-     * @param targets the meshes controlled by the skeleton
-     * @param skeleton the skeleton
-     */
-    @Deprecated
-    SkeletonControl(Mesh[] targets, Skeleton skeleton) {
-        this.skeleton = skeleton;
-        this.targets = new SafeArrayList<Mesh>(Mesh.class, Arrays.asList(targets));
-    }
-
-
     private void findTargets(Node node) {
         Mesh sharedMesh = null;