[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [34070] trunk/blender/release/scripts/op/ io_scene_x3d/export_x3d.py: fix [#25388] Export to X3D generates texture fields in X3D file for objects

Campbell Barton ideasman42 at gmail.com
Tue Jan 4 16:25:12 CET 2011


Revision: 34070
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=34070
Author:   campbellbarton
Date:     2011-01-04 16:25:12 +0100 (Tue, 04 Jan 2011)

Log Message:
-----------
fix [#25388] Export to X3D generates texture fields in X3D file for objects
use vertex color paint setting to export vertex colors when a material is assigned.

Modified Paths:
--------------
    trunk/blender/release/scripts/op/io_scene_x3d/export_x3d.py

Modified: trunk/blender/release/scripts/op/io_scene_x3d/export_x3d.py
===================================================================
--- trunk/blender/release/scripts/op/io_scene_x3d/export_x3d.py	2011-01-04 15:20:02 UTC (rev 34069)
+++ trunk/blender/release/scripts/op/io_scene_x3d/export_x3d.py	2011-01-04 15:25:12 UTC (rev 34070)
@@ -466,7 +466,7 @@
             #--- output textureCoordinates if UV texture used
             if mesh.uv_textures.active:
                 self.writeTextureCoordinates(mesh)
-            if mesh.vertex_colors.active:
+            if mesh.vertex_colors.active and (mat_first is None or mat_first.use_vertex_color_paint):
                 self.writeFaceColors(mesh)
             #--- output coordinates
             self.writeCoordinates(ob, mesh, meshName, EXPORT_TRI)
@@ -479,7 +479,7 @@
             #--- output textureCoordinates if UV texture used
             if mesh.uv_textures.active:
                 self.writeTextureCoordinates(mesh)
-            if mesh.vertex_colors.active:
+            if mesh.vertex_colors.active and (mat_first is None or mat_first.use_vertex_color_paint):
                 self.writeFaceColors(mesh)
             #--- output vertexColors
 





More information about the Bf-blender-cvs mailing list