Page 1 of 1
Applying scale and rotation from a script?
Posted: Wed May 09, 2007 12:47 am
Is there an exposed function that will allow me to apply scale and rotation to a scene from python? (The equivalent of hitting Ctrl-A in non-edit mode)
Posted: Thu May 10, 2007 3:58 am
Hello, Ryan. There doesn't appear to be a function already in place to do what you want. However, it's fairly straightforward to accomplish yourself.
Code: Select all
mat = obj.getMatrix()
me = obj.getData(mesh=True)
for v in me.verts:
v.co = v.co*mat
There may be a better way to accomplish this, but it's the best I can come up with. Also, you might try the BlenderArtists.org forum:
It is a bit more frequented, and you may get more and/or better help there.