Set location of vertices, accessing object's data

I’m absolutely new beginner, and I’d like to ask some general questions.

  1. Is there a way to access object’s data like position of it’s vertices? (I see[‘something’], but don’t know what to do next).

  2. I’d like to know whether there is an operator to set position of object’s vertices (not move, but set).

I know these are noob questions, but I can’t find any relelvant info on wiki…

Thanks for your time and patience,


Setting and moving vertices is the same exact thing. If you set a location for a vertex you have moved it if the new location is different from the previous location.

import bpy

ob =["Cube"]
me =
for face in me.faces:

for vert in me.vertices:
    new_location =
    new_location[0] = new_location[0] + 1   #X
    new_location[1] = new_location[1] + 1   #Y
    new_location[2] = new_location[2] + 1   #Z = new_location

NOTE: stands for the vertex coordinate.

Comments related to Atoms nice answer:

If you have (x,y,z) the ‘new’ coordinates of your vertex already computed/available
you can use at once: = (x,y,z)
(or if “from mathutils import Vector” is done)
I would write Atoms example as = + Vector((1,1,1))

Thank you both, exactly what I wanted to know.

By the way, this Python integration makes Blender extremely usable, I’m planning to create a module to calculate triangle’s sides and angles :).


angles and lengths are already ‘built in’ use in 3DView and type N (such that the right options are visible) and under Display in edit-mode you can see angles and length …(select works too!)

Though I do not know yet to get the measurements to Python …

which version of Blender are you using? I can’t find anyting like it. The display section of “N panel” doesn’t seem to contain any information about angles or lenghts. I attached a screen to see what am I missing…

//edit: the whole thing shouldn’t be hard to do in Python, we know coordinates of all points, so we can easily get the rest.



moment …

Just compile 2.61 :wink:

this is while dragging the vertices, if finished, less is shown (only used selection used)!

You may need to run this little script first. Then open up Mesh Display.

import bpy = True

Setting debug = True gets you some extra numerics.

I am already using Blender 2.61, but turning on debugging fixed it. Great. (Looks like I won’t even have to, actually, do any work after all :D).

Thanks for your help,