forked from bartvdbraak/blender
Skip materials that are invalid.
This commit is contained in:
parent
ed8719bd1f
commit
94b5fd6eb9
@ -912,9 +912,13 @@ Object *MeshImporter::create_mesh_object(COLLADAFW::Node *node, COLLADAFW::Insta
|
|||||||
// loop through geom's materials
|
// loop through geom's materials
|
||||||
for (unsigned int i = 0; i < mat_array.getCount(); i++) {
|
for (unsigned int i = 0; i < mat_array.getCount(); i++) {
|
||||||
|
|
||||||
texture_face = assign_material_to_geom(mat_array[i], uid_material_map, ob, geom_uid,
|
if(mat_array[i].getReferencedMaterial().isValid()) {
|
||||||
&color_texture, layername, texture_face,
|
texture_face = assign_material_to_geom(mat_array[i], uid_material_map, ob, geom_uid,
|
||||||
material_texture_mapping_map, i);
|
&color_texture, layername, texture_face,
|
||||||
|
material_texture_mapping_map, i);
|
||||||
|
} else {
|
||||||
|
fprintf(stderr, "invalid referenced material for %s\n", mat_array[i].getName().c_str());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return ob;
|
return ob;
|
||||||
|
Loading…
Reference in New Issue
Block a user