Is there any way to set a layer transform? Or, alternatively to get the rotation, scale and translation values of a transform?
Basically I'm wanting to take the transforms from a parent, remove them from the parent and apply them to the child. I see GetLayerTransform, but I don't see a SetLayerTransform, or a matrix variable in the Moho Layer. I do see the translation, scale and rotation values in the Moho Layer. I guess I can accumulate those, but it seemed like the tools were using the matrix. At this point I'm guessing that they're using the matrix for the world to screen tranformations only but I'm hoping someone can show me something simple that I'm overlooking.
Thanks.
Set Layer Transform?
Moderators: Víctor Paredes, Belgarath, slowtiger
- strider2000
- Posts: 506
- Joined: Sat Mar 07, 2015 5:14 pm
- Contact:
Re: Set Layer Transform?
Did You solve the problem?strider2000 wrote: Basically I'm wanting to take the transforms from a parent, remove them from the parent and apply them to the child.
I tried to do the same and it seems to me I did.(But only for layers with no shear transform and no XY rotation)
- hayasidist
- Posts: 3521
- Joined: Wed Feb 16, 2011 8:12 pm
- Location: Kent, England
Re: Set Layer Transform?
Hi Alexandra. I got a long way with all that in my "bake" script -- http://www.mediafire.com/file/ob4vvnin58ovccz/Bake.zip - more here: viewtopic.php?f=9&t=28275&p=160048
Re: Set Layer Transform?
Thank You very much, I did not know about this script.
It has no conversion from matrix to position, rotation and so on, but it seems to me now this conversion is not necessary.
It has no conversion from matrix to position, rotation and so on, but it seems to me now this conversion is not necessary.
- hayasidist
- Posts: 3521
- Joined: Wed Feb 16, 2011 8:12 pm
- Location: Kent, England
Re: Set Layer Transform?
there's more here on "splitting" the layer transform matrix into rotation / translation / shear / scale / flip: http://www.kelleytown.com/forum/animato ... IC_ID=2201 if that's useful