I have a file that define some curves and values from 0 to 1 for each point in the curve. I am trying to create a material which uses this values from 0 to 1 as the UV coordinates for a colormap texture so I can see the values from 0 to 1 as colors in Blender.
I have seen several ways of using generated UV coordinates for the curve, but I haven't found any way of using my own data as UV coordinates.
I have tried something like this, but it doesn't work as a
SplinePoint doesn't have
uv property (or something similar).
curveData = bpy.data.curves.new('myCurve', type='CURVE') curveData.dimensions = '3D' curveData.bevel_resolution = 0 curveData.bevel_depth = 1 curveData.use_uv_as_generated = True polyline = curveData.splines.new(type='POLY') polyline.points.add(len(yarn)-1) for point, node in zip(polyline.points, yarn): position = positions[node] point.co = (position, position, position, 1) point.radius = radii[node] point.uv = blending[node] # Of course, this doesn't work...
Any idea on how I could achieve this?