Enhancement request for David Rylander's Random Switch Scrip

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

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
paulcopeland
Posts: 95
Joined: Tue Mar 03, 2009 2:04 pm

Enhancement request for David Rylander's Random Switch Scrip

Post by paulcopeland »

G'day everyone.

Wow, I have just been experimenting with the Random Switches script of David Rylander, version 1.00.

What a remarkably powerful script. I love randomness and stochastic structures.

I hope there is someone out there who will be able to expand the script further.

What would be great would be

1. To have the switch layers loop sequentially, with options for frame rate. For example, you could have the script loop the switch layers at chosen intervals in the timeline (eg, every 5 frames etc)

2. Have the switch layers increase in speed over time on the timeline.

3. Have the switch layers decrease in speed over time on the timeline.

4. Have the option of only looping a predefined (from the script) chosen number of switch layers.

The mind boggles as to what this could achieve.

Any switch animation with say car tyres revolving, an aeroplane's propellors moving, a person drumming his/her fingers, a person running and countelss other examples, could benefit from easily achieved speed changes.

So, hopefully someone can enhance David's great script to include some of my suggestions.

What do you reckon?

Hoooo for now.

Paul.
Get my free piano sheet music here http://www.scoreexchange.com/profiles/pianoedition
User avatar
mkelley
Posts: 1647
Joined: Fri Nov 02, 2007 5:29 pm
Location: Sunny Florida
Contact:

Post by mkelley »

If I understand the script properly (it's a pretty simple script but I didn't run it) you can choose the starting frame and ending frame and interval min and max, right? If so...

1) Do it yourself. After you run the script for a 5 frame interval, just set the last key to loop and it will do it. Or copy the 5 frame interval in the timeline and put it wherever you want -- this would be a *whole* lot easier than trying to script these movements.

2) & 3) Probably not really appropriate to add to this script -- if it hasn't been scripted already, a generalized script to speed up/slow down keys on the timeline would be a better idea (perhaps you could select which keys you wanted this applied to). Like I say, this may already exist -- would be worth looking for.

4) Due to the way the script is written this isn't an easy task. Unfortunately, as we've seen, there isn't a good data mechanism inside of AS to allow these kinds of selections. Vern and others have done kludges but it would be hard to specify which layers out of a switch layer set you would want to use.

A better way would be to just create another switch layer set -- dupe the first and delete the switches you don't want to see looped. Then you can hide and/or unhide the layers as needed.
paulcopeland
Posts: 95
Joined: Tue Mar 03, 2009 2:04 pm

Post by paulcopeland »

Hey Mike,

Thank you for your observations.

I checked David's other scripts and there is one called 'Loop switches', which does most of what I want except for putting the switch layers closer together over the timeline (speeding up the switch layers).

Seeya.

Paul.
Get my free piano sheet music here http://www.scoreexchange.com/profiles/pianoedition
User avatar
mkelley
Posts: 1647
Joined: Fri Nov 02, 2007 5:29 pm
Location: Sunny Florida
Contact:

Post by mkelley »

Speeding up and/or slowing keys sounds so extremely useful and easy to do I'd be surprised if there isn't a script out there that does this already -- perhaps when Vern comes on here he'll think of something.

Otherwise Wes or myself could easily write such a script.
paulcopeland
Posts: 95
Joined: Tue Mar 03, 2009 2:04 pm

Post by paulcopeland »

Hey Mike,

looking forward to the script created by either youself, Wes, or Vern. It will be an awesome script, that's for sure and think of the possibilities, spaceships with their lights flashing at different speeds = wow :D

Seeya,

Paul.
mkelley wrote:Speeding up and/or slowing keys sounds so extremely useful and easy to do I'd be surprised if there isn't a script out there that does this already -- perhaps when Vern comes on here he'll think of something.

Otherwise Wes or myself could easily write such a script.
Get my free piano sheet music here http://www.scoreexchange.com/profiles/pianoedition
User avatar
synthsin75
Posts: 10280
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Post by synthsin75 »

Mike,

If you get around to this first, it'd probably be fairly easy to modify cc_shift_layer_keyframes to do this, since it'd need to rewrite the keys as well. I don't know when or if I'll get around to it, but I can offer some suggestions to anyone who does.

That is, if you want a generic keyframe slower/speeder.

:wink:
User avatar
mkelley
Posts: 1647
Joined: Fri Nov 02, 2007 5:29 pm
Location: Sunny Florida
Contact:

Post by mkelley »

Yeah, this is kind of on my mind due to the "animation filter" thing (which I'm still trying to wrap my head around. Whew! I wish my calculus days weren't so very many decades ago :>).

Essentially the AF will modify the keys on the timeline as well, and my overall approach to tools has always been to make them as generic as possible. So it's likely that AF would simply be one checkbox (or whatever) of a much larger key handler.

But as to when I might get to it -- I'm facing a pretty tough production schedule for the next three months. Maybe after that (or if I get time in between various tasks I'll see if I can work on it. Coding is usually something I need to be in for at least two or three days straight to be really productive, though).
User avatar
rylleman
Posts: 750
Joined: Tue Feb 15, 2005 5:22 pm
Location: sweden
Contact:

Post by rylleman »

I'll see what I can do to my script when I get some time. Right now I'm boggled with a lot of other things.
Post Reply