From d91d64d8071326fe0822a9a31b58126ff2d62c2b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 13 Apr 2009 06:50:02 +0000 Subject: [PATCH] [#18329] VRML import on indexedfaceset munges some colors (off by one) Thanks to Ezra Peisach for including a patch in the report. --- release/scripts/import_web3d.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/release/scripts/import_web3d.py b/release/scripts/import_web3d.py index 0564257730e..fc3b5262376 100644 --- a/release/scripts/import_web3d.py +++ b/release/scripts/import_web3d.py @@ -1566,7 +1566,8 @@ def importMesh_IndexedFaceSet(geom, bpyima, ancestry): vcolor_spot = None # spot color when we dont have an array of colors if vcolor: # float to char - ifs_vcol = [[int(c*256) for c in col] for col in vcolor.getFieldAsArray('color', 3, ancestry)] + ifs_vcol = [(0,0,0)] # EEKADOODLE - vertex start at 1 + ifs_vcol.extend([[int(c*256) for c in col] for col in vcolor.getFieldAsArray('color', 3, ancestry)]) ifs_color_index = geom.getFieldAsArray('colorIndex', 0, ancestry) if not ifs_vcol: