Page 1 of 2
New button script: Select all keyed bones on current frame
Posted: Mon Dec 08, 2008 8:38 am
by heyvern
viewtopic.php?t=7842
The link is to my script forum topic.
This is one of those "frustration" scripts that gets whacked out in minutes to solve an issue. So frustrating trying to keep track of which bones are keyed for easy copying of key frames of ONLY bones with keys. This script will select all bones that have keys on the current frame.
I love it. Big time saver for me.
-vern
Posted: Mon Dec 08, 2008 9:13 am
by rylleman
Very handy, thanks!
Posted: Mon Dec 08, 2008 9:14 am
by Rudiger
Wow, really good stuff! I just mentioned something about this in the Mike's
Animation Channel Management thread.
I could probably hack it in myself, but what about another button for selecting points?
Posted: Mon Dec 08, 2008 9:57 am
by heyvern
Rudiger wrote:
I could probably hack it in myself, but what about another button for selecting points?
Yes definately. That would be just as easy. I will work on it. Actually it could be the same button tool. It would just work differently for bone layers and vector layers.
-vern
Posted: Mon Dec 08, 2008 10:51 am
by mkelley
Can a button be assigned a hot key?
I ask because all of my work now is using my controller in my left hand and I'd rather not move the mouse to use a button if I could just assign it to a key for my left hand.
Just a thought -- otherwise, thanks for this, as I can definitely use it (indeed, this should really be built in to AS as it's a pretty standard feature of most high end 3D software).
Posted: Mon Dec 08, 2008 11:07 am
by heyvern
Yes, a button can be assigned a hot key. I've nearly run out though in my tool list.
I have to start thinking more about my previous idea of "combining" buttons so they can serve dual purposes for different layer types. It would be very simple to do.
-vern
Posted: Mon Dec 08, 2008 11:20 pm
by Rudiger
Thanks, Heyvern. I can see this being a nifty little tool that we'll all wonder how we ever did without. With regards to running out of hot keys, perhaps we should ask Uncle Mike for the ability to use modifier keys for tool shortcuts.
Oh, and mkelley, you'll find out how to assign hot keys to a button tool as soon as you install it, as the key is specified in the _tool_list.txt file.
Posted: Tue Dec 09, 2008 1:49 am
by heyvern
I think I have asked.. or... uh... told Mike in emails about my scripting wishes... uh... several times.

It is also in the feature requests. I've gone on about it to him... like... I may get a restraining order if I don't shut up already.
I think... or hope... he knows.
-vern
Posted: Tue Dec 09, 2008 4:36 am
by mkelley
The good news, Vern, is that I suspect he's as anxious as you are to include more scripting possibilities as I'm sure he's seen what you and others have done with it. I would also hope that he will at least contact you (or have SM do so) for the possible inclusion of some of your scripts in the standard product (with some compensation, although my experience in these matters is sometimes credit is all you get).
Posted: Tue Dec 09, 2008 5:34 am
by heyvern
Mike is ten times the programmer I could ever dream to be. Even with lua. If he could take my scripts and "clean them up" so they are properly formated and coded... efficiently... I'd be thrilled.
I'm sort of a lazy programmer... if it works I'm happy... even if the code is a Rube Goldberg construction with too many loops.
p.s. I recently discovered a bug in one of my many crazy tool scripts... I don't know which one it is though

. If I have a bone or group layer with the eyeball clicked "off" on all but one layer and hit the "G" key to select points on the visible vector layer... all the layers TURN ON! Freaks me out. It must be one of the buttons or tools with some keydown command that selects each layer (which automatically makes that layer visible). I just have to track it down.
-vern
Posted: Fri Dec 12, 2008 4:18 pm
by The Modax Jago
You should be hired by SM outright.
At the very least, placed on the short list for any company keen on developing perpriotary software for AS, which really, as has been the case with most other digital content creation software, is the principle source of inovation and development for this particular application.
Very helpful scripts. Of much assitance. If you had a penny for every time...
Posted: Fri Dec 12, 2008 11:41 pm
by synthsin75
Vern,
Uhhh, that bug may be my select layer script. If it only happens within the current group, that's probably the culprit. Any ideas on how I might fix that?

Posted: Sat Dec 13, 2008 2:01 am
by heyvern
synthsin75 wrote:Vern,
Uhhh, that bug may be my select layer script. If it only happens within the current group, that's probably the culprit. Any ideas on how I might fix that?

You're right! Never occured to me. I was looking at all of my own tools first.
Trying to think... the big problem is there is no way to check if a layer is "off". The eyeball thingy. There is no script interface for that.
I think I have an idea. There is a "OnMouseMoved" function. If the OnMouseDown and OnMouseMoved happen together then your script won't do anything. It's tricky though because they are both "functions" not actual "states" that can be checked... I will need to look at some other scripts. It's got to be in there somewhere...
Oh cool... there is also an OnMouseUp function! That should help. Set a variable OnMouseDown, then on mouse up check if the mouse moved, if it didn't change position then your script will run... uh... hold on... then you can't deslect points... <sigh> this may be trickier than I expected.
I'll let you know if I get a chance to work on it.
-vern
Posted: Sat Dec 13, 2008 2:40 am
by synthsin75
Yeah, since I can only get the data for that script while the actual layer is the current, selected layer, the only thing I can think of is going back to using a modifier key for the select layer function.
But....you'd think that it only selects one layer at a time, allbeit quickly. So if only one layer in the group has its visiblity checkbox active, shouldn't it end up with whatever selected layer being visible? For some reason it doesn't 'toggle' visibility like usual.
Would adding a 'snooze()' help maybe?
Posted: Sat Dec 13, 2008 4:55 am
by heyvern
The problem is that no matter how fast a layer is "touched" it becomes visible. If you select a layer it becomes instantly visible. Since there is nothing in the script interface for that "eyeball" visibility there is no way to preserve it. A snooze or delay will have no effect.
I am thinking rather than a modifier key, there could be a cbeckbox on the tool itself to "turn it off". For instance if you plan to do some work on one layer and you need layers turned off you could temporarily turn off this tools function.
Hold on there a second. We could parse the file for the layer name and check for the "visible true/false" value... <sigh> The only trouble is that many layers can have the same name and there is no "ID" for a layer in the file format... dagnabbit. I hope someday some more of these simple attributes will be available to the script interface.
EDIT: Dagnabbit! Everything in that section for a layer has a script reference except... "visible". Good grief. Origin, parent bone, render only, edit only, scale compensation etc etc... they all have script references but layer visible is not in there.
-vern