Prechádzať zdrojové kódy

Merge branch 'master' into experimental

Kirill Vainer 9 rokov pred
rodič
commit
655457ab6a
31 zmenil súbory, kde vykonal 210 pridanie a 1263 odobranie
  1. 7 11
      jme3-core/src/main/java/com/jme3/animation/Bone.java
  2. 1 1
      jme3-core/src/main/java/com/jme3/scene/BatchNode.java
  3. 1 1
      jme3-core/src/main/java/com/jme3/scene/Geometry.java
  4. 1 1
      jme3-core/src/main/java/com/jme3/scene/GeometryGroupNode.java
  5. 1 1
      jme3-core/src/main/java/com/jme3/scene/instancing/InstancedNode.java
  6. 2 1
      jme3-core/src/main/java/com/jme3/scene/shape/Cylinder.java
  7. 15 27
      jme3-core/src/main/java/com/jme3/util/BufferUtils.java
  8. 1 1
      jme3-effects/src/main/resources/Common/MatDefs/SSAO/normal.vert
  9. 6 13
      sdk/jme3-core/src/com/jme3/gde/core/filters/FilterPostProcessorNode.java
  10. 0 87
      sdk/jme3-core/src/com/jme3/gde/core/filters/impl/JmeBloomFilter.java
  11. 0 89
      sdk/jme3-core/src/com/jme3/gde/core/filters/impl/JmeCartoonEdgeFilter.java
  12. 0 83
      sdk/jme3-core/src/com/jme3/gde/core/filters/impl/JmeColorOverlayFilter.java
  13. 0 89
      sdk/jme3-core/src/com/jme3/gde/core/filters/impl/JmeCrossHatchFilter.java
  14. 0 85
      sdk/jme3-core/src/com/jme3/gde/core/filters/impl/JmeDepthOfFieldFilter.java
  15. 0 86
      sdk/jme3-core/src/com/jme3/gde/core/filters/impl/JmeFXAAFilter.java
  16. 16 15
      sdk/jme3-core/src/com/jme3/gde/core/filters/impl/JmeFilter.java
  17. 0 85
      sdk/jme3-core/src/com/jme3/gde/core/filters/impl/JmeFogFilter.java
  18. 0 88
      sdk/jme3-core/src/com/jme3/gde/core/filters/impl/JmeLightScatteringFilter.java
  19. 0 85
      sdk/jme3-core/src/com/jme3/gde/core/filters/impl/JmePosterizationFilter.java
  20. 0 86
      sdk/jme3-core/src/com/jme3/gde/core/filters/impl/JmeWaterFilter.java
  21. 3 32
      sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeAnimControl.java
  22. 4 48
      sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeCharacterControl.java
  23. 123 0
      sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeControl.java
  24. 4 42
      sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeGenericControl.java
  25. 4 46
      sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeGhostControl.java
  26. 4 46
      sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeRigidBodyControl.java
  27. 3 45
      sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeSkeletonControl.java
  28. 4 29
      sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeTerrainLodControl.java
  29. 4 39
      sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeVehicleControl.java
  30. 5 0
      sdk/jme3-materialeditor/src/com/jme3/gde/materialdefinition/editor/MatDefEditorlElement.java
  31. 1 1
      sdk/jme3-welcome-screen/src/com/jme3/gde/welcome/WelcomeScreenTopComponent.java

+ 7 - 11
jme3-core/src/main/java/com/jme3/animation/Bone.java

@@ -139,11 +139,7 @@ public final class Bone implements Savable {
     /**
      * Special-purpose copy constructor. 
      * <p>
-     * Only copies the name and bind pose from the original.
-     * <p>
-     * WARNING: Local bind pose and world inverse bind pose transforms shallow 
-     * copied. Modifying that data on the original bone will cause it to
-     * be recomputed on any cloned bones.
+     * Only copies the name, user control state and bind pose transforms from the original.
      * <p>
      * The rest of the data is <em>NOT</em> copied, as it will be
      * generated automatically when the bone is animated.
@@ -155,13 +151,13 @@ public final class Bone implements Savable {
 
         userControl = source.userControl;
 
-        bindPos = source.bindPos;
-        bindRot = source.bindRot;
-        bindScale = source.bindScale;
+        bindPos = source.bindPos.clone();
+        bindRot = source.bindRot.clone();
+        bindScale = source.bindScale.clone();
 
-        modelBindInversePos = source.modelBindInversePos;
-        modelBindInverseRot = source.modelBindInverseRot;
-        modelBindInverseScale = source.modelBindInverseScale;
+        modelBindInversePos = source.modelBindInversePos.clone();
+        modelBindInverseRot = source.modelBindInverseRot.clone();
+        modelBindInverseScale = source.modelBindInverseScale.clone();
 
         // parent and children will be assigned manually..
     }

+ 1 - 1
jme3-core/src/main/java/com/jme3/scene/BatchNode.java

@@ -116,7 +116,7 @@ public class BatchNode extends GeometryGroupNode {
     }
 
     @Override
-    public void onGeoemtryUnassociated(Geometry geom) {
+    public void onGeometryUnassociated(Geometry geom) {
         setNeedsFullRebatch(true);
     }
 

+ 1 - 1
jme3-core/src/main/java/com/jme3/scene/Geometry.java

@@ -344,7 +344,7 @@ public class Geometry extends Spatial {
         if (groupNode != null) {
             // Once the geometry is removed 
             // from the parent, the group node needs to be updated.
-            groupNode.onGeoemtryUnassociated(this);
+            groupNode.onGeometryUnassociated(this);
             groupNode = null;
             
             // change the default to -1 to make error detection easier

+ 1 - 1
jme3-core/src/main/java/com/jme3/scene/GeometryGroupNode.java

@@ -83,5 +83,5 @@ public abstract class GeometryGroupNode extends Node {
      * 
      * @param geom The Geometry which is being unassociated.
      */
-    public abstract void onGeoemtryUnassociated(Geometry geom);
+    public abstract void onGeometryUnassociated(Geometry geom);
 }

+ 1 - 1
jme3-core/src/main/java/com/jme3/scene/instancing/InstancedNode.java

@@ -329,7 +329,7 @@ public class InstancedNode extends GeometryGroupNode {
     }
 
     @Override
-    public void onGeoemtryUnassociated(Geometry geom) {
+    public void onGeometryUnassociated(Geometry geom) {
         removeFromInstancedGeometry(geom);
     }
 }

+ 2 - 1
jme3-core/src/main/java/com/jme3/scene/shape/Cylinder.java

@@ -211,7 +211,7 @@ public class Cylinder extends Mesh {
      */
     public void updateGeometry(int axisSamples, int radialSamples,
             float radius, float radius2, float height, boolean closed, boolean inverted) {
-        this.axisSamples = axisSamples + (closed ? 2 : 0);
+        this.axisSamples = axisSamples;
         this.radialSamples = radialSamples;
         this.radius = radius;
         this.radius2 = radius2;
@@ -222,6 +222,7 @@ public class Cylinder extends Mesh {
 //        VertexBuffer pvb = getBuffer(Type.Position);
 //        VertexBuffer nvb = getBuffer(Type.Normal);
 //        VertexBuffer tvb = getBuffer(Type.TexCoord);
+        axisSamples += (closed ? 2 : 0);
 
         // Vertices
         int vertCount = axisSamples * (radialSamples + 1) + (closed ? 2 : 0);

+ 15 - 27
jme3-core/src/main/java/com/jme3/util/BufferUtils.java

@@ -51,7 +51,6 @@ import java.nio.IntBuffer;
 import java.nio.LongBuffer;
 import java.nio.ShortBuffer;
 import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
@@ -1268,7 +1267,6 @@ public final class BufferUtils {
             System.out.println(store.toString());
         }
     }
-    private static final AtomicBoolean loadedMethods = new AtomicBoolean(false);
     private static Method cleanerMethod = null;
     private static Method cleanMethod = null;
     private static Method viewedBufferMethod = null;
@@ -1288,31 +1286,23 @@ public final class BufferUtils {
         }
     }
 
-    private static void loadCleanerMethods() {
-        // If its already true, exit, if not, set it to true.
-        if (BufferUtils.loadedMethods.getAndSet(true)) {
-            return;
+    static {
+        // Oracle JRE / OpenJDK
+        cleanerMethod = loadMethod("sun.nio.ch.DirectBuffer", "cleaner");
+        cleanMethod = loadMethod("sun.misc.Cleaner", "clean");
+        viewedBufferMethod = loadMethod("sun.nio.ch.DirectBuffer", "viewedBuffer");
+        if (viewedBufferMethod == null) {
+            // They changed the name in Java 7 (???)
+            viewedBufferMethod = loadMethod("sun.nio.ch.DirectBuffer", "attachment");
         }
-        // This could potentially be called many times if used from multiple
-        // threads
-        synchronized (BufferUtils.loadedMethods) {
-            // Oracle JRE / OpenJDK
-            cleanerMethod = loadMethod("sun.nio.ch.DirectBuffer", "cleaner");
-            cleanMethod = loadMethod("sun.misc.Cleaner", "clean");
-            viewedBufferMethod = loadMethod("sun.nio.ch.DirectBuffer", "viewedBuffer");
-            if (viewedBufferMethod == null) {
-                // They changed the name in Java 7 (???)
-                viewedBufferMethod = loadMethod("sun.nio.ch.DirectBuffer", "attachment");
-            }
 
-            // Apache Harmony
-            ByteBuffer bb = BufferUtils.createByteBuffer(1);
-            Class<?> clazz = bb.getClass();
-            try {
-                freeMethod = clazz.getMethod("free");
-            } catch (NoSuchMethodException ex) {
-            } catch (SecurityException ex) {
-            }
+        // Apache Harmony
+        ByteBuffer bb = BufferUtils.createByteBuffer(1);
+        Class<?> clazz = bb.getClass();
+        try {
+            freeMethod = clazz.getMethod("free");
+        } catch (NoSuchMethodException ex) {
+        } catch (SecurityException ex) {
         }
     }
 
@@ -1333,8 +1323,6 @@ public final class BufferUtils {
             return;
         }
 
-        BufferUtils.loadCleanerMethods();
-
         try {
             if (freeMethod != null) {
                 freeMethod.invoke(toBeDestroyed);

+ 1 - 1
jme3-effects/src/main/resources/Common/MatDefs/SSAO/normal.vert

@@ -19,6 +19,6 @@ void main(void)
    #ifdef NUM_BONES
        Skinning_Compute(modelSpacePos,modelSpaceNormals);
    #endif
-   normal = normalize(g_NormalMatrix * modelSpaceNormals);
+   normal = normalize(TransformNormal(modelSpaceNormals));
    gl_Position = g_WorldViewProjectionMatrix * modelSpacePos;
 }

+ 6 - 13
sdk/jme3-core/src/com/jme3/gde/core/filters/FilterPostProcessorNode.java

@@ -75,8 +75,6 @@ public class FilterPostProcessorNode extends AbstractNode {
         getLookup().lookup(FilterIndexSupport.class).setFilterPostProcessorNode(this);
         ((FilterChildren) getChildren()).setFilterPostProcessorNode(this);
 
-
-
     }
 
     @Override
@@ -165,8 +163,8 @@ public class FilterPostProcessorNode extends AbstractNode {
     public Action[] getActions(boolean context) {
 //        return super.getActions(context);
         return new Action[]{
-                    new NewFilterPopup(this)
-                };
+            new NewFilterPopup(this)
+        };
     }
 
     public static class FilterChildren extends Children.Keys<Object> {
@@ -221,15 +219,10 @@ public class FilterPostProcessorNode extends AbstractNode {
         @Override
         protected Node[] createNodes(Object t) {
             Filter filter = (Filter) t;
-            for (FilterNode di : Lookup.getDefault().lookupAll(FilterNode.class)) {
-                if (di.getExplorerObjectClass().getName().equals(filter.getClass().getName())) {
-                    Node[] ret = di.createNodes(filter, dataObject, readOnly);
-                    if (ret != null) {
-                        return ret;
-                    }
-                }
-            }
-            return new Node[]{};
+            //get JmeFilter, the only FilterNode spi
+            FilterNode di = Lookup.getDefault().lookup(FilterNode.class); 
+            Node[] ret = di.createNodes(filter, dataObject, readOnly);
+            return ret;
         }
     }
 }

+ 0 - 87
sdk/jme3-core/src/com/jme3/gde/core/filters/impl/JmeBloomFilter.java

@@ -1,87 +0,0 @@
-/*
- *  Copyright (c) 2009-2010 jMonkeyEngine
- *  All rights reserved.
- * 
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are
- *  met:
- * 
- *  * Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 
- *  * Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 
- *  * Neither the name of 'jMonkeyEngine' nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- * 
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- *  TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- *  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.jme3.gde.core.filters.impl;
-
-import com.jme3.gde.core.filters.AbstractFilterNode;
-import com.jme3.gde.core.filters.FilterNode;
-import com.jme3.post.filters.BloomFilter;
-import org.openide.loaders.DataObject;
-import org.openide.nodes.Node;
-import org.openide.nodes.Sheet;
-
-/**
- *
- * @author normenhansen
- */
[email protected](service = FilterNode.class)
-public class JmeBloomFilter extends AbstractFilterNode {
-
-    public JmeBloomFilter() {
-    }
-
-    public JmeBloomFilter(BloomFilter filter, DataObject object, boolean readOnly) {
-        super(filter);
-        this.dataObject = object;
-        this.readOnly = readOnly;
-    }
-
-    @Override
-    protected Sheet createSheet() {
-        Sheet sheet = super.createSheet();
-        Sheet.Set set = Sheet.createPropertiesSet();
-        set.setDisplayName("Bloom");
-        set.setName(Node.class.getName());
-        BloomFilter obj = (BloomFilter) filter;
-        if (obj == null) {
-            return sheet;
-        }
-//        set.put(makeProperty(obj, float.class, "getBloomIntensity", "setBloomIntensity", "Intensity"));
-//        set.put(makeProperty(obj, float.class, "getBlurScale", "setBlurScale", "Blur Scale"));
-//        set.put(makeProperty(obj, float.class, "getDownSamplingFactor", "setDownSamplingFactor", "Downsampling Factor"));
-//        set.put(makeProperty(obj, float.class, "getExposureCutOff", "setExposureCutOff", "Exposure Cutoff"));
-//        set.put(makeProperty(obj, float.class, "getExposurePower", "setExposurePower", "Exposure Power"));
-         createFields(BloomFilter.class, set, obj);
-        sheet.put(set);
-        return sheet;
-
-    }
-
-    @Override
-    public Class<?> getExplorerObjectClass() {
-        return BloomFilter.class;
-    }
-
-    @Override
-    public Node[] createNodes(Object key, DataObject dataObject, boolean readOnly) {
-        return new Node[]{new JmeBloomFilter((BloomFilter) key, dataObject, readOnly)};
-    }
-}

+ 0 - 89
sdk/jme3-core/src/com/jme3/gde/core/filters/impl/JmeCartoonEdgeFilter.java

@@ -1,89 +0,0 @@
-/*
- *  Copyright (c) 2009-2010 jMonkeyEngine
- *  All rights reserved.
- * 
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are
- *  met:
- * 
- *  * Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 
- *  * Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 
- *  * Neither the name of 'jMonkeyEngine' nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- * 
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- *  TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- *  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.jme3.gde.core.filters.impl;
-
-import com.jme3.gde.core.filters.AbstractFilterNode;
-import com.jme3.gde.core.filters.FilterNode;
-import com.jme3.post.filters.CartoonEdgeFilter;
-import org.openide.loaders.DataObject;
-import org.openide.nodes.Node;
-import org.openide.nodes.Sheet;
-
-/**
- *
- * @author normenhansen
- */
[email protected](service = FilterNode.class)
-public class JmeCartoonEdgeFilter extends AbstractFilterNode {
-
-    public JmeCartoonEdgeFilter() {
-    }
-
-    public JmeCartoonEdgeFilter(CartoonEdgeFilter filter, DataObject object, boolean readOnly) {
-        super(filter);
-        this.dataObject = object;
-        this.readOnly = readOnly;
-    }
-
-    @Override
-    protected Sheet createSheet() {
-        Sheet sheet = super.createSheet();
-        Sheet.Set set = Sheet.createPropertiesSet();
-        set.setDisplayName("CartoonEdge");
-        set.setName(Node.class.getName());
-        CartoonEdgeFilter obj = (CartoonEdgeFilter) filter;
-        if (obj == null) {
-            return sheet;
-        }
-//        set.put(makeProperty(obj, float.class, "getDepthSensitivity", "setDepthSensitivity", "Depth Sensitivity"));
-//        set.put(makeProperty(obj, float.class, "getDepthThreshold", "setDepthThreshold", "Depth Threshold"));
-//        set.put(makeProperty(obj, ColorRGBA.class, "getEdgeColor", "setEdgeColor", "Edge Color"));
-//        set.put(makeProperty(obj, float.class, "getEdgeIntensity", "setEdgeIntensity", "Edge Intensity"));
-//        set.put(makeProperty(obj, float.class, "getEdgeWidth", "setEdgeWidth", "Edge Width"));
-//        set.put(makeProperty(obj, float.class, "getNormalSensitivity", "setNormalSensitivity", "Normal Sensitivity"));
-//        set.put(makeProperty(obj, float.class, "getNormalThreshold", "setNormalThreshold", "Normal Threshold"));
-        createFields(CartoonEdgeFilter.class, set, obj);
-        sheet.put(set);
-        return sheet;
-
-    }
-
-    @Override
-    public Class<?> getExplorerObjectClass() {
-        return CartoonEdgeFilter.class;
-    }
-
-    @Override
-    public Node[] createNodes(Object key, DataObject dataObject, boolean readOnly) {
-        return new Node[]{new JmeCartoonEdgeFilter((CartoonEdgeFilter) key, dataObject, readOnly)};
-    }
-}

+ 0 - 83
sdk/jme3-core/src/com/jme3/gde/core/filters/impl/JmeColorOverlayFilter.java

@@ -1,83 +0,0 @@
-/*
- *  Copyright (c) 2009-2010 jMonkeyEngine
- *  All rights reserved.
- * 
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are
- *  met:
- * 
- *  * Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 
- *  * Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 
- *  * Neither the name of 'jMonkeyEngine' nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- * 
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- *  TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- *  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.jme3.gde.core.filters.impl;
-
-import com.jme3.gde.core.filters.AbstractFilterNode;
-import com.jme3.gde.core.filters.FilterNode;
-import com.jme3.post.filters.ColorOverlayFilter;
-import org.openide.loaders.DataObject;
-import org.openide.nodes.Node;
-import org.openide.nodes.Sheet;
-
-/**
- *
- * @author normenhansen
- */
[email protected](service = FilterNode.class)
-public class JmeColorOverlayFilter extends AbstractFilterNode {
-
-    public JmeColorOverlayFilter() {
-    }
-
-    public JmeColorOverlayFilter(ColorOverlayFilter filter, DataObject object, boolean readOnly) {
-        super(filter);
-        this.dataObject = object;
-        this.readOnly = readOnly;
-    }
-
-    @Override
-    protected Sheet createSheet() {
-        Sheet sheet = super.createSheet();
-        Sheet.Set set = Sheet.createPropertiesSet();
-        set.setDisplayName("ColorOverlay");
-        set.setName(Node.class.getName());
-        ColorOverlayFilter obj = (ColorOverlayFilter) filter;
-        if (obj == null) {
-            return sheet;
-        }
-        //set.put(makeProperty(obj, ColorRGBA.class, "getColor", "setColor", "Color"));
-        createFields(ColorOverlayFilter.class, set, obj);
-        sheet.put(set);
-        return sheet;
-
-    }
-
-    @Override
-    public Class<?> getExplorerObjectClass() {
-        return ColorOverlayFilter.class;
-    }
-
-    @Override
-    public Node[] createNodes(Object key, DataObject dataObject, boolean readOnly) {
-        return new Node[]{new JmeColorOverlayFilter((ColorOverlayFilter) key, dataObject, readOnly)};
-    }
-}

+ 0 - 89
sdk/jme3-core/src/com/jme3/gde/core/filters/impl/JmeCrossHatchFilter.java

@@ -1,89 +0,0 @@
-/*
- *  Copyright (c) 2009-2010 jMonkeyEngine
- *  All rights reserved.
- * 
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are
- *  met:
- * 
- *  * Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 
- *  * Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 
- *  * Neither the name of 'jMonkeyEngine' nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- * 
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- *  TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- *  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.jme3.gde.core.filters.impl;
-
-import com.jme3.gde.core.filters.AbstractFilterNode;
-import com.jme3.gde.core.filters.FilterNode;
-import com.jme3.post.filters.CrossHatchFilter;
-import org.openide.loaders.DataObject;
-import org.openide.nodes.Node;
-import org.openide.nodes.Sheet;
-
-/**
- *
- * @author normenhansen
- */
[email protected](service = FilterNode.class)
-public class JmeCrossHatchFilter extends AbstractFilterNode {
-
-    public JmeCrossHatchFilter() {
-    }
-
-    public JmeCrossHatchFilter(CrossHatchFilter filter, DataObject object, boolean readOnly) {
-        super(filter);
-        this.dataObject = object;
-        this.readOnly = readOnly;
-    }
-
-    @Override
-    protected Sheet createSheet() {
-        Sheet sheet = super.createSheet();
-        Sheet.Set set = Sheet.createPropertiesSet();
-        set.setDisplayName("CrossHatch");
-        set.setName(Node.class.getName());
-        CrossHatchFilter obj = (CrossHatchFilter) filter;
-        if (obj == null) {
-            return sheet;
-        }
-//        set.put(makeProperty(obj, float.class, "getColorInfluenceLine", "setColorInfluenceLine", "Color Influence Line"));
-//        set.put(makeProperty(obj, float.class, "getColorInfluencePaper", "setColorInfluencePaper", "Color Influence Paper"));
-//        set.put(makeProperty(obj, float.class, "getFillValue", "setFillValue", "Fill Value"));
-//        set.put(makeProperty(obj, ColorRGBA.class, "getPaperColor", "setPaperColor", "Paper Color"));
-//        set.put(makeProperty(obj, ColorRGBA.class, "getLineColor", "setLineColor", "Line Color"));
-//        set.put(makeProperty(obj, float.class, "getLineDistance", "setLineDistance", "Line Distance"));
-//        set.put(makeProperty(obj, float.class, "getLineThickness", "setLineThickness", "Line Thickness"));
-        createFields(CrossHatchFilter.class, set, obj);
-        sheet.put(set);
-        return sheet;
-
-    }
-
-    @Override
-    public Class<?> getExplorerObjectClass() {
-        return CrossHatchFilter.class;
-    }
-
-    @Override
-    public Node[] createNodes(Object key, DataObject dataObject, boolean readOnly) {
-        return new Node[]{new JmeCrossHatchFilter((CrossHatchFilter) key, dataObject, readOnly)};
-    }
-}

+ 0 - 85
sdk/jme3-core/src/com/jme3/gde/core/filters/impl/JmeDepthOfFieldFilter.java

@@ -1,85 +0,0 @@
-/*
- *  Copyright (c) 2009-2010 jMonkeyEngine
- *  All rights reserved.
- * 
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are
- *  met:
- * 
- *  * Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 
- *  * Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 
- *  * Neither the name of 'jMonkeyEngine' nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- * 
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- *  TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- *  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.jme3.gde.core.filters.impl;
-
-import com.jme3.gde.core.filters.AbstractFilterNode;
-import com.jme3.gde.core.filters.FilterNode;
-import com.jme3.post.filters.DepthOfFieldFilter;
-import org.openide.loaders.DataObject;
-import org.openide.nodes.Node;
-import org.openide.nodes.Sheet;
-
-/**
- *
- * @author normenhansen
- */
[email protected](service = FilterNode.class)
-public class JmeDepthOfFieldFilter extends AbstractFilterNode {
-
-    public JmeDepthOfFieldFilter() {
-    }
-
-    public JmeDepthOfFieldFilter(DepthOfFieldFilter filter, DataObject object, boolean readOnly) {
-        super(filter);
-        this.dataObject = object;
-        this.readOnly = readOnly;
-    }
-
-    @Override
-    protected Sheet createSheet() {
-        Sheet sheet = super.createSheet();
-        Sheet.Set set = Sheet.createPropertiesSet();
-        set.setDisplayName("DepthOfField");
-        set.setName(Node.class.getName());
-        DepthOfFieldFilter obj = (DepthOfFieldFilter) filter;
-        if (obj == null) {
-            return sheet;
-        }
-//        set.put(makeProperty(obj, float.class, "getBlurScale", "setBlurScale", "Blur Scale"));
-//        set.put(makeProperty(obj, float.class, "getFocusDistance", "setFocusDistance", "Focus Distance"));
-//        set.put(makeProperty(obj, float.class, "getFocusRange", "setFocusRange", "Focus Range"));
-         createFields(DepthOfFieldFilter.class, set, obj);
-        sheet.put(set);
-        return sheet;
-
-    }
-
-    @Override
-    public Class<?> getExplorerObjectClass() {
-        return DepthOfFieldFilter.class;
-    }
-
-    @Override
-    public Node[] createNodes(Object key, DataObject dataObject, boolean readOnly) {
-        return new Node[]{new JmeDepthOfFieldFilter((DepthOfFieldFilter) key, dataObject, readOnly)};
-    }
-}

+ 0 - 86
sdk/jme3-core/src/com/jme3/gde/core/filters/impl/JmeFXAAFilter.java

@@ -1,86 +0,0 @@
-/*
- *  Copyright (c) 2009-2010 jMonkeyEngine
- *  All rights reserved.
- * 
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are
- *  met:
- * 
- *  * Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 
- *  * Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 
- *  * Neither the name of 'jMonkeyEngine' nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- * 
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- *  TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- *  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.jme3.gde.core.filters.impl;
-
-import com.jme3.gde.core.filters.AbstractFilterNode;
-import com.jme3.gde.core.filters.FilterNode;
-import com.jme3.post.filters.FXAAFilter;
-import org.openide.loaders.DataObject;
-import org.openide.nodes.Node;
-import org.openide.nodes.Sheet;
-
-/**
- *
- * @author Rémy Bouquet
- */
[email protected](service = FilterNode.class)
-public class JmeFXAAFilter extends AbstractFilterNode {
-
-    public JmeFXAAFilter() {
-    }
-
-    public JmeFXAAFilter(FXAAFilter filter, DataObject object, boolean readOnly) {
-        super(filter);
-        this.dataObject = object;
-        this.readOnly = readOnly;
-    }
-
-    @Override
-    protected Sheet createSheet() {
-        Sheet sheet = super.createSheet();
-
-        Sheet.Set set = Sheet.createPropertiesSet();
-        set.setDisplayName("FXAA");
-        set.setName("FXAA");
-        FXAAFilter obj = (FXAAFilter) filter;
-
-        if (obj == null) {
-            return sheet;
-        }
-
-        createFields(FXAAFilter.class, set, obj);
-
-        sheet.put(set);
-        return sheet;
-
-    }
-
-    @Override
-    public Class<?> getExplorerObjectClass() {
-        return FXAAFilter.class;
-    }
-
-    @Override
-    public Node[] createNodes(Object key, DataObject dataObject, boolean readOnly) {
-        return new Node[]{new JmeFXAAFilter((FXAAFilter) key, dataObject, readOnly)};
-    }
-}

+ 16 - 15
sdk/jme3-core/src/com/jme3/gde/core/filters/impl/JmeSSAOFilter.java → sdk/jme3-core/src/com/jme3/gde/core/filters/impl/JmeFilter.java

@@ -1,5 +1,5 @@
 /*
- *  Copyright (c) 2009-2010 jMonkeyEngine
+ *  Copyright (c) 2009-2016 jMonkeyEngine
  *  All rights reserved.
  * 
  *  Redistribution and use in source and binary forms, with or without
@@ -33,22 +33,24 @@ package com.jme3.gde.core.filters.impl;
 
 import com.jme3.gde.core.filters.AbstractFilterNode;
 import com.jme3.gde.core.filters.FilterNode;
-import com.jme3.post.ssao.SSAOFilter;
+import com.jme3.post.Filter;
 import org.openide.loaders.DataObject;
 import org.openide.nodes.Node;
 import org.openide.nodes.Sheet;
 
+
 /**
  *
- * @author Rémy Bouquet
+ * @author dokthar
  */
 @org.openide.util.lookup.ServiceProvider(service = FilterNode.class)
-public class JmeSSAOFilter extends AbstractFilterNode {
+public class JmeFilter extends AbstractFilterNode {
 
-    public JmeSSAOFilter() {
+    
+    public JmeFilter() {
     }
 
-    public JmeSSAOFilter(SSAOFilter filter, DataObject object, boolean readOnly) {
+    public JmeFilter(Filter filter, DataObject object, boolean readOnly) {
         super(filter);
         this.dataObject = object;
         this.readOnly = readOnly;
@@ -57,18 +59,16 @@ public class JmeSSAOFilter extends AbstractFilterNode {
     @Override
     protected Sheet createSheet() {
         Sheet sheet = super.createSheet();
-
         Sheet.Set set = Sheet.createPropertiesSet();
-        set.setDisplayName("SSAO");
-        set.setName("SSAO");
-        SSAOFilter obj = (SSAOFilter) filter;
-
+        set.setDisplayName(filter.getName());
+        set.setName(Node.class.getName());
+        
+        Filter obj = filter;
         if (obj == null) {
             return sheet;
         }
 
-        createFields(SSAOFilter.class, set, obj);
-
+        createFields(filter.getClass(), set, obj);
         sheet.put(set);
         return sheet;
 
@@ -76,11 +76,12 @@ public class JmeSSAOFilter extends AbstractFilterNode {
 
     @Override
     public Class<?> getExplorerObjectClass() {
-        return SSAOFilter.class;
+        return filter.getClass();
     }
 
     @Override
     public Node[] createNodes(Object key, DataObject dataObject, boolean readOnly) {
-        return new Node[]{new JmeSSAOFilter((SSAOFilter) key, dataObject, readOnly)};
+        return new Node[]{new JmeFilter((Filter) key, dataObject, readOnly)};
     }
+    
 }

+ 0 - 85
sdk/jme3-core/src/com/jme3/gde/core/filters/impl/JmeFogFilter.java

@@ -1,85 +0,0 @@
-/*
- *  Copyright (c) 2009-2010 jMonkeyEngine
- *  All rights reserved.
- * 
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are
- *  met:
- * 
- *  * Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 
- *  * Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 
- *  * Neither the name of 'jMonkeyEngine' nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- * 
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- *  TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- *  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.jme3.gde.core.filters.impl;
-
-import com.jme3.gde.core.filters.AbstractFilterNode;
-import com.jme3.gde.core.filters.FilterNode;
-import com.jme3.post.filters.FogFilter;
-import org.openide.loaders.DataObject;
-import org.openide.nodes.Node;
-import org.openide.nodes.Sheet;
-
-/**
- *
- * @author normenhansen
- */
[email protected](service = FilterNode.class)
-public class JmeFogFilter extends AbstractFilterNode {
-
-    public JmeFogFilter() {
-    }
-
-    public JmeFogFilter(FogFilter filter, DataObject object, boolean readOnly) {
-        super(filter);
-        this.dataObject = object;
-        this.readOnly = readOnly;
-    }
-
-    @Override
-    protected Sheet createSheet() {
-        Sheet sheet = super.createSheet();
-        Sheet.Set set = Sheet.createPropertiesSet();
-        set.setDisplayName("Fog");
-        set.setName(Node.class.getName());
-        FogFilter obj = (FogFilter) filter;
-        if (obj == null) {
-            return sheet;
-        }
-//        set.put(makeProperty(obj, float.class, "getFogDistance", "setFogDistance", "Distance"));
-//        set.put(makeProperty(obj, float.class, "getFogDensity", "setFogDensity", "Density"));
-//        set.put(makeProperty(obj, ColorRGBA.class, "getFogColor", "setFogColor", "Color"));
-         createFields(FogFilter.class, set, obj);
-        sheet.put(set);
-        return sheet;
-
-    }
-
-    @Override
-    public Class<?> getExplorerObjectClass() {
-        return FogFilter.class;
-    }
-
-    @Override
-    public Node[] createNodes(Object key, DataObject dataObject, boolean readOnly) {
-        return new Node[]{new JmeFogFilter((FogFilter) key, dataObject, readOnly)};
-    }
-}

+ 0 - 88
sdk/jme3-core/src/com/jme3/gde/core/filters/impl/JmeLightScatteringFilter.java

@@ -1,88 +0,0 @@
-/*
- *  Copyright (c) 2009-2010 jMonkeyEngine
- *  All rights reserved.
- * 
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are
- *  met:
- * 
- *  * Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 
- *  * Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 
- *  * Neither the name of 'jMonkeyEngine' nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- * 
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- *  TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- *  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.jme3.gde.core.filters.impl;
-
-import com.jme3.gde.core.filters.AbstractFilterNode;
-import com.jme3.gde.core.filters.FilterNode;
-import com.jme3.post.filters.LightScatteringFilter;
-import org.openide.loaders.DataObject;
-import org.openide.nodes.Node;
-import org.openide.nodes.Sheet;
-
-/**
- *
- * @author normenhansen
- */
[email protected](service = FilterNode.class)
-public class JmeLightScatteringFilter extends AbstractFilterNode {
-
-    public JmeLightScatteringFilter() {
-    }
-
-    public JmeLightScatteringFilter(LightScatteringFilter filter, DataObject object, boolean readOnly) {
-        super(filter);
-        this.dataObject = object;
-        this.readOnly = readOnly;
-    }
-
-    @Override
-    protected Sheet createSheet() {
-        Sheet sheet = super.createSheet();
-        Sheet.Set set = Sheet.createPropertiesSet();
-        set.setDisplayName("Blur");
-        set.setName(Node.class.getName());
-        LightScatteringFilter obj = (LightScatteringFilter) filter;
-        if (obj == null) {
-            return sheet;
-        }
-//        set.put(makeProperty(obj, float.class, "getBlurStart", "setBlurStart", "Blur Start"));
-//        set.put(makeProperty(obj, float.class, "getBlurWidth", "setBlurWidth", "Blur Width"));
-//        set.put(makeProperty(obj, float.class, "getLightDensity", "setLightDensity", "Light Density"));
-//        set.put(makeProperty(obj, Vector3f.class, "getLightPosition", "setLightPosition", "Light Position"));
-//        set.put(makeProperty(obj, int.class, "getNbSamples", "setNbSamples", "Sample Number"));
-        
-        createFields(LightScatteringFilter.class, set, obj);
-        sheet.put(set);
-        return sheet;
-
-    }
-
-    @Override
-    public Class<?> getExplorerObjectClass() {
-        return LightScatteringFilter.class;
-    }
-
-    @Override
-    public Node[] createNodes(Object key, DataObject dataObject, boolean readOnly) {
-        return new Node[]{new JmeLightScatteringFilter((LightScatteringFilter) key, dataObject, readOnly)};
-    }
-}

+ 0 - 85
sdk/jme3-core/src/com/jme3/gde/core/filters/impl/JmePosterizationFilter.java

@@ -1,85 +0,0 @@
-/*
- *  Copyright (c) 2009-2010 jMonkeyEngine
- *  All rights reserved.
- * 
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are
- *  met:
- * 
- *  * Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 
- *  * Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 
- *  * Neither the name of 'jMonkeyEngine' nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- * 
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- *  TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- *  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.jme3.gde.core.filters.impl;
-
-import com.jme3.gde.core.filters.AbstractFilterNode;
-import com.jme3.gde.core.filters.FilterNode;
-import com.jme3.post.filters.PosterizationFilter;
-import org.openide.loaders.DataObject;
-import org.openide.nodes.Node;
-import org.openide.nodes.Sheet;
-
-/**
- *
- * @author normenhansen
- */
[email protected](service = FilterNode.class)
-public class JmePosterizationFilter extends AbstractFilterNode {
-
-    public JmePosterizationFilter() {
-    }
-
-    public JmePosterizationFilter(PosterizationFilter filter, DataObject object, boolean readOnly) {
-        super(filter);
-        this.dataObject = object;
-        this.readOnly = readOnly;
-    }
-
-    @Override
-    protected Sheet createSheet() {
-        Sheet sheet = super.createSheet();
-        Sheet.Set set = Sheet.createPropertiesSet();
-        set.setDisplayName("Posterization");
-        set.setName(Node.class.getName());
-        PosterizationFilter obj = (PosterizationFilter) filter;
-        if (obj == null) {
-            return sheet;
-        }
-//        set.put(makeProperty(obj, float.class, "getGamma", "setGamma", "Gamma"));
-//        set.put(makeProperty(obj, int.class, "getNumColors", "setNumColors", "Color Number"));
-//        set.put(makeProperty(obj, float.class, "getStrength", "setStrength", "Strength"));
-        createFields(PosterizationFilter.class, set, obj);
-        sheet.put(set);
-        return sheet;
-
-    }
-
-    @Override
-    public Class<?> getExplorerObjectClass() {
-        return PosterizationFilter.class;
-    }
-
-    @Override
-    public Node[] createNodes(Object key, DataObject dataObject, boolean readOnly) {
-        return new Node[]{new JmePosterizationFilter((PosterizationFilter) key, dataObject, readOnly)};
-    }
-}

+ 0 - 86
sdk/jme3-core/src/com/jme3/gde/core/filters/impl/JmeWaterFilter.java

@@ -1,86 +0,0 @@
-/*
- *  Copyright (c) 2009-2010 jMonkeyEngine
- *  All rights reserved.
- * 
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are
- *  met:
- * 
- *  * Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 
- *  * Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 
- *  * Neither the name of 'jMonkeyEngine' nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- * 
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- *  TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- *  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.jme3.gde.core.filters.impl;
-
-import com.jme3.gde.core.filters.AbstractFilterNode;
-import com.jme3.gde.core.filters.FilterNode;
-import com.jme3.water.WaterFilter;
-import org.openide.loaders.DataObject;
-import org.openide.nodes.Node;
-import org.openide.nodes.Sheet;
-
-/**
- *
- * @author Rémy Bouquet
- */
[email protected](service = FilterNode.class)
-public class JmeWaterFilter extends AbstractFilterNode {
-
-    public JmeWaterFilter() {
-    }
-
-    public JmeWaterFilter(WaterFilter filter, DataObject object, boolean readOnly) {
-        super(filter);
-        this.dataObject = object;
-        this.readOnly = readOnly;
-    }
-
-    @Override
-    protected Sheet createSheet() {
-        Sheet sheet = super.createSheet();
-
-        Sheet.Set set = Sheet.createPropertiesSet();
-        set.setDisplayName("Water");
-        set.setName("Water");
-        WaterFilter obj = (WaterFilter) filter;
-
-        if (obj == null) {
-            return sheet;
-        }
-
-        createFields(WaterFilter.class, set, obj);
-
-        sheet.put(set);
-        return sheet;
-
-    }
-
-    @Override
-    public Class<?> getExplorerObjectClass() {
-        return WaterFilter.class;
-    }
-
-    @Override
-    public Node[] createNodes(Object key, DataObject dataObject, boolean readOnly) {
-        return new Node[]{new JmeWaterFilter((WaterFilter) key, dataObject, readOnly)};
-    }
-}

+ 3 - 32
sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeAnimControl.java

@@ -1,5 +1,5 @@
 /*
- *  Copyright (c) 2009-2010 jMonkeyEngine
+ *  Copyright (c) 2009-2016 jMonkeyEngine
  *  All rights reserved.
  *
  *  Redistribution and use in source and binary forms, with or without
@@ -34,19 +34,13 @@ package com.jme3.gde.core.sceneexplorer.nodes;
 import com.jme3.animation.AnimControl;
 import com.jme3.gde.core.icons.IconList;
 import com.jme3.gde.core.properties.AnimationProperty;
-import com.jme3.gde.core.scene.SceneApplication;
 import com.jme3.gde.core.sceneexplorer.nodes.actions.TrackVisibilityPopup;
-import com.jme3.scene.Spatial;
 import java.awt.Image;
-import java.io.IOException;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ExecutionException;
 import javax.swing.Action;
 import org.openide.actions.DeleteAction;
 import org.openide.loaders.DataObject;
 import org.openide.nodes.Node;
 import org.openide.nodes.Sheet;
-import org.openide.util.Exceptions;
 import org.openide.util.HelpCtx;
 import org.openide.util.actions.BooleanStateAction;
 import org.openide.util.actions.SystemAction;
@@ -57,7 +51,7 @@ import org.openide.util.actions.SystemAction;
  */
 @org.openide.util.lookup.ServiceProvider(service = SceneExplorerNode.class)
 @SuppressWarnings({"unchecked", "rawtypes"})
-public class JmeAnimControl extends AbstractSceneExplorerNode {
+public class JmeAnimControl extends JmeControl {
 
     private AnimControl animControl;
     private JmeAnimation playingAnimation = null;
@@ -78,6 +72,7 @@ public class JmeAnimControl extends AbstractSceneExplorerNode {
         lookupContents.add(animControl);
         setName("AnimControl");
         children.setAnimControl(this);
+        control = animControl;
     }
 
     @Override
@@ -130,30 +125,6 @@ public class JmeAnimControl extends AbstractSceneExplorerNode {
     }
 
     @Override
-    public boolean canDestroy() {
-        return !readOnly;
-    }
-
-    @Override
-    public void destroy() throws IOException {
-        super.destroy();
-        final Spatial spat = getParentNode().getLookup().lookup(Spatial.class);
-        try {
-            SceneApplication.getApplication().enqueue(new Callable<Void>() {
-
-                public Void call() throws Exception {
-                    spat.removeControl(animControl);
-                    return null;
-                }
-            }).get();
-            ((AbstractSceneExplorerNode) getParentNode()).refresh(true);
-        } catch (InterruptedException ex) {
-            Exceptions.printStackTrace(ex);
-        } catch (ExecutionException ex) {
-            Exceptions.printStackTrace(ex);
-        }
-    }
-
     public Class getExplorerObjectClass() {
         return AnimControl.class;
     }

+ 4 - 48
sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeCharacterControl.java

@@ -1,5 +1,5 @@
 /*
- *  Copyright (c) 2009-2010 jMonkeyEngine
+ *  Copyright (c) 2009-2016 jMonkeyEngine
  *  All rights reserved.
  * 
  *  Redistribution and use in source and binary forms, with or without
@@ -34,21 +34,10 @@ package com.jme3.gde.core.sceneexplorer.nodes;
 import com.jme3.bullet.collision.shapes.CollisionShape;
 import com.jme3.bullet.control.CharacterControl;
 import com.jme3.gde.core.icons.IconList;
-import com.jme3.gde.core.scene.SceneApplication;
 import com.jme3.math.Vector3f;
-import com.jme3.scene.Spatial;
 import java.awt.Image;
-import java.io.IOException;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ExecutionException;
-import javax.swing.Action;
-import javax.swing.ImageIcon;
-import org.openide.actions.DeleteAction;
 import org.openide.loaders.DataObject;
 import org.openide.nodes.Sheet;
-import org.openide.util.Exceptions;
-import org.openide.util.ImageUtilities;
-import org.openide.util.actions.SystemAction;
 
 /**
  *
@@ -56,7 +45,7 @@ import org.openide.util.actions.SystemAction;
  */
 @org.openide.util.lookup.ServiceProvider(service=SceneExplorerNode.class)
 @SuppressWarnings({"unchecked", "rawtypes"})
-public class JmeCharacterControl extends AbstractSceneExplorerNode {
+public class JmeCharacterControl extends JmeControl {
 
     private static Image smallImage = IconList.player.getImage();
     private CharacterControl geom;
@@ -69,6 +58,7 @@ public class JmeCharacterControl extends AbstractSceneExplorerNode {
         getLookupContents().add(this);
         getLookupContents().add(spatial);
         this.geom = spatial;
+        control = spatial;
         setName("CharacterControl");
     }
 
@@ -82,41 +72,6 @@ public class JmeCharacterControl extends AbstractSceneExplorerNode {
         return smallImage;
     }
 
-    @Override
-    public Action[] getActions(boolean context) {
-        return new SystemAction[]{
-                    //                    SystemAction.get(CopyAction.class),
-                    //                    SystemAction.get(CutAction.class),
-                    //                    SystemAction.get(PasteAction.class),
-                    SystemAction.get(DeleteAction.class)
-                };
-    }
-
-    @Override
-    public boolean canDestroy() {
-        return !readOnly;
-    }
-
-    @Override
-    public void destroy() throws IOException {
-        super.destroy();
-        final Spatial spat=getParentNode().getLookup().lookup(Spatial.class);
-        try {
-            SceneApplication.getApplication().enqueue(new Callable<Void>() {
-
-                public Void call() throws Exception {
-                    spat.removeControl(geom);
-                    return null;
-                }
-            }).get();
-            ((AbstractSceneExplorerNode)getParentNode()).refresh(true);
-        } catch (InterruptedException ex) {
-            Exceptions.printStackTrace(ex);
-        } catch (ExecutionException ex) {
-            Exceptions.printStackTrace(ex);
-        }
-    }
-
     @Override
     protected Sheet createSheet() {
         Sheet sheet = super.createSheet();
@@ -145,6 +100,7 @@ public class JmeCharacterControl extends AbstractSceneExplorerNode {
 
     }
 
+    @Override
     public Class getExplorerObjectClass() {
         return CharacterControl.class;
     }

+ 123 - 0
sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeControl.java

@@ -0,0 +1,123 @@
+/*
+ *  Copyright (c) 2009-2016 jMonkeyEngine
+ *  All rights reserved.
+ * 
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are
+ *  met:
+ * 
+ *  * Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 
+ *  * Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ *  * Neither the name of 'jMonkeyEngine' nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ * 
+ *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ *  TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ *  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package com.jme3.gde.core.sceneexplorer.nodes;
+
+import com.jme3.gde.core.scene.SceneApplication;
+import com.jme3.scene.Spatial;
+import com.jme3.scene.control.Control;
+import java.io.IOException;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutionException;
+import javax.swing.Action;
+import org.openide.actions.DeleteAction;
+import org.openide.loaders.DataObject;
+import org.openide.nodes.Children;
+import org.openide.nodes.Node;
+import org.openide.util.Exceptions;
+import org.openide.util.actions.SystemAction;
+
+/**
+ * The JmeControl implements the Base Behavior of each Control-Node
+ * @author MeFisto94
+ */
+
+
+public abstract class JmeControl extends AbstractSceneExplorerNode {
+
+    protected Control control;
+    public JmeControl() {
+        super();
+    }
+
+    public JmeControl(Children children, DataObject dataObject) {
+        super(children, dataObject);
+    }
+
+    public JmeControl(DataObject dataObject) {
+        super(dataObject);
+    }
+
+    public JmeControl(Children children) {
+        super(children);
+    }
+    
+    @Override
+    public Action[] getActions(boolean context) {
+        return new SystemAction[]{
+                    //                    SystemAction.get(CopyAction.class),
+                    //                    SystemAction.get(CutAction.class),
+                    //                    SystemAction.get(PasteAction.class),
+                    SystemAction.get(DeleteAction.class)
+                };
+    }
+
+    @Override
+    public boolean canDestroy() {
+        return !readOnly;
+    }
+    
+    @Override
+    public void destroy() throws IOException {
+        super.destroy();
+        
+        if (control == null)
+            return;
+        
+        final Spatial spat = getParentNode().getLookup().lookup(Spatial.class);
+        try {
+            fireSave(true);
+            SceneApplication.getApplication().enqueue(new Callable<Void>() {
+
+                public Void call() throws Exception {
+                    spat.removeControl(control);
+                    return null;
+                }
+            }).get();
+            ((AbstractSceneExplorerNode) getParentNode()).refresh(true);
+        } catch (InterruptedException ex) {
+            Exceptions.printStackTrace(ex);
+        } catch (ExecutionException ex) {
+            Exceptions.printStackTrace(ex);
+        }
+    }
+    
+    /* Controls have a parental node containing them */
+    @Override
+    protected void fireSave(boolean modified) {
+        super.fireSave(true);
+        Node parent = getParentNode();
+        if (parent instanceof AbstractSceneExplorerNode) {
+            AbstractSceneExplorerNode par=(AbstractSceneExplorerNode)parent;
+            par.fireSave(modified);
+        }
+    }
+}

+ 4 - 42
sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeGenericControl.java

@@ -1,5 +1,5 @@
 /*
- *  Copyright (c) 2009-2010 jMonkeyEngine
+ *  Copyright (c) 2009-2016 jMonkeyEngine
  *  All rights reserved.
  * 
  *  Redistribution and use in source and binary forms, with or without
@@ -32,29 +32,18 @@
 package com.jme3.gde.core.sceneexplorer.nodes;
 
 import com.jme3.gde.core.icons.IconList;
-import com.jme3.gde.core.properties.ScenePropertyChangeListener;
-import com.jme3.gde.core.scene.SceneApplication;
-import com.jme3.scene.Spatial;
 import com.jme3.scene.control.Control;
 import java.awt.Image;
-import java.io.IOException;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ExecutionException;
-import javax.swing.Action;
-import org.openide.actions.DeleteAction;
 import org.openide.loaders.DataObject;
 import org.openide.nodes.Sheet;
-import org.openide.util.Exceptions;
-import org.openide.util.actions.SystemAction;
 
 /**
  *
  * @author normenhansen
  */
 @SuppressWarnings({"unchecked", "rawtypes"})
-public class JmeGenericControl extends AbstractSceneExplorerNode {
+public class JmeGenericControl extends JmeControl {
 
-    private final Control control;
     private static final Image smallImage = IconList.wheel.getImage();
 
     public JmeGenericControl(Control control, DataObject dataObject) {
@@ -63,6 +52,7 @@ public class JmeGenericControl extends AbstractSceneExplorerNode {
         this.control = control;
         addToLookup(this);
         addToLookup(control);
+        this.control = control;
         setName(control.getClass().getSimpleName());
     }
 
@@ -111,40 +101,12 @@ public class JmeGenericControl extends AbstractSceneExplorerNode {
         sheet.put(set);
     }
 
-    @Override
-    public Action[] getActions(boolean context) {
-        return new SystemAction[]{
-                    //                    SystemAction.get(CopyAction.class),
-                    //                    SystemAction.get(CutAction.class),
-                    //                    SystemAction.get(PasteAction.class),
-                    SystemAction.get(DeleteAction.class)
-                };
-    }
-
     @Override
     public boolean canDestroy() {
         return true;
     }
-
+ 
     @Override
-    public void destroy() throws IOException {
-        super.destroy();
-        final Spatial spat = getParentNode().getLookup().lookup(Spatial.class);
-        try {
-            SceneApplication.getApplication().enqueue(new Callable<Void>() {
-                public Void call() throws Exception {
-                    spat.removeControl(control);
-                    return null;
-                }
-            }).get();
-            ((AbstractSceneExplorerNode) getParentNode()).refresh(true);
-        } catch (InterruptedException ex) {
-            Exceptions.printStackTrace(ex);
-        } catch (ExecutionException ex) {
-            Exceptions.printStackTrace(ex);
-        }
-    }
-    
     public Class getExplorerObjectClass() {
         return control.getClass();
     }

+ 4 - 46
sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeGhostControl.java

@@ -1,5 +1,5 @@
 /*
- *  Copyright (c) 2009-2010 jMonkeyEngine
+ *  Copyright (c) 2009-2016 jMonkeyEngine
  *  All rights reserved.
  * 
  *  Redistribution and use in source and binary forms, with or without
@@ -34,20 +34,11 @@ package com.jme3.gde.core.sceneexplorer.nodes;
 import com.jme3.bullet.collision.shapes.CollisionShape;
 import com.jme3.bullet.control.GhostControl;
 import com.jme3.gde.core.icons.IconList;
-import com.jme3.gde.core.scene.SceneApplication;
 import com.jme3.math.Quaternion;
 import com.jme3.math.Vector3f;
-import com.jme3.scene.Spatial;
 import java.awt.Image;
-import java.io.IOException;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ExecutionException;
-import javax.swing.Action;
-import org.openide.actions.DeleteAction;
 import org.openide.loaders.DataObject;
 import org.openide.nodes.Sheet;
-import org.openide.util.Exceptions;
-import org.openide.util.actions.SystemAction;
 
 /**
  *
@@ -55,7 +46,7 @@ import org.openide.util.actions.SystemAction;
  */
 @org.openide.util.lookup.ServiceProvider(service=SceneExplorerNode.class)
 @SuppressWarnings({"unchecked", "rawtypes"})
-public class JmeGhostControl extends AbstractSceneExplorerNode {
+public class JmeGhostControl extends JmeControl {
 
     private static Image smallImage = IconList.ghostControl.getImage();
     private GhostControl geom;
@@ -68,6 +59,7 @@ public class JmeGhostControl extends AbstractSceneExplorerNode {
         getLookupContents().add(this);
         getLookupContents().add(spatial);
         this.geom = spatial;
+        control = spatial;
         setName("GhostControl");
     }
 
@@ -81,41 +73,6 @@ public class JmeGhostControl extends AbstractSceneExplorerNode {
         return smallImage;
     }
 
-    @Override
-    public Action[] getActions(boolean context) {
-        return new SystemAction[]{
-                    //                    SystemAction.get(CopyAction.class),
-                    //                    SystemAction.get(CutAction.class),
-                    //                    SystemAction.get(PasteAction.class),
-                    SystemAction.get(DeleteAction.class)
-                };
-    }
-
-    @Override
-    public boolean canDestroy() {
-        return !readOnly;
-    }
-
-    @Override
-    public void destroy() throws IOException {
-        super.destroy();
-        final Spatial spat=getParentNode().getLookup().lookup(Spatial.class);
-        try {
-            SceneApplication.getApplication().enqueue(new Callable<Void>() {
-
-                public Void call() throws Exception {
-                    spat.removeControl(geom);
-                    return null;
-                }
-            }).get();
-            ((AbstractSceneExplorerNode)getParentNode()).refresh(true);
-        } catch (InterruptedException ex) {
-            Exceptions.printStackTrace(ex);
-        } catch (ExecutionException ex) {
-            Exceptions.printStackTrace(ex);
-        }
-    }
-
     @Override
     protected Sheet createSheet() {
         Sheet sheet = super.createSheet();
@@ -139,6 +96,7 @@ public class JmeGhostControl extends AbstractSceneExplorerNode {
 
     }
 
+    @Override
     public Class getExplorerObjectClass() {
         return GhostControl.class;
     }

+ 4 - 46
sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeRigidBodyControl.java

@@ -1,5 +1,5 @@
 /*
- *  Copyright (c) 2009-2010 jMonkeyEngine
+ *  Copyright (c) 2009-2016 jMonkeyEngine
  *  All rights reserved.
  * 
  *  Redistribution and use in source and binary forms, with or without
@@ -34,20 +34,11 @@ package com.jme3.gde.core.sceneexplorer.nodes;
 import com.jme3.bullet.collision.shapes.CollisionShape;
 import com.jme3.bullet.control.RigidBodyControl;
 import com.jme3.gde.core.icons.IconList;
-import com.jme3.gde.core.scene.SceneApplication;
 import com.jme3.math.Quaternion;
 import com.jme3.math.Vector3f;
-import com.jme3.scene.Spatial;
 import java.awt.Image;
-import java.io.IOException;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ExecutionException;
-import javax.swing.Action;
-import org.openide.actions.DeleteAction;
 import org.openide.loaders.DataObject;
 import org.openide.nodes.Sheet;
-import org.openide.util.Exceptions;
-import org.openide.util.actions.SystemAction;
 
 /**
  *
@@ -55,7 +46,7 @@ import org.openide.util.actions.SystemAction;
  */
 @org.openide.util.lookup.ServiceProvider(service=SceneExplorerNode.class)
 @SuppressWarnings({"unchecked", "rawtypes"})
-public class JmeRigidBodyControl extends AbstractSceneExplorerNode {
+public class JmeRigidBodyControl extends JmeControl {
 
     private static Image smallImage = IconList.physicsControl.getImage();
     private RigidBodyControl geom;
@@ -68,6 +59,7 @@ public class JmeRigidBodyControl extends AbstractSceneExplorerNode {
         getLookupContents().add(spatial);
         getLookupContents().add(this);
         this.geom = spatial;
+        control = spatial;
         setName("PhysicsControl");
     }
 
@@ -81,41 +73,6 @@ public class JmeRigidBodyControl extends AbstractSceneExplorerNode {
         return smallImage;
     }
 
-    @Override
-    public Action[] getActions(boolean context) {
-        return new SystemAction[]{
-                    //                    SystemAction.get(CopyAction.class),
-                    //                    SystemAction.get(CutAction.class),
-                    //                    SystemAction.get(PasteAction.class),
-                    SystemAction.get(DeleteAction.class)
-                };
-    }
-
-    @Override
-    public boolean canDestroy() {
-        return !readOnly;
-    }
-
-    @Override
-    public void destroy() throws IOException {
-        super.destroy();
-        final Spatial spat=getParentNode().getLookup().lookup(Spatial.class);
-        try {
-            SceneApplication.getApplication().enqueue(new Callable<Void>() {
-
-                public Void call() throws Exception {
-                    spat.removeControl(geom);
-                    return null;
-                }
-            }).get();
-            ((AbstractSceneExplorerNode)getParentNode()).refresh(true);
-        } catch (InterruptedException ex) {
-            Exceptions.printStackTrace(ex);
-        } catch (ExecutionException ex) {
-            Exceptions.printStackTrace(ex);
-        }
-    }
-
     @Override
     protected Sheet createSheet() {
         Sheet sheet = super.createSheet();
@@ -150,6 +107,7 @@ public class JmeRigidBodyControl extends AbstractSceneExplorerNode {
 
     }
 
+    @Override
     public Class getExplorerObjectClass() {
         return RigidBodyControl.class;
     }

+ 3 - 45
sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeSkeletonControl.java

@@ -1,5 +1,5 @@
 /*
- *  Copyright (c) 2009-2010 jMonkeyEngine
+ *  Copyright (c) 2009-2016 jMonkeyEngine
  *  All rights reserved.
  *
  *  Redistribution and use in source and binary forms, with or without
@@ -33,19 +33,10 @@ package com.jme3.gde.core.sceneexplorer.nodes;
 
 import com.jme3.animation.SkeletonControl;
 import com.jme3.gde.core.icons.IconList;
-import com.jme3.gde.core.scene.SceneApplication;
-import com.jme3.scene.Spatial;
 import java.awt.Image;
-import java.io.IOException;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ExecutionException;
-import javax.swing.Action;
-import org.openide.actions.DeleteAction;
 import org.openide.loaders.DataObject;
 import org.openide.nodes.Node;
 import org.openide.nodes.Sheet;
-import org.openide.util.Exceptions;
-import org.openide.util.actions.SystemAction;
 
 /**
  *
@@ -53,7 +44,7 @@ import org.openide.util.actions.SystemAction;
  */
 @org.openide.util.lookup.ServiceProvider(service = SceneExplorerNode.class)
 @SuppressWarnings({"unchecked", "rawtypes"})
-public class JmeSkeletonControl extends AbstractSceneExplorerNode {
+public class JmeSkeletonControl extends JmeControl {
 
     private SkeletonControl skeletonControl;
     private static Image smallImage = IconList.skeletonControl.getImage();
@@ -64,6 +55,7 @@ public class JmeSkeletonControl extends AbstractSceneExplorerNode {
     public JmeSkeletonControl(SkeletonControl skeletonControl, JmeBoneChildren children) {
         super(children);
         this.skeletonControl = skeletonControl;
+        control = skeletonControl;
         lookupContents.add(this);
         lookupContents.add(skeletonControl);
         setName("SkeletonControl");
@@ -99,40 +91,6 @@ public class JmeSkeletonControl extends AbstractSceneExplorerNode {
     }
 
     @Override
-    public Action[] getActions(boolean context) {
-        return new SystemAction[]{
-                    //                    SystemAction.get(CopyAction.class),
-                    //                    SystemAction.get(CutAction.class),
-                    //                    SystemAction.get(PasteAction.class),
-                    SystemAction.get(DeleteAction.class)
-                };
-    }
-
-    @Override
-    public boolean canDestroy() {
-        return !readOnly;
-    }
-
-    @Override
-    public void destroy() throws IOException {
-        super.destroy();
-        final Spatial spat = getParentNode().getLookup().lookup(Spatial.class);
-        try {
-            SceneApplication.getApplication().enqueue(new Callable<Void>() {
-
-                public Void call() throws Exception {
-                    spat.removeControl(skeletonControl);
-                    return null;
-                }
-            }).get();
-            ((AbstractSceneExplorerNode) getParentNode()).refresh(true);
-        } catch (InterruptedException ex) {
-            Exceptions.printStackTrace(ex);
-        } catch (ExecutionException ex) {
-            Exceptions.printStackTrace(ex);
-        }
-    }
-
     public Class getExplorerObjectClass() {
         return SkeletonControl.class;
     }

+ 4 - 29
sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeTerrainLodControl.java

@@ -1,5 +1,5 @@
 /*
- *  Copyright (c) 2009-2010 jMonkeyEngine
+ *  Copyright (c) 2009-2016 jMonkeyEngine
  *  All rights reserved.
  * 
  *  Redistribution and use in source and binary forms, with or without
@@ -34,12 +34,10 @@ package com.jme3.gde.core.sceneexplorer.nodes;
 
 import com.jme3.gde.core.icons.IconList;
 import com.jme3.gde.core.scene.SceneApplication;
-import com.jme3.scene.Spatial;
 import com.jme3.terrain.geomipmap.TerrainLodControl;
 import com.jme3.terrain.geomipmap.lodcalc.DistanceLodCalculator;
 import com.jme3.terrain.geomipmap.lodcalc.PerspectiveLodCalculator;
 import java.awt.Image;
-import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.concurrent.Callable;
@@ -58,7 +56,7 @@ import org.openide.util.actions.SystemAction;
  */
 @org.openide.util.lookup.ServiceProvider(service=SceneExplorerNode.class)
 @SuppressWarnings({"unchecked", "rawtypes"})
-public class JmeTerrainLodControl extends AbstractSceneExplorerNode {
+public class JmeTerrainLodControl extends JmeControl {
     
     private static Image smallImage = IconList.wheel.getImage();
     private TerrainLodControl terrainLodControl;
@@ -71,6 +69,7 @@ public class JmeTerrainLodControl extends AbstractSceneExplorerNode {
         getLookupContents().add(control);
         getLookupContents().add(this);
         this.terrainLodControl = control;
+        this.control = control;
         setName("TerrainLodControl");
     }
     
@@ -94,31 +93,6 @@ public class JmeTerrainLodControl extends AbstractSceneExplorerNode {
                 };
     }
 
-    @Override
-    public boolean canDestroy() {
-        return !readOnly;
-    }
-
-    @Override
-    public void destroy() throws IOException {
-        super.destroy();
-        final Spatial spat = getParentNode().getLookup().lookup(Spatial.class);
-        try {
-            SceneApplication.getApplication().enqueue(new Callable<Void>() {
-
-                public Void call() throws Exception {
-                    spat.removeControl(terrainLodControl);
-                    return null;
-                }
-            }).get();
-            ((AbstractSceneExplorerNode) getParentNode()).refresh(true);
-        } catch (InterruptedException ex) {
-            Exceptions.printStackTrace(ex);
-        } catch (ExecutionException ex) {
-            Exceptions.printStackTrace(ex);
-        }
-    }
-
     @Override
     protected Sheet createSheet() {
         Sheet sheet = super.createSheet();
@@ -137,6 +111,7 @@ public class JmeTerrainLodControl extends AbstractSceneExplorerNode {
 
     }
 
+    @Override
     public Class getExplorerObjectClass() {
         return TerrainLodControl.class;
     }

+ 4 - 39
sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeVehicleControl.java

@@ -1,5 +1,5 @@
 /*
- *  Copyright (c) 2009-2010 jMonkeyEngine
+ *  Copyright (c) 2009-2016 jMonkeyEngine
  *  All rights reserved.
  * 
  *  Redistribution and use in source and binary forms, with or without
@@ -38,9 +38,7 @@ import com.jme3.gde.core.icons.IconList;
 import com.jme3.gde.core.scene.SceneApplication;
 import com.jme3.math.Quaternion;
 import com.jme3.math.Vector3f;
-import com.jme3.scene.Spatial;
 import java.awt.Image;
-import java.io.IOException;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.concurrent.Callable;
@@ -60,7 +58,7 @@ import org.openide.util.actions.SystemAction;
  */
 @org.openide.util.lookup.ServiceProvider(service = SceneExplorerNode.class)
 @SuppressWarnings({"unchecked", "rawtypes"})
-public class JmeVehicleControl extends AbstractSceneExplorerNode {
+public class JmeVehicleControl extends JmeControl {
 
     private static Image smallImage = IconList.vehicle.getImage();
     private VehicleControl vehicle;
@@ -73,6 +71,7 @@ public class JmeVehicleControl extends AbstractSceneExplorerNode {
         getLookupContents().add(vehicle);
         getLookupContents().add(this);
         this.vehicle = vehicle;
+        control = vehicle;
         setName("VehicleControl");
     }
 
@@ -86,41 +85,6 @@ public class JmeVehicleControl extends AbstractSceneExplorerNode {
         return smallImage;
     }
 
-    @Override
-    public Action[] getActions(boolean context) {
-        return new SystemAction[]{
-                    //                    SystemAction.get(CopyAction.class),
-                    //                    SystemAction.get(CutAction.class),
-                    //                    SystemAction.get(PasteAction.class),
-                    SystemAction.get(DeleteAction.class)
-                };
-    }
-
-    @Override
-    public boolean canDestroy() {
-        return !readOnly;
-    }
-
-    @Override
-    public void destroy() throws IOException {
-        super.destroy();
-        final Spatial spat = getParentNode().getLookup().lookup(Spatial.class);
-        try {
-            SceneApplication.getApplication().enqueue(new Callable<Void>() {
-
-                public Void call() throws Exception {
-                    spat.removeControl(vehicle);
-                    return null;
-                }
-            }).get();
-            ((AbstractSceneExplorerNode) getParentNode()).refresh(true);
-        } catch (InterruptedException ex) {
-            Exceptions.printStackTrace(ex);
-        } catch (ExecutionException ex) {
-            Exceptions.printStackTrace(ex);
-        }
-    }
-
     @Override
     protected Sheet createSheet() {
         Sheet sheet = super.createSheet();
@@ -162,6 +126,7 @@ public class JmeVehicleControl extends AbstractSceneExplorerNode {
 
     }
 
+    @Override
     public Class getExplorerObjectClass() {
         return VehicleControl.class;
     }

+ 5 - 0
sdk/jme3-materialeditor/src/com/jme3/gde/materialdefinition/editor/MatDefEditorlElement.java

@@ -272,6 +272,11 @@ public final class MatDefEditorlElement extends JPanel implements MultiViewEleme
 
     protected void selectionChanged(Selectable selectable) {
         MatDefNavigatorPanel nav = obj.getLookup().lookup(MatDefNavigatorPanel.class);
+        //It's possible that the navigator is null if it's collapsed in the ui.
+        //In that case we early return to avoid further issues
+        if(nav == null){
+            return;
+        }
         try {
             Node n = findNode(nav.getExplorerManager().getRootContext(), selectable.getKey());
             if (n == null) {

+ 1 - 1
sdk/jme3-welcome-screen/src/com/jme3/gde/welcome/WelcomeScreenTopComponent.java

@@ -38,7 +38,7 @@ persistenceType = TopComponent.PERSISTENCE_ALWAYS)
 @ActionID(category = "Window", id = "com.jme3.gde.welcome.WelcomeScreenTopComponent")
 @ActionReference(path = "Menu/Window" /*, position = 333 */)
 @TopComponent.OpenActionRegistration(
-    displayName = "#CTL_WelcomeScreenAction",
+    displayName = "CTL_WelcomeScreenAction", /* No # since it's not part of the Bundles.properties. See http://bits.netbeans.org/dev/javadoc/org-openide-awt/org/openide/awt/ActionRegistration.html#displayName-- */
 preferredID = "WelcomeScreenTopComponent")
 @Messages({
     "CTL_WelcomeScreenAction=Info Screen",