Featured post

new redirect for blender.org bpy docs.

http://www.blender.org/api/blender_python_api_current/ As of 10/11 november 2015 we can now link to the current api docs and not be worr...

July 22, 2012

Grease Pencil for Blender

This post might only be a placeholder for some bpy. The snippet accesses a point on the first grease pencil object, on layer 0 and stroke 0.
bpy.data.grease_pencil[0].layers[0].active_frame.strokes[0].points[0].co
>>> Vector((-4.293455123901367, -2.6403982639312744, -0.5711002945899963))

# and modify in place
bpy.data.grease_pencil[0].layers[0].active_frame.strokes[0].points[0].co.x += .2

# to see the update you must do something inside blender 
# to instigate a redraw/update, i usually do a 3dview rotation.