Action Commander tool. Key commands for actions

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

Moderators: Víctor Paredes, Belgarath, slowtiger

User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Action Commander tool. Key commands for actions

Post by heyvern »

Thanks to Synthsin75 I've updated this script to access any action in the file. It is still limited to 10 key command controlled actions... BUT...

It now has a menu to choose an action without opening the action palette!

Place this file in scripts/tool folder.

http://www.lowrestv.com/anime_studio/sc ... mander.lua

Save this image to the scripts/tool folder.

Image

Use CMD (mac) or ALT (win) + 0-9 to access the first 10 actions (it is actually 1-0, 0 is equivalent to 10)

Note: You need to save after adding new actions before they can be used by the tool. The tool reads the file format so unsaved files won't be current.


-vern
Last edited by heyvern on Wed Jul 23, 2008 8:47 am, edited 4 times in total.
chucky
Posts: 4650
Joined: Sun Jan 28, 2007 4:24 am

Post by chucky »

Cool, that should take the tedium out of those Shakespearean soliloquies.:wink:
User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

This one was easy. Only took about ten minutes.

-vern
chucky
Posts: 4650
Joined: Sun Jan 28, 2007 4:24 am

Post by chucky »

WOah , if Mike's not careful we might end up calling this Vernime.
User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

MIke told me once this is exactly what he hoped people would use the scripting for. Make Anime Studio better. Create stuff he never thought of or has time to do.

-vern
User avatar
madrobot
Posts: 670
Joined: Mon Apr 07, 2008 3:07 pm

Post by madrobot »

heyvern wrote:Make Anime Studio better
-vern
Well you're certainly doing that.
Thanks dude
Genete
Posts: 3483
Joined: Tue Oct 17, 2006 3:27 pm
Location: España / Spain

Post by Genete »

heyvern! that's absolutely cool! You should provide to the non scripter user a way to define its own set of actions names!

I can see two ways:
1) By an external txt file what defines the pairs of (action, keystroke) and the keystroke can be modified with ALT (CMD) or CTL. This external txt file should be responsability to the user to be modified. Even its length should be only limited to the user usage and the availability of shortcuts. Remember that "someone" could have been redefined those 0-9 short cuts to its own usage and would conflict with your hard coded ones. Also ten shortucuts can be so much for someone or so less for others.
2) By other script that reads the keystrokes to assign the action. You can do it by calling button script that read the current action in edition and ask to the user for a keystroke modified or just write it is a predefined format. It would be a little more difficult to create but finally easier for newbie users. Also you can start with the first option and create this second option later based on that external file.

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

Post by mkelley »

Ah, a programmer's job is never finished... <bg>
User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

Genete wrote:heyvern! that's absolutely cool! You should provide to the non scripter user a way to define its own set of actions names!

2) By other script that reads the keystrokes to assign the action. You can do it by calling button script that read the current action in edition and ask to the user for a keystroke modified or just write it is a predefined format. It would be a little more difficult to create but finally easier for newbie users. Also you can start with the first option and create this second option later based on that external file.
Hmm.... I was planning to use the first idea, but I really like this second one.

So, while you have an action "active" you click a button and type in a key for the shortcut. I could put in a list of "reserved keys" to prevent people setting a bad key command.

This button would write a new file or edit an existing file to create the key command list.

The big problem I have with using a script to write these stupid files is that after a while they pile up and it's hard to keep track. I am using my bone groups script for a long time now. It writes files to store the groups, one for each file. So now in all my project folders I have all these "extra" files cluttering things up. It's useful but messy. Now I would have yet ANOTHER file unless I incorporate it into the bone groups file I'm using.

It would be so FANTASTIC to be able to store this TINY SIMPLE info IN THE FILE FORMAT. Dagnabbit... all Mike has to do is change AS so it isn't so picky about attributes in the file format that AS doesn't understand. Just read to the end of the file and anything after that is user defined.

I have yet to find a spot in the file to store this data. An empty layer might work but it's too risky the user would delete it. A notes layer maybe... <sigh>

Hey! For this script only... I could create a "blank" dummy action. This action's name could hold the other actions names and key shortcuts using a long string sepearted by hyphens or underscores, something easy to break it up and get the info from.

The user would have to make sure they never delete or use that action.

This might work.

p.s. I finally have a "cool" name for one of my scripts. Action Commander. I love it. ;)
-vern
User avatar
madrobot
Posts: 670
Joined: Mon Apr 07, 2008 3:07 pm

Post by madrobot »

Action Commander is an awesome script name.
It sounds like the name of some 80s action film, where Chuck Norris is just plain fed up, and goes around kicking people's limbs right off their bodies.
User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

I updated the script. Read the first post.

Synthsin75 helped me with parsing the file for the action names. Works like a charm!!

-vern
User avatar
madrobot
Posts: 670
Joined: Mon Apr 07, 2008 3:07 pm

Post by madrobot »

Wow.
Not only is it awesome, it looks awesome.

Well done, and nice implementation
User avatar
synthsin75
Posts: 10266
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Post by synthsin75 »

Vern, you should be able to write the hotkey number by just appending it to the action name. I'm not real sure yet how hard it will be to find the write location in the file, but if you don't get around to it, I'll let you know when I get it. :wink:


Glad I could help out with this.
chucky
Posts: 4650
Joined: Sun Jan 28, 2007 4:24 am

Post by chucky »

This is great, Vern , thanks, we are not worthy.
Don't rest now though , you've got to stay up all night and do the next one.:wink:
You know " action array?" the idea that Selgin suggested with bones as pose sliders. C'mon now 'n' get crackin' :roll: :D and where's Genete , the slacker? :wink:
Post Reply