if (ex.getMessage().equals(meshFile)) { logger.log(Level.WARNING, "Cannot locate {0} for scene {1}", new Object[]{meshKey, key});
} catch (AssetNotFoundException ex) { if (!ex.getMessage().equals(matName)) { throw ex;
private void applyMaterial(Geometry geom, String matName) { Material mat = null; if (matName == null) { // no material specified. use placeholder. mat = null; } else if (matName.endsWith(".j3m")) { // load as native jme3 material instance try { mat = assetManager.loadMaterial(matName); } catch (AssetNotFoundException ex) { // Warning will be raised (see below) if (!ex.getMessage().equals(matName)) { throw ex; } } } else { if (materialList != null) { mat = materialList.get(matName); } } if (mat == null) { logger.log(Level.WARNING, "Cannot locate {0} for model {1}", new Object[]{matName, key}); mat = PlaceholderAssets.getPlaceholderMaterial(assetManager); //mat.setKey(new MaterialKey(matName)); } if (mat.isTransparent()) { geom.setQueueBucket(Bucket.Transparent); } geom.setMaterial(mat); }
entityNode.attachChild(ogreMesh); } catch (AssetNotFoundException ex) { if (ex.getMessage().equals(meshFile)) { logger.log(Level.WARNING, "Cannot locate {0} for scene {1}", new Object[]{meshKey, key});
private void applyMaterial(Geometry geom, String matName) { Material mat = null; if (matName.endsWith(".j3m")) { // load as native jme3 material instance try { mat = assetManager.loadMaterial(matName); } catch (AssetNotFoundException ex) { // Warning will be raised (see below) if (!ex.getMessage().equals(matName)) { throw ex; } } } else { if (materialList != null) { mat = materialList.get(matName); } } if (mat == null) { logger.log(Level.WARNING, "Cannot locate {0} for model {1}", new Object[]{matName, key}); mat = PlaceholderAssets.getPlaceholderMaterial(assetManager); //mat.setKey(new MaterialKey(matName)); } if (mat.isTransparent()) { geom.setQueueBucket(Bucket.Transparent); } geom.setMaterial(mat); }
entityNode.attachChild(ogreMesh); } catch (AssetNotFoundException ex) { if (ex.getMessage().equals(meshFile)) { logger.log(Level.WARNING, "Cannot locate {0} for scene {1}", new Object[]{meshKey, key});
} catch (AssetNotFoundException ex) { if (!ex.getMessage().equals(matName)) { throw ex;
if (ex.getMessage().equals(meshFile)) { logger.log(Level.WARNING, "Cannot locate {0} for scene {1}", new Object[]{meshKey, key});