SDK:
- improve Model Importer deletion file check git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10181 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
458c623f57
commit
9102610da6
@ -143,14 +143,14 @@ public final class ImportModel implements ActionListener {
|
|||||||
if (fileObj != null) {
|
if (fileObj != null) {
|
||||||
DataObject obj = DataObject.find(fileObj);
|
DataObject obj = DataObject.find(fileObj);
|
||||||
AssetData data = obj.getLookup().lookup(AssetData.class);
|
AssetData data = obj.getLookup().lookup(AssetData.class);
|
||||||
if (data != null) {
|
|
||||||
AssetKey assetKey = data.getAssetKey();
|
|
||||||
if (obj instanceof SpatialAssetDataObject) {
|
if (obj instanceof SpatialAssetDataObject) {
|
||||||
// Delete models that are not J3O.
|
// Delete models that are not J3O.
|
||||||
if (!(obj instanceof BinaryModelDataObject)) {
|
if (!(obj instanceof BinaryModelDataObject)) {
|
||||||
deleteList.add(fileObj);
|
deleteList.add(fileObj);
|
||||||
}
|
}
|
||||||
} else if (!(assetKey instanceof TextureKey)
|
} else if (data != null) {
|
||||||
|
AssetKey assetKey = data.getAssetKey();
|
||||||
|
if (!(assetKey instanceof TextureKey)
|
||||||
&& !(assetKey instanceof MaterialKey)) {
|
&& !(assetKey instanceof MaterialKey)) {
|
||||||
// Also delete anything thats not an image or J3M file.
|
// Also delete anything thats not an image or J3M file.
|
||||||
deleteList.add(fileObj);
|
deleteList.add(fileObj);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user