0 Volts -Maya gallery
Please Register to View Free Download Links
And Unwanted Ads


Go down


Post  Admin on Mon Jan 16, 2012 1:56 pm

Written by Daniel Kramer

dkAnim.mel is for Importing or Exporting animation channels in Maya.
I wrote dkAnim out of pure frustration with Maya's Animation Import/Export
plugin. Specifically I was transferring animation from a stripped down Fast
Anim file to my full blown Hi-Rez Render file and channels were getting assigned
to the wrong objects in many cases. Maya's plugin seems to save channels based
on hierarchy of your nodes, not necessarily node names. This can be nice but if
your hierarchy changes slightly you may get weird results.. channels getting
assigned to the wrong nodes..etc. I have also run into files that simply would
not accept the .anim file at all for no reason that I could fathom.

dkAnim relies on node names to map channels to objects. This way you
can be sure that if you save a channel attached to Hip.tx that it will get to
Hip.tx in the destination file. There are a few options to tweak this which I
will describe below in the ReadOptions Section.

The other nice feature of dkAnim is that is saves all keyable
attributes for selected nodes.. not just keyed ones. So if an animator has
changed a value of an animation control w/out keying it.. that will get saved
in the .dkanim file and can optionally be transferred into a new file if you

dkAnim saves all features of a keyframe and curve to the file.. so
tangency, weight, pre-infinity, post-infinity, breakdown state.. etc.. it's all
preserved unlike Maya's plugin which can corrupt or loose your data.

dkAnim has been tested on a Feature Film production for tranfering
animation between character files for a farily complex character. It should be
fairly solid at this point but bugs may show up on different setups.. just
mail me and I will try and squash them.

On the bad side.. dkAnim can be slow. It's much slower then Maya's
plugin (That's just the nature of a mel script vs. a plugin). Also reading in
animation can consume memory which doesn't seem to free.. I'm not sure
why this is but with very large files this might be an issue. For me having
consistant animation transfer is worth these tradeoffs though.

Usege: dkAnim


*Type in a path and name of a .dkanim file in the text field. You can use the
browse button but it has a limitation.. you can't selected a dir name with the
Maya file requester unfortunately. You could select some other file in the dir
of your choice and then change the name by hand in the text field.

*Save Hierarchy:
When checked dkAnim will save channels for the selected nodes
and all nodes below them. If unchecked then only selected node channels will be

*Write Anim
Write anim to file specified. This will save all the keyable
attribues (keyed or not) to a file. For attribues with keyframes all the
keys are saved for objects scoped.. not just keys in your frame range.


dkAnim only inserts new keyframes.. so if you want to replace a curve
completely you will first have to delete all the keyframes in your object
before reading animation onto it. This is a simple step using the
Edit->Keys->Delete Keys option in Maya.

*Type in a path and name of a .dkanim file in the text field, or use browse
button to search for one.

*Use Search and Replace:
When checked the 2 fields below it are active. This is used to tweak
channel names in a saved .dkAnim file. For example if you saved animation
on an object named "A_Hip" and you want to read that onto an object named
"B_Hip" you could type "A_" in the "Search For:" field and "B_" in the
"Replace With:" field.

*Add Prefix:
This will add whatever you type to the beginning of all node names in
the saved .dkAnim file. If you wrote out animation on an object named "Hip" and
you are reading that onto an object named "A_Hip" .. just type A_ in the
"Add Prefix:" field.

*Add To Top Nodes Only (prefix option):
When checked the above prefix will only be added to nodes that are at
the root of a hierarchy (top most parent).

*Load Explicit Node Paths:
When a .dkAnim file is saved each node name is long listed.. that means
that the node name contains the full path to that object in it's hierarchy.
This is done because in Maya it's possible to have 2 nodes with the same name
as long as they are parented under different objects. So with this checked
dkAnim will look for an object with not only the same name.. but parented under
the same nodes. If you have re-parented your object or changed some of the
names in the hierarchy to that object then you'll need to uncheck this option.
If you are sure that you don't have 2 node names that are identical in your file
then it's perfectly safe to uncheck this option.

*Load Un-Keyed Attributes:
Many times when animating you might set a value of an attribute without
actually keying it.. This happens all the time in fact. dkAnim actually saves
all of these un-keyed values for your nodes in the .dkAnim file.. if this is
checked then those values are transferred to the new file.

*Limit Channels to Scope
This control goes along with the "Define Channel Scope" button. Point
the readOptions line to a valid .dkanim file and hit the "Define Channel Scope"
button. This will list all channels that exist in the .dkanim file after being
filtered though the various readOptions. If you don't have
"Load Un-keyed Attributes" checked then only keyed anim curves will be loaded
into the channel scope box. To use the feature make sure to highlight some
channels and click down the "Limit Channels to Scope" checkbox to activate the
If you update any of the search and replace fields or any other readOption
control you will need to hit "Refresh" in the channel scope window to see the
update. The is an information message that tries to tell you when the channel box is out of
sinc after you change options. The refresh also tries to keep the same selection you had
prior to a refresh.. this is handy for clicking off full paths.. selecting the nodes.. then
clicking full paths back on and retaining the selection.

[You must be registered and logged in to see this link.]


Posts : 189
Points : 422
Reputation : 5
Join date : 2011-12-07


Back to top Go down

Back to top

Permissions in this forum:
You cannot reply to topics in this forum