First off, the MaxScript help file is useless on this. The only file that will save you is the SDK.
EXTREMELY annoying and very frustrating, but there’s nothing documents in the normal Max help files that will tell you how to get an ICP_MXBipedCopy.
However, I’m here to help, since I’m actively trying to do something similar, and I just found the answer we’re both looking for.
First off, <biped_ctrl> is the .controller of the biped root node you want to copy from/paste to. In your example, you’d be using something like:
Secondly, the ICP_MXBipedCopy can be gotten in a couple of steps. You need the copy collection that the pose/posture/track is in.
cpyCol = biped.getCopyCollection $Crowd1.controller 1
This will get you the first copy collection attached to that biped. I’m assuming you’ve only got one. If you’re looking for a copy collection with a specific name, you could do something like this:
i = 1 -- doing this outside the while loop so it doesn't disappear due to variable scope fun
cpyCol = undefined -- doing this outside the while loop so it doesn't disappear due to variable scope fun
while (cpyCol = biped.getCopyCollection $Crowd1.controller i) != false do
if cpyCol.name == "TheCopyCollection" then exit
i += 1
-- cpyCol will either contain "false" meaning that the copy collection named "TheCopyCollection" did not exist, or it will contain the correct copy collection.
Once you have the copy collection, you need to get the pose/posture/track you’re looking for.
You can get the number of copies in the collection using:
numCopies cpyCol (#pose|#posture#track)
You can also get the copy using:
getCopy cpyCol (#pose|#posture|#track) <copy index>
The returned copy has a .name property so you can use it to search for a copy with a specific name.
Using the above code will get you the mysterious <ICP_MXBipedCopy> you need for
biped.pasteBipPosture <biped_ctrl> <ICP_MXBipedCopy> <bool_opposite> (#pstdefault |#pstcopied |#pstinterp) <bool_hor><bool_ver><bool_trn><bool_byvel>
and its friends. Now, I’m only interested in tracks, and I barely deal with postures… You’ll have to try (#pstdefault|#pstcopied|#pstinterp) each and see what results you get. I’ve never touched them, so I have no real idea what each of them does.
refer to the Horizontal, Vertical, Turn, and By Velocity buttons in the paste options, though.
Hope this helps!