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.
This commit is contained in:
Campbell Barton
2011-01-04 15:25:12 +00:00
parent a952de66b0
commit 231f3a4e2e

View File

@@ -466,7 +466,7 @@ class x3d_class:
#--- 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 @@ class x3d_class:
#--- 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