# Access skin modifier radius data

With Skin Modifier, we can "weight" a vertex (in Edit Mode) so that the resulting Skin mesh is bigger or smaller - similar to Curve objects which has "Scale Feather" adjustable.

Manually, we can hit Tab, go to Edit Mode, select Vertices, then CtrlA and drag.

However, I would like to be able to do this using Python. Does anyone know anything about it?

Reading and writing these values from Python must happen in Object mode. I added a plane and deleted one vertex, added the skin modifier and decreased the radius of one vertex.

>>> obj = bpy.data.objects['Plane']
>>> for v in obj.data.skin_vertices[0].data:
...
(0.25, 0.25)
(0.25, 0.25)
(0.08836718648672104, 0.08836718648672104)


Each element in skin_vertices[0].data has radius, use_loose, use_root to read and write. Radii can be any two element iterable (tuple, list).

import bpy

obj = bpy.data.objects['Plane']
for v in obj.data.skin_vertices[0].data:

• I first thought skin_vertices will contain data for each skin modifier (in case there are more than one), but it always has one element corresponding to first-added skin modifier! BTW great finding! Aug 2 '13 at 18:36