Where am I? (0,0,0)?

Hi there,

I would like to write a python script that enables me to animate an armature(s), however, I have no idea how to define a function/class to consider the spatial position within the blender 3D window (x,y,z). Can someone please point me in the right direction on:

  1. Kick start tut on how to animate the armatures?

  2. define / determine the spatial position within the blender 3D window (x,y,z).

Many thanks.

On your item 2, in Blender 2.49 you need to access the object:

ob = Object.Get("Cube")

then you may get its location in 3D coordinates (local):

local_location = ob.loc

or you may take its location in th global XYZ coordinating system like this:

global_loc = ob.loc * ob.mat

where ob.mat is object’s matrix, sometimes called object’s globa,l matrix.

Regards,