Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeva Alekseyev <sevaa@nih.gov>2016-03-07 20:53:07 +0300
committerSeva Alekseyev <sevaa@nih.gov>2016-03-07 20:53:07 +0300
commitbb5ff2b9d56af4fc6e52dbf8bdde1daec5717671 (patch)
tree27b4f4180137fbb13e65d18f94797f8656602348 /io_scene_x3d
parent7c8e9546b87301ceeb385c3ef20dc93dc1c84b45 (diff)
Fix for exporting meshes with vertex colors where not all vertices are being used by faces.
Diffstat (limited to 'io_scene_x3d')
-rw-r--r--io_scene_x3d/export_x3d.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/io_scene_x3d/export_x3d.py b/io_scene_x3d/export_x3d.py
index 4f9fecf8..8129dc3e 100644
--- a/io_scene_x3d/export_x3d.py
+++ b/io_scene_x3d/export_x3d.py
@@ -934,7 +934,7 @@ def export(file,
fw('%s<Color color="' % ident)
if is_col_per_vertex:
for i in range(len(mesh.vertices)):
- fw('%.3f %.3f %.3f ' % vert_color[i][:])
+ fw('%.3f %.3f %.3f ' % (vert_color[i][:] if i in vert_color else (0,0,0)))
else: # Export as colors per face.
# TODO: average them rather than using the first one!
for i in face_group: