re locating object in 2.5

you can select the active object with

ob = bpy.context.object

but then how do you re locate the active object in scene?
with new XYZ coordinates ?
or how do you rotate it a certain angle

and is there another way to do this with some BPY.types commands ?

i can see the location for object but no example for this ?

i found the translate one
but in report console it’s very long

i mean is there a short way of writing with only the 3 XYZ location ?

or may be a BPY.types equivalent shorter ?


I don’t know if this is what you mean, but i’ve always done it like this:

bpy.context.active_object.location[0] = 0 #X location
bpy.context.active_object.location[1] =0 # Y location
bpy.context.active_object.location[2] = 0 # Z location

it’s one way Thanks

but is there a way to pass the XYZ values into one line ?

and is there something in the BPY.Types to do the samething?


well i found this one

bpy.context.active_object.location = [x1,y1,0]

but still is there a way to do this with BPY.types?