From 50a5ecc00eb4d1ecff76c3ddf307fd4d39f5ff98 Mon Sep 17 00:00:00 2001 From: "nor..67" Date: Thu, 8 Sep 2011 22:31:25 +0000 Subject: [PATCH] - fix relative image locating in blender loader git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8223 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../jme3/scene/plugins/blender/textures/TextureHelper.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/engine/src/blender/com/jme3/scene/plugins/blender/textures/TextureHelper.java b/engine/src/blender/com/jme3/scene/plugins/blender/textures/TextureHelper.java index 18cbae303..e16945618 100644 --- a/engine/src/blender/com/jme3/scene/plugins/blender/textures/TextureHelper.java +++ b/engine/src/blender/com/jme3/scene/plugins/blender/textures/TextureHelper.java @@ -713,8 +713,7 @@ public class TextureHelper extends AbstractBlenderHelper { List assetNames = new ArrayList(); 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()); } }