|
|
@ -49,7 +49,7 @@ public final class AddToProjectAction implements Action { |
|
|
|
Spatial model = AssetPackLoader.loadAssetPackModel(pm, conf); |
|
|
|
Spatial model = AssetPackLoader.loadAssetPackModel(pm, conf); |
|
|
|
if (model != null) { |
|
|
|
if (model != null) { |
|
|
|
ProjectAssetManager mgr = SceneApplication.getApplication().getCurrentSceneRequest().getManager(); |
|
|
|
ProjectAssetManager mgr = SceneApplication.getApplication().getCurrentSceneRequest().getManager(); |
|
|
|
if (mgr != null) { |
|
|
|
if (mgr != null && mgr != pm) { |
|
|
|
FileObject modelFolder = mgr.getAssetFolder().getFileObject("Models"); |
|
|
|
FileObject modelFolder = mgr.getAssetFolder().getFileObject("Models"); |
|
|
|
if (modelFolder == null) { |
|
|
|
if (modelFolder == null) { |
|
|
|
modelFolder = mgr.getAssetFolder().createFolder("Models"); |
|
|
|
modelFolder = mgr.getAssetFolder().createFolder("Models"); |
|
|
@ -64,7 +64,7 @@ public final class AddToProjectAction implements Action { |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
Logger.getLogger(this.getClass().getName()).log(Level.WARNING, "Cannot copy, file 'Models' exists"); |
|
|
|
Logger.getLogger(this.getClass().getName()).log(Level.WARNING, "Cannot copy, file 'Models' exists"); |
|
|
|
} |
|
|
|
} |
|
|
|
} else{ |
|
|
|
} else { |
|
|
|
Message msg = new NotifyDescriptor.Message( |
|
|
|
Message msg = new NotifyDescriptor.Message( |
|
|
|
"Please open a model from the destination\n" |
|
|
|
"Please open a model from the destination\n" |
|
|
|
+ "project in the SceneExplorer\n" |
|
|
|
+ "project in the SceneExplorer\n" |
|
|
|