diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-04-13 10:50:02 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-04-13 10:50:02 +0400 |
commit | d91d64d8071326fe0822a9a31b58126ff2d62c2b (patch) | |
tree | adea171a3cfbbcb50c0b9628a07f9bfbf18c95a4 /release | |
parent | 956d120098f4c9f6440266e6e95800d76c782827 (diff) |
[#18329] VRML import on indexedfaceset munges some colors (off by one)
Thanks to Ezra Peisach for including a patch in the report.
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/import_web3d.py | 3 |
1 files changed, 2 insertions, 1 deletions
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: |