PDA

View Full Version : custom attribute help


zacleck
01-29-2010, 06:11 AM
All right, so I wanted to add a specific set of buttons to my rigs and I was hoping someone could help me with the script.

When I'm building a rig I make a habit of zeroing out my controls so that I can transform them back to the bind pose whenever I'd like. When working with my previous rigs I would simply select each control, one at a time, and transform them back to zero. What I want is to create a custom attribute on the master control that has two buttons, one that keys all controls for that rig, and one that zeros out all of the rigs controls so that it can snap back to the bind pose all at once.

I imagine the script would be something quite simple and if I dug around long enough I'd figure it out, but maybe someone out there has a quick answer for me.

-zac.

zacleck
01-29-2010, 07:24 AM
okay, so I figured out how to zero out all of my controls with a click of a button, but how would I make a button that keys all controls. I'm not so sure I even need this one, but I'm just curious now. I made the other one with a select $ command followed by macros.run "Animation Tools" "TransformToZero" This takes a bit to calculate but it works fine, i guess.

I'm thinking to have it key all I could run the macros for key translation or key rotation on every control, but that would be another tedious step to type it all in. the advantage being that if I never wanted a rotation or translation key on any particular control it wouldn't be put on with that button compared to a key all command.

Does anyone have any other methods for doing something like this or am I pretty much on the right track?

giordi
01-29-2010, 04:29 PM
what software are u talking about?

labbejason
01-29-2010, 04:46 PM
try addNewKey

addNewKey <controller> <time>

JessR
02-03-2010, 03:11 PM
well without knowing your software, i'd hope your icons have a unique naming convention, so simply select for that, and for each item in that generated selected set, run the key command

zacleck
02-03-2010, 04:45 PM
Sorry all, I thought I mentioned it was 3ds Max, but I see now that I didn't. I pretty much figured out what I was trying to do, however, so for those that responded, thank you.

zac

CGTalk Moderation
02-03-2010, 04:45 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.