nathanletwory
(Nathan 'jesterKing' Letwory)
April 24, 2025, 3:23am
31
Multiple mappings and materials per object is not yet implemented, I hope to get that done when I have a bit more time
vcls.extend((m.VertexColors[v][0], m.VertexColors[v][1], m.VertexColors[v][2], m.VertexColors[v][3]) for v in range(len(m.VertexColors)))
tags = utils.create_tag_dict(oa.Id, oa.Name)
mesh = utils.get_or_create_iddata(context.blend_data.meshes, tags, None)
mesh.clear_geometry()
mesh.from_pydata(vertices, [], faces, shade_flat=False)
if mesh.loops and len(coords) == len(vertices):
# todo:
# * check for multiple mappings and handle them
# * get mapping name (missing from rhino3dm)
# * rhino assigns a default mapping to unmapped objects, so if nothing is specified, this will be imported
#create a new uv_layer and copy texcoords from input mesh
mesh.uv_layers.new(name="RhinoUVMap")
if sum(len(x) for x in faces) == len(mesh.uv_layers["RhinoUVMap"].data):
uvl = mesh.uv_layers["RhinoUVMap"].data[:]
for l in mesh.loops:
Not really, this is work not using Blender APIs but rather hack around that, and is prone to break. This particular addon works only until Blender 4.0.