[#18323] VRML import will not import colors if pervertexcolors set (comparison reversed)
authorCampbell Barton <ideasman42@gmail.com>
Mon, 23 Feb 2009 12:17:34 +0000 (12:17 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 23 Feb 2009 12:17:34 +0000 (12:17 +0000)
thanks to ´╗┐Ezra Peisach for fixing.

release/scripts/import_web3d.py

index 28bc1a40ef080c67a9fd9ae38f698d9b87c864d2..87a259cbe56b922ea647be078e84781f64b261be 100755 (executable)
@@ -1758,7 +1758,7 @@ def importMesh_IndexedFaceSet(geom, bpyima, ancestry):
                                                        print '\tWarning: per vertex color index out of range'
                                                        continue
                                        
-                                       if len(ifs_vcol) < color_index:
+                                       if color_index < len(ifs_vcol):
                                                c.r, c.g, c.b = ifs_vcol[color_index]
                                        else:
                                                #print '\tWarning: per face color index out of range'