Revision: 39906
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39906
Author:   jesterking
Date:     2011-09-04 14:31:23 +0000 (Sun, 04 Sep 2011)
Log Message:
-----------
[#27884] Collada import: materials mismatch when 2 instance_geometry reference 
the same material
Reported by David Roy

Multi-materials used on different meshes would get ignored (resulting in white 
faces in textured view).

Modified Paths:
--------------
    trunk/blender/source/blender/collada/MeshImporter.cpp

Modified: trunk/blender/source/blender/collada/MeshImporter.cpp
===================================================================
--- trunk/blender/source/blender/collada/MeshImporter.cpp       2011-09-04 
12:56:16 UTC (rev 39905)
+++ trunk/blender/source/blender/collada/MeshImporter.cpp       2011-09-04 
14:31:23 UTC (rev 39906)
@@ -796,7 +796,7 @@
        std::multimap<COLLADAFW::UniqueId, COLLADAFW::UniqueId>::iterator it;
        it=materials_mapped_to_geom.find(*geom_uid);
        while(it!=materials_mapped_to_geom.end()) {
-               if(it->second == ma_uid) return NULL; // do nothing if already 
found
+               if(it->second == ma_uid && it->first == *geom_uid) return NULL; 
// do nothing if already found
                it++;
        }
        // first time we get geom_uid, ma_uid pair. Save for later check.

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to