diff --git a/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/AbstractSceneExplorerNode.java b/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/AbstractSceneExplorerNode.java index 92c960bc5..6ea37e4c0 100644 --- a/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/AbstractSceneExplorerNode.java +++ b/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/AbstractSceneExplorerNode.java @@ -65,34 +65,22 @@ public abstract class AbstractSceneExplorerNode extends AbstractNode implements private final List> sceneProperties = Collections.synchronizedList(new LinkedList>()); public AbstractSceneExplorerNode() { - super(Children.LEAF, new DynamicLookup(new InstanceContent())); - lookupContents = ((DynamicLookup) getLookup()).getInstanceContent(); + this(Children.LEAF, null); } public AbstractSceneExplorerNode(Children children, DataObject dataObject) { - super(children, new ProxyLookup(dataObject.getLookup(), new DynamicLookup(new InstanceContent()))); + super(children, new ProxyLookup(dataObject != null ? dataObject.getLookup() : Lookup.EMPTY, new DynamicLookup(new InstanceContent()))); this.dataObject = dataObject; + this.jmeChildren = children; lookupContents = getLookup().lookup(DynamicLookup.class).getInstanceContent(); } public AbstractSceneExplorerNode(DataObject dataObject) { - super(Children.LEAF, new ProxyLookup(dataObject != null ? dataObject.getLookup() : Lookup.EMPTY, new DynamicLookup(new InstanceContent()))); - this.dataObject = dataObject; - lookupContents = getLookup().lookup(DynamicLookup.class).getInstanceContent(); + this(Children.LEAF, dataObject); } public AbstractSceneExplorerNode(Children children) { - //TODO: OMG! - super(children, children instanceof JmeSpatialChildren - ? (((JmeSpatialChildren) children).getDataObject() != null - ? new ProxyLookup(((JmeSpatialChildren) children).getDataObject().getLookup(), new DynamicLookup(new InstanceContent())) - : new DynamicLookup(new InstanceContent())) - : new DynamicLookup(new InstanceContent())); - this.jmeChildren = children; - lookupContents = getLookup().lookup(DynamicLookup.class).getInstanceContent(); - if (children instanceof JmeSpatialChildren) { - this.dataObject = ((JmeSpatialChildren) children).getDataObject(); - } + this(children, (children instanceof JmeSpatialChildren) ? ((JmeSpatialChildren) children).getDataObject() : null); } public InstanceContent getLookupContents() { diff --git a/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeBone.java b/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeBone.java index eed7de330..df0b8aa69 100644 --- a/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeBone.java +++ b/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeBone.java @@ -63,7 +63,6 @@ public class JmeBone extends AbstractSceneExplorerNode { public JmeBone(JmeSkeletonControl jmeSkeletonControl, Bone bone, JmeBoneChildren children) { super(children); - this.jmeChildren = children; this.jmeSkeletonControl = jmeSkeletonControl; getLookupContents().add(bone); getLookupContents().add(this); diff --git a/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeSpatial.java b/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeSpatial.java index 6d20666f9..75af2c246 100644 --- a/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeSpatial.java +++ b/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeSpatial.java @@ -83,7 +83,6 @@ public class JmeSpatial extends AbstractSceneExplorerNode { public JmeSpatial(Spatial spatial, JmeSpatialChildren factory) { super(factory); - this.jmeChildren = factory; this.spatial = spatial; getLookupContents().add(spatial); getLookupContents().add(this);