SDK:
- Add some more logging to ImportModel git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10221 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
3af23e94f2
commit
ab8af25455
@ -265,16 +265,20 @@ public final class ImportModel implements ActionListener {
|
|||||||
AssetKey curKey = tex.getKey();
|
AssetKey curKey = tex.getKey();
|
||||||
UberAssetInfo newInfo = UberAssetLocator.getInfo(curKey);
|
UberAssetInfo newInfo = UberAssetLocator.getInfo(curKey);
|
||||||
if (newInfo != null) {
|
if (newInfo != null) {
|
||||||
logger.log(Level.INFO, "Create new key with name {0}", newInfo.getNewAssetName());
|
if (newInfo.getNewAssetName() != null) {
|
||||||
TextureKey newKey = new TextureKey(newInfo.getNewAssetName());
|
logger.log(Level.INFO, "Create new key with name {0}", newInfo.getNewAssetName());
|
||||||
Beans.copyProperties(curKey, newKey);
|
TextureKey newKey = new TextureKey(newInfo.getNewAssetName());
|
||||||
Texture texture = mgr.loadTexture(newKey);
|
Beans.copyProperties(curKey, newKey);
|
||||||
if (texture != null) {
|
Texture texture = mgr.loadTexture(newKey);
|
||||||
mat.setTextureParam(paramName, paramType, texture);
|
if (texture != null) {
|
||||||
geom.setMaterial(mat);
|
mat.setTextureParam(paramName, paramType, texture);
|
||||||
logger.log(Level.INFO, "Apply relocated texture {0} for {1}", new Object[]{geom, newKey.getName()});
|
geom.setMaterial(mat);
|
||||||
|
logger.log(Level.INFO, "Apply relocated texture {0} for {1}", new Object[]{geom, newKey.getName()});
|
||||||
|
} else {
|
||||||
|
logger.log(Level.WARNING, "Could not find relocated texture!");
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
logger.log(Level.WARNING, "Could not find relocated texture!");
|
logger.log(Level.SEVERE, "Don't have name for previously relocated asset {0}, something went wrong!", curKey);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user