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();
|
||||
UberAssetInfo newInfo = UberAssetLocator.getInfo(curKey);
|
||||
if (newInfo != null) {
|
||||
logger.log(Level.INFO, "Create new key with name {0}", newInfo.getNewAssetName());
|
||||
TextureKey newKey = new TextureKey(newInfo.getNewAssetName());
|
||||
Beans.copyProperties(curKey, newKey);
|
||||
Texture texture = mgr.loadTexture(newKey);
|
||||
if (texture != null) {
|
||||
mat.setTextureParam(paramName, paramType, texture);
|
||||
geom.setMaterial(mat);
|
||||
logger.log(Level.INFO, "Apply relocated texture {0} for {1}", new Object[]{geom, newKey.getName()});
|
||||
if (newInfo.getNewAssetName() != null) {
|
||||
logger.log(Level.INFO, "Create new key with name {0}", newInfo.getNewAssetName());
|
||||
TextureKey newKey = new TextureKey(newInfo.getNewAssetName());
|
||||
Beans.copyProperties(curKey, newKey);
|
||||
Texture texture = mgr.loadTexture(newKey);
|
||||
if (texture != null) {
|
||||
mat.setTextureParam(paramName, paramType, texture);
|
||||
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 {
|
||||
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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user