Hello,
I’m trying to modify the OBJ exporter to include vertex color in its own set of lines starting with vc.
I’m still incredibly new to python but I was able to modify it to the point that it outputs a color for each vertex.
Unfortunately it doesn’t output correctly and a lot of the vertex colors are lost. I don’t think I’m understanding the process for reading the vertex color values. The modification I made is fairly simple, the addition is below:
# Vert Color
vcol_data = me.vertex_colors.active.data
for l in me_verts:
col = vcol_data[l.index].color[:]
fw('vc %.6f %.6f %.6f
' % col[:])
subprogress2.step()
I slipped this in between the vertex and normal output blocks within export_obj.py.
It’s not throwing errors and outputs a file successfully.
Would somebody kindly explain where I’m messing this up?