@@ -159,6 +159,10 @@ public class J3MLoader implements AssetLoader {
}
}else{
tex = new Texture2D(PlaceholderAssets.getPlaceholderImage());
+ if (repeat){
+ tex.setWrap(WrapMode.Repeat);
+ }
+ tex.setKey(texKey);
return tex;
@@ -183,6 +183,8 @@ public class MTLLoader implements AssetLoader {
} catch (AssetNotFoundException ex){
logger.log(Level.WARNING, "Cannot locate {0} for material {1}", new Object[]{texKey, key});
texture = new Texture2D(PlaceholderAssets.getPlaceholderImage());
+ texture.setWrap(WrapMode.Repeat);
+ texture.setKey(key);
return texture;
@@ -233,6 +233,7 @@ public class MeshLoader extends DefaultHandler implements AssetLoader {
if (mat == null) {
logger.log(Level.WARNING, "Cannot locate {0} for model {1}", new Object[]{matName, key});
mat = PlaceholderAssets.getPlaceholderMaterial(assetManager);
+ mat.setKey(key);
if (mat.isTransparent()) {
@@ -305,7 +305,9 @@ public class SceneLoader extends DefaultHandler implements AssetLoader {
if (ex.getMessage().equals(meshFile)) {
logger.log(Level.WARNING, "Cannot locate {0} for scene {1}", new Object[]{meshKey, key});
// Attach placeholder asset.
- entityNode.attachChild(PlaceholderAssets.getPlaceholderModel(assetManager));
+ Spatial model = PlaceholderAssets.getPlaceholderModel(assetManager);
+ model.setKey(key);
+ entityNode.attachChild(model);
} else {
throw ex;
@@ -83,6 +83,8 @@ public class MaterialExtensionLoader {
tex = new Texture2D( PlaceholderAssets.getPlaceholderImage() );
material.setTexture(jmeParamName, tex);