Performance Issues - Script Linking Switch Layers Together

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

Moderators: Víctor Paredes, Belgarath, slowtiger

GaryC
Posts: 53
Joined: Tue Feb 03, 2015 1:02 pm

Re: Performance Issues - Script Linking Switch Layers Togeth

Post by GaryC »

That's great! This one is a little slow when first set up (we have large files) but then it performs perfectly fine after that. Bit of a shame it doesn't allow the exact folder structure we wanted but I'm sure the animators can live with it when it does everything else we want.

Thanks!
chucky
Posts: 4650
Joined: Sun Jan 28, 2007 4:24 am

Re: Performance Issues - Script Linking Switch Layers Togeth

Post by chucky »

OH this works brilliantly... even in my switch within a switch... took a little braining ... but yeah ... thanks guys!
chucky
Posts: 4650
Joined: Sun Jan 28, 2007 4:24 am

Re: Performance Issues - Script Linking Switch Layers Togeth

Post by chucky »

Hey Y'all,
There's a little problem when you change the name of or alter styles when this script is embedded...
The old 'Nil value' gets stuck on repeat and you have to lose the script to stop it.
Of course you can load it again, but it's worth noting.

Also .MASTER at the root is not awesome... I don't suppose there's any way round it.
Could this run as a button instead?
User avatar
hayasidist
Posts: 3492
Joined: Wed Feb 16, 2011 8:12 pm
Location: Kent, England

Re: Performance Issues - Script Linking Switch Layers Togeth

Post by hayasidist »

this is a layer script designed so that lots of switches will sync to the master switch anywhere in the timeline without needing to have the master switch layer as the active layer - but a different script, for what I guess you want as a one-time set-up along the lines of the visibility switch you have, could be created as a button.

e.g.
>group
>> sw_1
>> sw_2
...
>> sw_k -- active child is ch_x
...
>> sw_n

run the tool with sw_k as the active layer; then all sw_1...n have their active child set to ch_x -- then there are some choices to be made about making ch_x the "frame 0" active child irrespective of the frame on which the tool is run - or not; and about clearing / leaving other keyframes in sw_k and/or other switch layers sw_1...n


((if this is to be a frame 0 set-up tool then I'd go for: clear all switch animation and make ch_x the frame 0 active child in all switch layers sw_1...n))
chucky
Posts: 4650
Joined: Sun Jan 28, 2007 4:24 am

Re: Performance Issues - Script Linking Switch Layers Togeth

Post by chucky »

I haven't seen the lua dialogue pop up today.
I think right now, I'll be just powering ahead, probably gone past the PONR.
Of course if such a tool existed... :wink:

I have a bit spoiled recently... thanks for a your wisdom and time on this Paul.
Post Reply