PDA

View Full Version : Editing character set members array.


choi-margatta
02-19-2010, 12:57 PM
Hi guys, I am having trouble with copying animation data from one charSet to another. I found that the problem relies on the fact that maya stores the data according to the charset Array order. Say, sphere1.translateX is plugged in to charset1.dnSetMemers[0], and I would want to copy the data to another set, maya looks up the source plug of dnSetMembers[0], and plugs the data to that source. If the order is wrong, the connection fails. What I want to do is to rearrange order of the array, to match source and destination charset members arrays.

I've read the doc, but couldn't find any info about that. Maya doesn't seem to let user to edit dnSetMembers order. I have came up with two ideas however. First, I can carefully recreate characterSet from scratch with MEL, to achieve desired array order. Second, I can make a tool for querying the source attr of every member of the set, and plug it to corresponding attr of destination set, which seems little bit brute force to me.

What do you think?

KielFiggins
02-19-2010, 03:58 PM
I think the trax editor has different apply types, one for array order and one name based. It's been a while since I've had to do this, so it may no longer exist.

Mark-J
02-22-2010, 08:10 AM
Actually it's a little more complicated than that. The chSet is broken into 3 lists, Angular, Linear and Unitless, through the characterMapping and (AttrAlias), then passed through the dnsetmembers. We've been trying to get a definitive answer to the exact setups when referencing for ages, most of our tools are guess work, and trial and error over 8years of using Trax.

To copy data between non-matching sets you can do a few things, firstly when you Paste the clip you can do it based on, array order, attr name etc.... so try that first (options in the paste menu). You could also look at the CharacterMapperUI (trax>file>characterMapper), basically allows you to rewire data from a chset.... but not that intuitive.

But, if you wanted to do any tools for characterSets, then I'd recommend doing a saver/loader, and maybe a debug so you can printout the internal wiring, and maybe write out to a file and do a diff. We make sure that all chSets for main rigs are consistent to get over any future issues whilst referencing. Actually it has all got a lot more solid in the last few releases of Maya. It used to be a case that if ANY of the chSet indexes were in the wrong order, and you were referencing that rig, all animcurves would wire to the wrong channels. They now do some matching which stops this, but it's still not perfect.

Tools wise a few tips....
To get the actual internal index from the characters set you'd think you've just be able to do something like character -q chSetName, but that actually returns a random member order. If you do a `aliasAttr -q chSetName;` then you'll see the internal mapping.




hope that helps





Mark

choi-margatta
02-22-2010, 08:49 AM
Thanks guys. I forgot to mention that the animators I am working with don't use trax editor to copy animation data, maybe because of the fact that our animation works actually doesn't require a non linear animation pipeline. They just simply double click the timeline and copy/paste another active chset timeline.


But trax editor does indeed have options for managing the chset arrays. I will give it a try.

Thanks guys again.

Mark-j, the tips you gave is so helpful to me. The internal process of charset operations is really hard to understand clearly.

Mark-J
02-22-2010, 11:43 AM
Well like I said, this has been lots of trial and error, specifically with referencing the ChSet is actually a really useful thing. It allows channel names and objects to change yet keep the referecning working correctly, it's like a metaTag list sat between the connections, as long as you preserve the mapping table. It's saved us on many occasions.

KielFiggins
02-22-2010, 04:09 PM
Mark-J, thats some great information you've posted. Thanks for sharing.

CGTalk Moderation
02-22-2010, 04:09 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.