Possible to script?

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

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
troypicou
Posts: 48
Joined: Mon Dec 15, 2014 7:04 pm

Possible to script?

Post by troypicou »

Hey everyone hope all is well. Just curious if this is possible. Seeing that actions record bones and switch layers have to be setup on a bone to have the switches recorded. Can a switch layer bone script be created that would assign the switch layers to the bone having the layers set to step. It’s just a cumbersome process. Don’t know if others deal with this just thought I would ask. Thanks for your thoughts, happy new yr.
User avatar
SimplSam
Posts: 1048
Joined: Thu Mar 13, 2014 5:09 pm
Location: London, UK
Contact:

Re: Possible to script?

Post by SimplSam »

OK. I have read this about 8 times and have concluded that I can't understand what you are requesting?

?? Q. Seeing that actions record bones and switch layers have to be setup on a bone to have the switches recorded ??

Are you saying - One needs Smart Bone Actions to record/replay Switch selections? If so - then this is not always true. i.e. If you want to record/replay a linear sequence of switch changes (think traffic lights) - then you can do so with regular Actions. If however you want the switching to be more dynamically controlled - then I think the answer is yes, you need Smart Bones / Actions.

?? Q. Can a switch layer bone script be created that would assign the switch layers to the bone having the layers set to step ??

You Lost Me :roll: ???
Moho 14.1 » Win 11 Pro 64GB » NVIDIA GTX 1080ti 11GB
Moho 14.1 » Mac mini 2012 8GB » macOS 10.15 Catalina
Tube: SimplSam


Sam
User avatar
troypicou
Posts: 48
Joined: Mon Dec 15, 2014 7:04 pm

Re: Possible to script?

Post by troypicou »

Thanks for the reply. Sorry for the confusion in my post.
I have not had success recording my hand switch layers inside of an action to reuse when creating animated loops. Causing me to believe that actions can only record bone movement. So I set up my switch layers on a smart bone as to record the switches to be played back with the action. The process of setting up switch layers on a smart bone can take a bit of work with a 30 hand set. So I was just curious if anyone knew of a better solution than setting it up every time. Maybe a script to automate the process.
Thanks
User avatar
Greenlaw
Posts: 9269
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Possible to script?

Post by Greenlaw »

Do you mean keyframing all the hand poses within the Action? Yeah, that can be tedious. When I was doing development work for Harvey Street Kids, I tried to create a 'standardized' rig that could be repurposed for each character, and one of the features was a hand setup that had something like 50 different hand poses built in. Took forever to set up, and in practice, animating the hand was cumbersome. Specifically, there were just too many drawings to scroll through with a single bone dial. So then I tried breaking the hand control into multiple hand controls to switch between groups of hand poses (i.e., palm, palm side, back, back side, finger tips, etc.) That required less scrolling and the sensible structure made it a lot easier to animate...but it was a pain to update whenever an animator asked me to add another hand drawing, because I'd have create multiple views for every new hand or upset the structure. I think in the end, I just added a 'specials' category into which the animator could add whatever shot-specific hand drawing they wanted, and I would later add that drawing to 'special' category in the master rig without upsetting the 'standard' hand structure. This way, the new drawing would be available to the next animate using the rig. Still, a pain in the butt since by that time I'd already moved on to a different project.

If I took a similar approach today, I wouldn't bother with the Smart Bone. Instead, I'd set up a Layer Shortcuts button to select the hand switch, and just use the Switch Selection window to scrub through the hand poses. I like this method for mouths, eyes, and sometimes hands; it's fast and easy to set up and animate with, easier to scrub a lot of drawings quickly, and no Smart Bone is required. (You've probably seen this but I posted a demo video here: Introduction To Layer Shortcuts.)

In later shows (Boss Baby specifically,) I came up with a standard hand rig that used fewer drawings because each hand drawing was fully poseable to each fingers using only Smart Bone Actions and no hand bones. That system took a long time to set up too but it was really easy to animate, looked great, and the setup was re-usable between different characters. (Well, for characters with similar 'kid' hands anyway. Then, along came Victor, who came up with the brilliant idea to use a Smart Warp to globally reshape my setup into 'grown up' hands.) :)

Unfortunately, this system completely fails with Moho 13 because of the Actions ID issue. Another reason I stopped using Moho 13.
Last edited by Greenlaw on Sun Jan 03, 2021 4:56 am, edited 6 times in total.
User avatar
troypicou
Posts: 48
Joined: Mon Dec 15, 2014 7:04 pm

Re: Possible to script?

Post by troypicou »

Thanks for the reply, I’ll test those ideas.
User avatar
Greenlaw
Posts: 9269
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Possible to script?

Post by Greenlaw »

That said, Troy, yeah, it would be neat to have a script that would keyframe every drawing in a switch layer and set up the Smart Bone Dial for you automatically. :)
User avatar
Greenlaw
Posts: 9269
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Possible to script?

Post by Greenlaw »

Oh, yeah, I just remembered another reason why I moved away from using a Bone Dial to animate Switches: you can't use Interpolate Sub-Layers with a Smart bone because the animation isn't really non-linear this way.

However, Interpolate Sub-layers works perfectly fine when using the Switch Selection Window.

Actually, I never cared about this feature until the last dev team got Interpolate Sub-Layers to work with grouped Switch layers. That was a big game changer for me. If I plan my mouth shapes carefully, I can now get away with fewer pose drawings and get smoother animations.
Post Reply