View Full Version : Copy and Paste Mel
I was just wondering if its possible to create a mel script that allows you to copy keys from one side of a characters body and paste them to the other side, much like Max can do ?
Has this already been doen, would people find it a useful tool?
|
|
mark_wilkins
08-31-2003, 02:15 AM
Sure! It would probably be easiest to do this by maintaining a consistent naming convention for your joints and manipulators. Copying the keys is easy.
-- Mark
thematt
08-31-2003, 07:16 PM
yes but you can already do that right in the timeline..by just copying key from one bones to another it's very straight forward and sorry to tell you that but that works much better than Max (I use both in production so I can compare ..)unless you're talking about Character Studio..
Still it easy to get the naming convention right and create a character then export the anim and put it back on your character or Subcharacter with the visor or the trax..
anyway hope that helps..
just a little word for mark_wilkins:
just want to thanks you for the awesome book you've made I bought it few weeks ago and I'm learning mel since that can't tell you how much of a great help your book is (and i'm not native english speaker but find it really clear)..really awesome i recomend it to anybody getting serious with Maya.
thanks a million for that
Buexe
08-31-2003, 11:10 PM
copying keys from one node to the other is easy. The question is if the curves will behave the way you want them since most likely your joints or other nodes will have different rotation axis`on either side , so copying keys does not necesarily "mirror" your animation, if that is what you are after. Check your rig and/or your script that they will be able to handle this problem...
...and then send it to me ; )
BTW does anyone know how to use mel to write out animation curves with the anim import/export plugin?
mark_wilkins
09-01-2003, 12:54 AM
The last question's easy:
Make sure the plug-in is loaded, select the animation curve node, and use this command:
file -es -type "anim" <filename>;
There are eight kinds of animation curve nodes, divided up by their input and output data types:
animCurveTA
animCurveTL
animCurveTT
animCurveTU
animCurveUA
animCurveUL
animCurveUT
animCurveUU
In these node names, T means Time, L means Length (I imagine, as the units are distance), U means "double-precision floating point" (for clarity), and A means Angle.
Generally the TA, TL, and TU types are the ones that are created when you animate parameters. TT gives you a mapping from one time value to another and the UA, UL, UT, and UU nodes are used for driven keys.
You can find the animation nodes that drive a given attribute by using the listConnections command.
You may have to create a single animation curve that concatenates a bunch of results together in one place. You can either do this with the bakeResults command or you can do it by looping over the scene and using an appropriate xform command to grab values and stuff them into a curve. I do the latter to get world-space object motion into a curve all the time, but I'm not exactly sure how bakeResults interacts with the scene hierarchy. I think there's a flag that lets you include parent transformations in the baked curve though.
-- Mark
Buexe
09-01-2003, 08:48 AM
Oh Boy! Mark made my day again !!! :beer:
Now I can import/export all day long and copy and paste animation curves between scenes. Do you know how to set the options (in mel) for the export like which channels to export, timerange, etc. I cannot find anything in the docs. Or may be I have to customize the pv_performAction script to edit the output directly and not via the GUI?
Thanx a trillion Mark
buexe
CGTalk Moderation
01-16-2006, 12:00 AM
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.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.