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:
authorCampbell Barton <ideasman42@gmail.com>2012-09-20 16:06:10 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-09-20 16:06:10 +0400
commite659d2f24045ee3a6aafe07e294595d4f2787847 (patch)
treeac609d9fb8677dba9e8aa8c65fc7ce2c41863081 /io_scene_x3d
parent97ab094eb6cf4f321e68486061f8491b6c69ed01 (diff)
fix [#32599] VRML/X3D importer does not handle per vertex color
apply part of the patch included with the report - by Alan Hudson.
Diffstat (limited to 'io_scene_x3d')
-rw-r--r--io_scene_x3d/import_x3d.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/io_scene_x3d/import_x3d.py b/io_scene_x3d/import_x3d.py
index 896e4793..a874ab90 100644
--- a/io_scene_x3d/import_x3d.py
+++ b/io_scene_x3d/import_x3d.py
@@ -2047,6 +2047,7 @@ def importShape(node, ancestry, global_matrix):
texmtx = None
depth = 0 # so we can set alpha face flag later
+ is_vcol = (geom.getChildBySpec('Color') is not None)
if appr:
@@ -2087,6 +2088,8 @@ def importShape(node, ancestry, global_matrix):
bpymat.alpha = 1.0 - mat.getFieldAsFloat('transparency', 0.0, ancestry)
if bpymat.alpha < 0.999:
bpymat.use_transparency = True
+ if is_vcol:
+ bpymat.use_vertex_color_paint = True
if ima:
ima_url = ima.getFieldAsString('url', None, ancestry)