How to deform object using script

by soshi shimada   Last Updated December 24, 2017 14:15 PM

I am writing a script to deform a Plane gradually and save files each time of the deformation. I could do it manually, using edit mode as below.

enter image description here

enter image description here

Then, I wrote code to see how works as below.

import bpy
import bmesh
context = bpy.context
obj = context.edit_object
mesh =

# get a bmesh
bm = bmesh.from_edit_mesh(mesh)
for v in bm.verts:
    if not
    print( 3

However,as might be expected, it translates the only selected vertex like below.

enter image description here

Since I am a beginner,this might be a fool question but if you know how to do this deformation(like "connected"&"Smooth" deformation in edit mode), please help me out.

Related Questions

Mesh appears smooth, however it is not?

Updated May 08, 2015 12:12 PM

Problem with Scaling

Updated March 11, 2017 10:15 AM

How to split one control end of bezier curve

Updated July 07, 2015 12:45 PM

Can we shorten spines on bezier curves?

Updated May 17, 2017 05:15 AM