- fix relative image locating in blender loader

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8223 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
nor..67 13 years ago
parent b86c1f4e64
commit 50a5ecc00e
  1. 5
      engine/src/blender/com/jme3/scene/plugins/blender/textures/TextureHelper.java

@ -713,8 +713,7 @@ public class TextureHelper extends AbstractBlenderHelper {
List<String> assetNames = new ArrayList<String>();
if (name.startsWith("//")) {
String relativePath = name.substring(1);
assetNames.add(relativePath);//use relative path to the asset root folder
String relativePath = name.substring(2);
//augument the path with blender key path
BlenderKey blenderKey = dataRepository.getBlenderKey();
String blenderAssetFolder = blenderKey.getName().substring(0, blenderKey.getName().lastIndexOf('/'));
@ -727,7 +726,7 @@ public class TextureHelper extends AbstractBlenderHelper {
for(int i=paths.length-2;i>=0;--i) {
sb.insert(0, '/');
sb.insert(0, paths[i]);
assetNames.add(sb.toString());
assetNames.add(0, sb.toString());
}
}

Loading…
Cancel
Save