- check for ProjectAssetManager when adding MaterialOpenSupport

experimental
Normen Hansen 10 years ago
parent 3d8a1d4bad
commit 0167955e80
  1. 4
      sdk/jme3-materialeditor/src/com/jme3/gde/materials/JMEMaterialDataObject.java

@ -32,6 +32,7 @@
package com.jme3.gde.materials; package com.jme3.gde.materials;
import com.jme3.gde.core.assets.AssetDataObject; import com.jme3.gde.core.assets.AssetDataObject;
import com.jme3.gde.core.assets.ProjectAssetManager;
import com.jme3.gde.materials.multiview.MaterialOpenSupport; import com.jme3.gde.materials.multiview.MaterialOpenSupport;
import java.io.IOException; import java.io.IOException;
import org.openide.filesystems.FileObject; import org.openide.filesystems.FileObject;
@ -53,8 +54,9 @@ public class JMEMaterialDataObject extends AssetDataObject {
public JMEMaterialDataObject(FileObject pf, MultiFileLoader loader) throws DataObjectExistsException, IOException { public JMEMaterialDataObject(FileObject pf, MultiFileLoader loader) throws DataObjectExistsException, IOException {
super(pf, loader); super(pf, loader);
CookieSet cookies = getCookieSet(); CookieSet cookies = getCookieSet();
// cookies.add((Node.Cookie) DataEditorSupport.create(this, getPrimaryEntry(), cookies)); if (getLookup().lookup(ProjectAssetManager.class) != null) {
cookies.add((Node.Cookie) new MaterialOpenSupport(getPrimaryEntry())); cookies.add((Node.Cookie) new MaterialOpenSupport(getPrimaryEntry()));
} }
}
} }

Loading…
Cancel
Save