- display warning if asset file is not inside asset folder

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@11004 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
nor..67 2014-01-30 11:06:59 +00:00
parent 43e1446b3a
commit 195a5bfb5b

View File

@ -290,6 +290,9 @@ public class AssetDataObject extends MultiDataObject {
return null; return null;
} }
String assetKey = mgr.getRelativeAssetPath(getPrimaryFile().getPath()); String assetKey = mgr.getRelativeAssetPath(getPrimaryFile().getPath());
if(assetKey != null && assetKey.equals(getPrimaryFile().getPath())){
DialogDisplayer.getDefault().notifyLater(new NotifyDescriptor.Message("File is not in the assets folder!\nPut file in a place that can be\naccessed by the ProjectAssetManager."));
}
this.assetKey = new AssetKey<Object>(assetKey); this.assetKey = new AssetKey<Object>(assetKey);
} }
return assetKey; return assetKey;