Browse Source

move Savable to ArmatureMask
clean up unused imports

rickard 1 year ago
parent
commit
678bd44166

+ 3 - 1
jme3-core/src/main/java/com/jme3/anim/AnimLayer.java

@@ -313,7 +313,9 @@ public class AnimLayer implements JmeCloneable, Savable {
     public void write(JmeExporter ex) throws IOException {
         OutputCapsule oc = ex.getCapsule(this);
         oc.write(name, "name", null);
-        oc.write(mask, "mask", null);
+        if(mask instanceof ArmatureMask) {
+            oc.write((ArmatureMask) mask, "mask", null);
+        }
     }
 
     @Override

+ 1 - 3
jme3-core/src/main/java/com/jme3/anim/AnimationMask.java

@@ -31,14 +31,12 @@
  */
 package com.jme3.anim;
 
-import com.jme3.export.Savable;
-
 /**
  * Created by Nehon
  * An AnimationMask is defining a subset of elements on which an animation will be applied.
  * Most used implementation is the ArmatureMask that defines a subset of joints in an Armature.
  */
-public interface AnimationMask extends Savable {
+public interface AnimationMask {
 
     /**
      * Test whether the animation should be applied to the specified element.

+ 2 - 1
jme3-core/src/main/java/com/jme3/anim/ArmatureMask.java

@@ -35,13 +35,14 @@ import com.jme3.export.InputCapsule;
 import com.jme3.export.JmeExporter;
 import com.jme3.export.JmeImporter;
 import com.jme3.export.OutputCapsule;
+import com.jme3.export.Savable;
 import java.io.IOException;
 import java.util.BitSet;
 
 /**
  * An AnimationMask to select joints from a single Armature.
  */
-public class ArmatureMask implements AnimationMask {
+public class ArmatureMask implements AnimationMask, Savable {
 
     private BitSet affectedJoints = new BitSet();
 

+ 0 - 2
jme3-core/src/test/java/com/jme3/anim/AnimComposerTest.java

@@ -32,8 +32,6 @@
 package com.jme3.anim;
 
 import com.jme3.anim.tween.action.Action;
-import com.jme3.anim.tween.action.ClipAction;
-import com.jme3.export.JmeExporter;
 import java.util.Set;
 import java.util.TreeSet;
 import org.junit.Assert;