Add exception for null data
This commit is contained in:
parent
ce75516c59
commit
3bad878650
|
@ -131,10 +131,17 @@ class UniformsManager extends Trait{
|
||||||
uniformExist = true;
|
uniformExist = true;
|
||||||
var object = Scene.active.root; // Map default texture to scene root
|
var object = Scene.active.root; // Map default texture to scene root
|
||||||
|
|
||||||
iron.data.Data.getImage(texture.default_image_file, function(image: kha.Image) {
|
if(texture.default_image_file == null){
|
||||||
setTextureValue(material, object, texture.link, image);
|
setTextureValue(material, object, texture.link, null);
|
||||||
|
|
||||||
});
|
}
|
||||||
|
else{
|
||||||
|
iron.data.Data.getImage(texture.default_image_file, function(image: kha.Image) {
|
||||||
|
setTextureValue(material, object, texture.link, image);
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
register(Texture);
|
register(Texture);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue