Have a object (10 disks with 5 round holes in them).
After selecting a cluster of vertex (total 4) the script need to:
Move selected cluster down by 1mm
Select next cluster (to the left) and move them down by 1 mm
Select next cluster (to the left) and move them down by 2 mm
Select next cluster (to the left) and move them down by 3 mm
There are 30 cluster that must be moved down with each cluster down movement incremented by 1 mm
Have selected cluster 1 manually and this script move them down. Need advice how to select cluster 2 to 14 with script.
import bpy
import bmesh
obj=bpy.context.object
if obj.mode == 'EDIT':
bm=bmesh.from_edit_mesh(obj.data)
for v in bm.verts:
if v.select:
print(v.co)
bpy.ops.transform.translate(value=(-0, -0, -0.000100000), orient_type='GLOBAL', orient_matrix=((1, 0, 0), (0, 1, 0), (0, 0, 1)), orient_matrix_type='GLOBAL', constraint_axis=(False, False, True), mirror=True, use_proportional_edit=False, proportional_edit_falloff='SMOOTH', proportional_size=1, use_proportional_connected=False, use_proportional_projected=False, release_confirm=True)
else:
print("Object is not in edit mode.")
Script result
<Vector (-0.0707, -0.8295, 0.3396)>
{'FINISHED'}
<Vector (0.1693, -0.8295, 0.3395)>
{'FINISHED'}
<Vector (-0.1707, -0.8294, 0.3394)>
{'FINISHED'}
<Vector (0.0693, -0.8294, 0.3393)>
{'FINISHED'}