[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [3777] trunk/py/scripts/addons/ io_scene_x3d/import_x3d.py: fix [#32599] VRML/ X3D importer does not handle per vertex color
Campbell Barton
ideasman42 at gmail.com
Thu Sep 20 14:06:11 CEST 2012
Revision: 3777
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=3777
Author: campbellbarton
Date: 2012-09-20 12:06:10 +0000 (Thu, 20 Sep 2012)
Log Message:
-----------
fix [#32599] VRML/X3D importer does not handle per vertex color
apply part of the patch included with the report - by Alan Hudson.
Modified Paths:
--------------
trunk/py/scripts/addons/io_scene_x3d/import_x3d.py
Modified: trunk/py/scripts/addons/io_scene_x3d/import_x3d.py
===================================================================
--- trunk/py/scripts/addons/io_scene_x3d/import_x3d.py 2012-09-20 12:03:57 UTC (rev 3776)
+++ trunk/py/scripts/addons/io_scene_x3d/import_x3d.py 2012-09-20 12:06:10 UTC (rev 3777)
@@ -2047,6 +2047,7 @@
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 @@
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)
More information about the Bf-extensions-cvs
mailing list