- fix ProjectAssetManager only considering lowercase suffixes when returning lists of textures, materials etc.

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8366 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
nor..67 14 years ago
parent 7c4f085174
commit 69808ce1a1
  1. 8
      sdk/jme3-core/src/com/jme3/gde/core/assets/ProjectAssetManager.java

@ -124,7 +124,7 @@ public class ProjectAssetManager extends DesktopAssetManager {
ArrayList<String> list = new ArrayList<String>(); ArrayList<String> list = new ArrayList<String>();
while (assets.hasMoreElements()) { while (assets.hasMoreElements()) {
FileObject asset = assets.nextElement(); FileObject asset = assets.nextElement();
if (asset.hasExt("j3m")) { if (asset.getExt().equalsIgnoreCase("j3m")) {
list.add(getRelativeAssetPath(asset.getPath())); list.add(getRelativeAssetPath(asset.getPath()));
} }
} }
@ -140,7 +140,7 @@ public class ProjectAssetManager extends DesktopAssetManager {
ArrayList<String> list = new ArrayList<String>(); ArrayList<String> list = new ArrayList<String>();
while (assets.hasMoreElements()) { while (assets.hasMoreElements()) {
FileObject asset = assets.nextElement(); FileObject asset = assets.nextElement();
if (asset.hasExt("wav") || asset.hasExt("ogg")) { if (asset.getExt().equalsIgnoreCase("wav") || asset.getExt().equalsIgnoreCase("ogg")) {
list.add(getRelativeAssetPath(asset.getPath())); list.add(getRelativeAssetPath(asset.getPath()));
} }
} }
@ -156,7 +156,7 @@ public class ProjectAssetManager extends DesktopAssetManager {
ArrayList<String> list = new ArrayList<String>(); ArrayList<String> list = new ArrayList<String>();
while (assets.hasMoreElements()) { while (assets.hasMoreElements()) {
FileObject asset = assets.nextElement(); FileObject asset = assets.nextElement();
if (asset.hasExt("jpg") || asset.hasExt("jpeg") || asset.hasExt("gif") || asset.hasExt("png") || asset.hasExt("dds") || asset.hasExt("pfm") || asset.hasExt("hdr") || asset.hasExt("tga")) { if (asset.getExt().equalsIgnoreCase("jpg") || asset.getExt().equalsIgnoreCase("jpeg") || asset.getExt().equalsIgnoreCase("gif") || asset.getExt().equalsIgnoreCase("png") || asset.getExt().equalsIgnoreCase("dds") || asset.getExt().equalsIgnoreCase("pfm") || asset.getExt().equalsIgnoreCase("hdr") || asset.getExt().equalsIgnoreCase("tga")) {
list.add(getRelativeAssetPath(asset.getPath())); list.add(getRelativeAssetPath(asset.getPath()));
} }
} }
@ -172,7 +172,7 @@ public class ProjectAssetManager extends DesktopAssetManager {
ArrayList<String> list = new ArrayList<String>(); ArrayList<String> list = new ArrayList<String>();
while (assets.hasMoreElements()) { while (assets.hasMoreElements()) {
FileObject asset = assets.nextElement(); FileObject asset = assets.nextElement();
if (asset.hasExt("j3md")) { if (asset.getExt().equalsIgnoreCase("j3md")) {
list.add(getRelativeAssetPath(asset.getPath())); list.add(getRelativeAssetPath(asset.getPath()));
} }
} }

Loading…
Cancel
Save