[Bf-committers] obj location & matrix

François T. francoistarlier at gmail.com
Fri Sep 30 00:02:07 CEST 2011


Hello,

I have a script which creates an empty and snap it on each bundles (tomato
branch)
I create the empty like that :

> bpy.ops.object.add(type='EMPTY',view_align=False, enter_editmode=False,
> location=(10,0,0))
> empty_tmp = bpy.context.active_object


later in the code in a loop I change its position like that :

> empty_tmp.location = [20,0,12]


and the empty gets its position updated just fine.

but if I do something like that :

> empty_tmp.matrix_world.to_translation().x


it still return 10 :(

what am I supposed to do there, I don't understand the logic behing that ?


-- 
____________________
François Tarlier
www.francois-tarlier.com
www.linkedin.com/in/francoistarlier


More information about the Bf-committers mailing list