I am trying to access skin modifier vertices data. An older solution does not work in my Blender 2.75 / 2.76:
print('has skin=', bool(context.active_object.modifiers['Skin']))
data = context.active_object.data
print(data)
vert = data.skin_vertices
print('skin_vertices=', vert)
v0d = data.skin_vertices[0]
print('skin_vertices[0]=', v0d)
v0d_data = v0d.data
print('skin_vertices_data=', v0d_data)
print('--------loop--------')
for v in v0d_data:
print('skin_vertex=', v)
That returns:
has skin= True
bpy_struct, Mesh("Skin")
skin_vertices= bpy_collection[1], Mesh.skin_vertices
skin_vertices[0]= bpy_struct, MeshSkinVertexLayer("")
skin_vertices_data= bpy_collection[4], MeshSkinVertexLayer.data
--------loop--------
According to python api skin_vertices return MeshSkinVertexLayer
not MeshSkinVertex
, what we see in print data.
Bmesh also has a some skin data BMesh.verts.layers.skin
, but it doesn't return any useful data.
Is there any way to access skin data?
obj.data.skin_vertices[0].data
directly. Edit Mode will not output anything $\endgroup$