* Fixed crash in MaterialLoader when handling materials exported from Blender 2.57
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7446 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
0726ad61bf
commit
d7995b4a6a
@ -224,7 +224,13 @@ public class MaterialLoader implements AssetLoader {
|
|||||||
diffuse = readColor();
|
diffuse = readColor();
|
||||||
}
|
}
|
||||||
}else if(keyword.equals("ambient")) {
|
}else if(keyword.equals("ambient")) {
|
||||||
ambient = readColor();
|
if (scan.hasNext("vertexcolour")){
|
||||||
|
// use vertex colors
|
||||||
|
ambient = ColorRGBA.White;
|
||||||
|
scan.next(); // skip it
|
||||||
|
}else{
|
||||||
|
ambient = readColor();
|
||||||
|
}
|
||||||
}else if (keyword.equals("specular")){
|
}else if (keyword.equals("specular")){
|
||||||
specular = new ColorRGBA();
|
specular = new ColorRGBA();
|
||||||
specular.r = scan.nextFloat();
|
specular.r = scan.nextFloat();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user