Home Technical Talk

MAX scripts to copy/paste/save poses for BONES?

Slyrr
polycounter lvl 18
Offline / Send Message
Slyrr polycounter lvl 18
I'm working on a character for the Hexen TC for Doom3 engine. This character has a complicated bone rig set up to control some bat-like wings. Manually posing the bones for each needed sequence would be a nightmare. I found some plug-ins for older versions of MAX called "anipose" and "CopyKey". But they don't seem to be loading in Max7.

Are there any such plug-ins for Max7? Plug ins that will allow you to pose a set of bones in such-and-such a way, store that pose, then recall it in similar fashion to "load pose" in Physique? If there is, it would be an immense time saver. I know BIPED can do that stuff, but these wings are made with Maxs' BONES, and I know of no way to copy and store poses for these.

I'd like to be able to save files like "left wing folded" and "right wing folded" and "left wing extended" and "right wing extended" to use at various times for various sequences. Maybe there's a plug-in built in to max7 that does it, but if so, the help files don't indicate it....

Anyone know of something like this? It would be a life-saver....

Slyrr

Replies

  • CrazyButcher
    Offline / Send Message
    CrazyButcher polycounter lvl 20
    those are macroscripts, normally maxscript is backwards compatible, dont have max7 so...
    you sure you looked at the right place for them ? ie under customize UI, and have put them into /UI/macroscripts directory of max ?
  • Eric Chadwick
  • NoSeRider
    Offline / Send Message
    NoSeRider polycounter lvl 18
    What about Character Menu - Save Character - Insert Character?

    Not Saying this will work, just asking have you tried it?
  • Ryno
    Offline / Send Message
    Ryno polycounter lvl 18
    Wow, I actually figured out how to script it. Now, I'm not an expert scripter, but I got it to work, and reproduced it several times. Now I was working with IK handles, as just controlling the bones via moving an IK handle is easier for me to script than dealing with rotation calculations. So, if IK handles are acceptable to you, read on. If you're deadset on manually rotating bones, I don't know if I can help you, as I've had trouble recording rotations in the past. (Could be possible though, and worth a try.) This is a bit of a do it youself solution, but here's how:

    1. Open the rig, preferrably in a neutral pose.

    2. From the MaxScript Menu, turn on MacroRecorder, and MaxScript Listener. Look at what script is in there if there is any, and make a mental note of where you are now starting.

    3. Down in the Status Area, turn on Offset Mode, as opposed to the default, Absolute. (This may need to be on whenever you use this completed script, I'm not sure if the toggle is scriptable.) Go to your Key Filters, and make sure that Move and IK Parameters are the only active Transforms.

    4. Activate the Set Key animation mode toggle.

    5. Select the IK handle, move it so that the wing deforms properly. You could also move any swivel angle helpers, or other IK handles to get the thing looking right. I didn't actually try multiple handles or additional helpers, but theoretically this should work fine. - Actually, I just did, and it works fine.

    6. Hit the Set Key button to register a keyframe for anything that you just re-positioned. Double check each thing you moved, and make sure it actually registered a keyframe. You may want to go through them individually, as I've noticed keys not "sticking" when you have multiple things selected. If you did miss something, just make the adjustments, and register a key.

    7. Select the Script in the listener, and copy it.

    8. MaxScript Menu, New Script, Paste in the stuff you just recorded. Save it with a good name.

    Now at this point if you want to test it, it should move the IK handles into this position and set keys at the current frame, any time you run the script. But going up to the MaxScript Menu and hitting Run Script, and finding it is a pain, so let's make a toolbar for each of these little pose scripts. So...

    9. Make sure the Script is Open, and go to the Customize Menu, Customize UI, Toobars, and Create a new toolbar. Give it a good name. A little floating toolbar should appear.

    10. Go to the open script, and select all of the text in it. Hold down Ctrl, and drag it to your toolbar. A new button should appear on it, which is a shortut to your script.

    11. Now the button name is probably a little too long, so right click on the button, and edit it's appearance. Give it a nice, brief text name.

    12. To make sure your toolbar is always visible, save this custom UI scheme with a new name. If for some reason the toolbar goes hidden, just right click on a blank area of the Main Toolbar, and you should be able to bring it up from the list again.

    Now you will need to make separate Scripts for all of the motions you want to do. I would advise not doing little unique stuff, but just the big, gross motions that you need to do most commonly. Give it a try if you like, and let me know how it works. I'll test my solution a little more to make sure I'm not steering you wrong.
Sign In or Register to comment.