forked from bartvdbraak/blender
[#18329] VRML import on indexedfaceset munges some colors (off by one)
Thanks to Ezra Peisach for including a patch in the report.
This commit is contained in:
parent
956d120098
commit
d91d64d807
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user