Animate the origin of layers

Moho allows users to write new tools and plugins. Discuss scripting ideas and problems here.

Moderators: Víctor Paredes, Belgarath, slowtiger

ponysmasher
Posts: 370
Joined: Thu Aug 05, 2004 2:23 am
Location: Los Angeles
Contact:

Animate the origin of layers

Post by ponysmasher »

Just wrote this script and so far it seems to work: Download here

Here's how it works:
YouTube clip
User avatar
GCharb
Posts: 2202
Joined: Mon Oct 10, 2005 2:31 am
Location: Saint-Donat, Quebec, Canada
Contact:

Post by GCharb »

Cool, will have a look at it.

Seems like something that could be useful, already have a few ideas in mind.

Thanks!
jonbo
Posts: 896
Joined: Thu Apr 08, 2010 2:53 am

Post by jonbo »

This looks pretty cool, pony, I'm going to have to play with this one and your camera script. You're putting these out faster then I can get a good handle on them. Thanks for these. Maybe I'll get ahead of your output one of these days :)
User avatar
funksmaname
Posts: 3174
Joined: Tue May 29, 2007 11:31 am
Location: New Zealand

Post by funksmaname »

Nice one Pony! keep on smashin'
User avatar
Víctor Paredes
Site Admin
Posts: 5646
Joined: Wed Jan 26, 2005 12:18 am
Location: Barcelona/Chile
Contact:

Post by Víctor Paredes »

absolutely great!
I'll check tomorrow with more time.
thank you very much!
Image Image Image Image
Moho Product Manager

www.mohoanimation.com
Rigged animation supervisor in My father's dragon - Lead Moho artist in Wolfwalkers - Cartoon Saloon - My personal Youtube Channel
User avatar
uddhava
Posts: 315
Joined: Tue Nov 04, 2008 7:24 pm
Location: American back in Hungary

Post by uddhava »

ponysmasher,

I tried out this script, but when I tried moving the origin it wouldn't move at all. Lua Consule reads....

....error in function 'layer'. argument#2 is 'nil'; 'number' expected.

I have version 8.01 of ASPro and I use Windows 7.

udd

Looks nice though. uddhava
ponysmasher
Posts: 370
Joined: Thu Aug 05, 2004 2:23 am
Location: Los Angeles
Contact:

Post by ponysmasher »

uddhava wrote:ponysmasher,

I tried out this script, but when I tried moving the origin it wouldn't move at all. Lua Consule reads....

....error in function 'layer'. argument#2 is 'nil'; 'number' expected.

I have version 8.01 of ASPro and I use Windows 7.

udd

Looks nice though. uddhava
Did you create a layer with the same name as the layer you want to animate the origin of and add ".origin" to the end?

If the layer where you want to animate the origin is called "My fabulous layer", then you have to create a layer called "My fabulous layer.origin".
The keyframes for the layer have to be stored somewhere so my solution is to store them in that layer.

Oh right, I think the .origin layer also has to be a top layer, that is not inside another layer. Haven't added any code for checking group or bone layers (yet).
User avatar
uddhava
Posts: 315
Joined: Tue Nov 04, 2008 7:24 pm
Location: American back in Hungary

Post by uddhava »

I did what you said and now the origin will move again, but the same error message comes up and it doesn't create a keyframe. It doesn't animate.
jonbo
Posts: 896
Joined: Thu Apr 08, 2010 2:53 am

Post by jonbo »

Hey Udd, you get that error because you are embedding the script on the wrong layer. You embed it on the first layer not the .origin layer. Watch the video again, you'll see what I mean. I did that too at first and got that same error you got.
User avatar
uddhava
Posts: 315
Joined: Tue Nov 04, 2008 7:24 pm
Location: American back in Hungary

Post by uddhava »

jonbo wrote:Hey Udd, you get that error because you are embedding the script on the wrong layer. You embed it on the first layer not the .origin layer. Watch the video again, you'll see what I mean. I did that too at first and got that same error you got.
Okay, that fixed the problem. Actually all of my problems with this script came from not watching the video carefully enough.

Thanks jonbo.

Thanks ponysmasher, sorry for my negligence. Btw, I notice more and scripts are listed on your website. Great contribution!
Rowan
Posts: 19
Joined: Mon Apr 23, 2018 4:29 pm

Re: Animate the origin of layers

Post by Rowan »

Hello David, how are you? I was wondering if you still have the Animatie Origin script available? I could really use it for my project! Thanks, greets
User avatar
Greenlaw
Posts: 9191
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Animate the origin of layers

Post by Greenlaw »

I'm curious about this too...is it available for 12 or 13?

I have to work around the lack of an animateable origin by nesting in groups and then animating the child layers. This works fine for a shot-specific setups but it's really not the same thing as animating the origin directly.
User avatar
Penny
Posts: 51
Joined: Sun Dec 02, 2018 3:56 pm
Location: Italy

Re: Animate the origin of layers

Post by Penny »

I remember I used this script on a project, well... many years ago. Fortunately I stored a copy. Don't know if still works on 12 or 13.

Here it is: https://drive.google.com/open?id=1fPAnd ... 9adt1MSFG2
Even with the head in the clouds You can touch the ground

https://www.facebook.com/santiago.penny
https://www.behance.net/pennysantiago
Rowan
Posts: 19
Joined: Mon Apr 23, 2018 4:29 pm

Re: Animate the origin of layers

Post by Rowan »

Penny wrote: Sun May 10, 2020 9:56 pm I remember I used this script on a project, well... many years ago. Fortunately I stored a copy. Don't know if still works on 12 or 13.

Here it is: https://drive.google.com/open?id=1fPAnd ... 9adt1MSFG2
That's great Penny thanks, just fiddled around with it quickly and it still seems to work on 12 :D
User avatar
Greenlaw
Posts: 9191
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Animate the origin of layers

Post by Greenlaw »

Thanks for posting that Penny! Will check it out.
Post Reply