Browse Source

Fixes the ClassCastException when opening a GLTF Model.

MeFisto94 5 years ago
parent
commit
51f9344eb8

+ 2 - 2
jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/AbstractSceneExplorerNode.java

@@ -195,8 +195,8 @@ public abstract class AbstractSceneExplorerNode extends AbstractNode implements
     }
 
     /**
-     * Create a Property to be used in the Properties Sheet. This is actually a helper method for you
-     * See {@link #makeProperty(java.lang.Object, java.lang.Class, java.lang.String, java.lang.String, java.lang.String)  }
+     * Create a Property to be used in the Properties Sheet.
+     * See {@link #makeProperty(java.lang.Object, java.lang.Class, java.lang.String, java.lang.String, java.lang.String)  } for a more simple approach
      * Note: Embed is, when the Property isn't directly derived from obj but a getter.
      * 
      * @param obj The Object which contains this Property

+ 1 - 2
jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/animation/JmeAnimComposer.java

@@ -35,7 +35,6 @@ import com.jme3.anim.AnimComposer;
 import com.jme3.gde.core.icons.IconList;
 import com.jme3.gde.core.scene.SceneApplication;
 import com.jme3.gde.core.sceneexplorer.nodes.JmeControl;
-import com.jme3.gde.core.sceneexplorer.nodes.JmeTrackChildren;
 import com.jme3.gde.core.sceneexplorer.nodes.SceneExplorerNode;
 import com.jme3.gde.core.sceneexplorer.nodes.actions.ControlsPopup;
 import com.jme3.gde.core.sceneexplorer.nodes.actions.animation.AnimClipProperty;
@@ -94,7 +93,7 @@ public class JmeAnimComposer extends JmeControl {
 
         if (animComposer != null) {
             set.put(new AnimClipProperty(animComposer));
-            set.put(makeProperty(this, JmeAnimComposer.class, "GlobalSpeed", "Global Animation Speed"));
+            set.put(makeEmbedProperty(this, JmeAnimComposer.class, float.class, "getGlobalSpeed", "setGlobalSpeed", "Global Animation Speed"));
             sheet.put(set);
         } // else: Empty Sheet