[Bf-extensions-cvs] [e0b5cf1] master: Cleanup Comment for vertex color was repeated inside the vertex loop creating unnecessary comments.

Maurice Raybaud noreply at git.blender.org
Sun Dec 15 12:45:03 CET 2013


Commit: e0b5cf1f21332ffc0f1d45247bc14ce7e86013d4
Author: Maurice Raybaud
Date:   Sun Dec 15 12:35:11 2013 +0100
http://developer.blender.org/rBAe0b5cf1f21332ffc0f1d45247bc14ce7e86013d4

Cleanup
Comment for vertex color was repeated inside the vertex loop creating unnecessary comments.

===================================================================

M	render_povray/render.py

===================================================================

diff --git a/render_povray/render.py b/render_povray/render.py
index 3108b4a..cdccf23 100644
--- a/render_povray/render.py
+++ b/render_povray/render.py
@@ -1131,6 +1131,8 @@ def write_pov(filename, scene=None, info_callback=None):
                 tabWrite("texture_list {\n")
                 tabWrite("%d\n" % (((len(me_faces)-quadCount) * 3 )+ quadCount * 4)) # works only with tris and quad mesh for now
                 VcolIdx=0
+                if comments:
+                    file.write("\n  //Vertex colors: one simple pigment texture per vertex\n")
                 for fi, f in enumerate(me_faces):
                     # annoying, index may be invalid
                     material_index = f.material_index
@@ -1151,8 +1153,6 @@ def write_pov(filename, scene=None, info_callback=None):
                             key = col[0], col[1], col[2], material_index  # Material index!
                             VcolIdx+=1
                             vertCols[key] = [VcolIdx]
-                            if comments:
-                                file.write("\n  //Vertex colors: one simple pigment texture per vertex\n")
                             if linebreaksinlists:
                                 tabWrite("texture {pigment{ color rgb <%6f,%6f,%6f> }}\n" % (col[0], col[1], col[2]))
                             else:



More information about the Bf-extensions-cvs mailing list