Fix for a crash due to mesh faces with wire frame materials not properly handled.
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>
Sat, 16 Mar 2013 16:41:12 +0000 (16:41 +0000)
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>
Sat, 16 Mar 2013 16:41:12 +0000 (16:41 +0000)
A problem report by Vicente Carro through personal communications, many thanks!

source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp

index 2e27eefadcb0abf8f6498e277eda22109003ad09..860c7f5610d9ea0d7267d4b071c919223a333a5a 100644 (file)
@@ -82,7 +82,7 @@ NodeGroup *BlenderFileLoader::Load()
                if (!(obi->lay & _srl->lay))
                        continue;
                char *name = obi->ob->id.name;
-               //cout << name[0] << name[1] << ":" << (name+2) <<;
+               //printf("%c%c:%s\n", name[0], name[1], name+2);
                //print_m4("obi->mat", obi->mat);
 
                if (obi->obr->totvlak > 0) {
@@ -463,6 +463,8 @@ void BlenderFileLoader::insertShapeNode(ObjectInstanceRen *obi, int id)
                        vlr = obr->vlaknodes[p>>8].vlak;
                else
                        vlr++;
+               if (vlr->mat->material_type == MA_TYPE_WIRE)
+                       continue;
                copy_v3_v3(v1, vlr->v1->co);
                copy_v3_v3(v2, vlr->v2->co);
                copy_v3_v3(v3, vlr->v3->co);