- check for ProjectAssetManager when adding MaterialOpenSupport
This commit is contained in:
parent
3d8a1d4bad
commit
0167955e80
@ -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…
x
Reference in New Issue
Block a user