script was adding UV's rather then vertex Colors (this was correct before uv & vcol...
authorCampbell Barton <ideasman42@gmail.com>
Tue, 30 Dec 2008 08:25:36 +0000 (08:25 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 30 Dec 2008 08:25:36 +0000 (08:25 +0000)
release/scripts/vertexpaint_from_material.py

index 2df5b7e721fcfe186ddbedd8ba91d939392d46dd..9668c521f3a2553bd0a974d65155bb056dbb2745 100644 (file)
@@ -27,6 +27,7 @@ def matcol(mat):
                int(mat.R*255),\
                int(mat.G*255),\
                int(mat.B*255)
+       else:
                return None
 
 def mat2vcol(PREF_SEL_FACES_ONLY, PREF_ACTOB_ONLY, PREF_MULTIPLY_COLOR):
@@ -47,7 +48,7 @@ def mat2vcol(PREF_SEL_FACES_ONLY, PREF_ACTOB_ONLY, PREF_MULTIPLY_COLOR):
                me= ob.getData(mesh=1)
                
                try:
-                       me.faceUV=True
+                       me.vertexColors=True
                except: # no faces
                        continue