- fix AssetPack preview

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8111 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
nor..67 14 years ago
parent 1fba65668b
commit fd00230408
  1. 9
      sdk/jme3-assetpack-support/src/com/jme3/gde/assetpack/actions/PreviewAssetAction.java

@ -17,8 +17,11 @@ import java.beans.PropertyChangeListener;
import java.util.logging.Level; import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
import javax.swing.Action; import javax.swing.Action;
import org.netbeans.api.project.Project;
import org.openide.loaders.DataObject; import org.openide.loaders.DataObject;
import org.openide.loaders.DataObjectNotFoundException;
import org.openide.nodes.Node; import org.openide.nodes.Node;
import org.openide.util.Exceptions;
import org.w3c.dom.Element; import org.w3c.dom.Element;
public final class PreviewAssetAction implements Action { public final class PreviewAssetAction implements Action {
@ -43,7 +46,11 @@ public final class PreviewAssetAction implements Action {
JmeNode jmeNode = NodeUtility.createNode(node); JmeNode jmeNode = NodeUtility.createNode(node);
SceneApplication app = SceneApplication.getApplication(); SceneApplication app = SceneApplication.getApplication();
SceneRequest request = new SceneRequest(app, jmeNode, pm); SceneRequest request = new SceneRequest(app, jmeNode, pm);
request.setDataObject(context.getLookup().lookup(DataObject.class)); try {
request.setDataObject(DataObject.find(context.getLookup().lookup(Project.class).getProjectDirectory()));
} catch (DataObjectNotFoundException ex) {
Exceptions.printStackTrace(ex);
}
request.setWindowTitle("AssetPack - PreView Model"); request.setWindowTitle("AssetPack - PreView Model");
app.requestScene(request); app.requestScene(request);

Loading…
Cancel
Save