Animate the origin of layers

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

Moderators: Fahim, Distinct Sun, Víctor Paredes, erey, 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 » Sun Jul 24, 2011 1:50 pm

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 » Sun Jul 24, 2011 4:15 pm

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 » Sun Jul 24, 2011 4:42 pm

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: 3113
Joined: Tue May 29, 2007 11:31 am
Location: Nelson, New Zealand

Post by funksmaname » Sun Jul 24, 2011 9:15 pm

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

Post by Víctor Paredes » Sun Jul 24, 2011 10:12 pm

absolutely great!
I'll check tomorrow with more time.
thank you very much!
Víctor Paredes
Former Moho Product Manager
Rigger and animator in Cartoon Saloon
My Youtube Channel - My webinars
User avatar
uddhava
Posts: 314
Joined: Tue Nov 04, 2008 7:24 pm
Location: American back in Hungary

Post by uddhava » Tue Jul 26, 2011 12:09 pm

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 » Tue Jul 26, 2011 12:44 pm

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: 314
Joined: Tue Nov 04, 2008 7:24 pm
Location: American back in Hungary

Post by uddhava » Tue Jul 26, 2011 1:28 pm

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 » Tue Jul 26, 2011 1:38 pm

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: 314
Joined: Tue Nov 04, 2008 7:24 pm
Location: American back in Hungary

Post by uddhava » Tue Jul 26, 2011 2:12 pm

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 » Sat May 09, 2020 11:21 am

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: 4661
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Animate the origin of layers

Post by Greenlaw » Sat May 09, 2020 4:40 pm

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.
D.R. Greenlaw
Artist/Partner - Little Green Dog | Little Green Dog Channel on Vimeo | Greenlaw's Demo Reel 2019 Edtion
Lead Digital Animator, Dreamworks Animation

Image
User avatar
Penny
Posts: 44
Joined: Sun Dec 02, 2018 3:56 pm
Location: Italy

Re: Animate the origin of layers

Post by Penny » 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
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 » Tue May 12, 2020 3:17 pm

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: 4661
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Animate the origin of layers

Post by Greenlaw » Tue May 12, 2020 11:26 pm

Thanks for posting that Penny! Will check it out.
D.R. Greenlaw
Artist/Partner - Little Green Dog | Little Green Dog Channel on Vimeo | Greenlaw's Demo Reel 2019 Edtion
Lead Digital Animator, Dreamworks Animation

Image
Post Reply