Animation: Nodes Sharing Anim When Not Supposed To!!!



Here is an outline of the problem.

    • I have a scene in which 2 like characters exist in it…each with the exact same naming conventions for each of thier respective control rigs.
    • “f_head” on one character is also “f_head” on the other character. both nurbs curve objects control the rotation of each of the character’s respective heads.
    • each character exists in the scene under its own group node named differently after each character’s separate name - one is called “char_one” and the other “char_two”
    • the problem I have is when I go to set keys using a particular method on one characters control irg. when I use the method of creating keyframes using the setKey hotkey one character’s head, the other character gets the same keyframe and aniamtion input.
    • this ONLY happens when I use the middle-mouse-button-drag-to-new-frame-number and setKey using hotkey method of keyframing.
    • this problem also only happens on a few of my team members machines, and not exclusively on the file itself. it works fine for some, and displays shared anaimtion for others.

what am I to do? we are in the midst of crunch right now and an answer would be sooooooo appreciated. under the pressure of crunch, I cannot seem to wrap my head around this additional crunchtime woe…



what method, exactly, are you using to key it?

if its just MEL, like
setKeyframe “head.rx”;

try putting the full (unique) path, ie

setKeyframe “char_one|whateverNeedsToBeInHere|head.rx”;



so here is a breakdown of the MEL barf when I perform said action…

select -cl ;

select -r f_head ; //select char_one's head node

currentTime 25 ; //select key you want the head node's value to come from on your new keyframe

currentTime -update false 30 ; //middle mouse button drag on the timeline from frame 25 to frame 30 - it does not update the character's position at that time, instead keeping the head node at the orientation that I want to key it at

setKeyframe -breakdown 0 -hierarchy none -controlPoints 0 -shape 0 {"f_head"}; //I use the setKeyframe hotkey [s] to set a keyframe on the selected head node on all keyable attributes


so there you have anoutline of my dilemma…please help. normally I would write some MEL to fix it and have it query the hierarchy then return the results to explicitly key on the selected object using the full path…but it is crunchtime right now and I have better things to spend my time on…like helping the Masterchief have all the anaimtion he needs to wipe out the Covenant forces! :wink:

Thanks for you advice so far John. You always help out the Maya crowd.


1 possibile dirty solution. you’re going to use this trick to add a prefix to all of character’s nodes:

  • delete one character and save it in its own scene. do the same for the other character.
  • reference and then import both characters back into a common scene using the reference editor to assign a unique string to all nodes.
  • make sure the rest of your team uses the same string name.
  • you’re done.

it’s a dirty solution but it should work in a pinch.


good luck.


there’s something i should clarify:

you might want to first reference both characters into a scene (to assign a unique name string to all nodes) and then import the references through the reference editor.

if you were to first ‘import’ rather than ‘reference>import’ two scenes into one with the name clash option it would only rename those nodes which conflict.

referencing and then importing will allow you to rename every chracter node with a unique naming string. for example a name string of X will place a X_name in front of every node:


and so on.


bentllama: the problem is that you are just telling to to key the head, and there are 2 of them, use the full path like I suggested.
also, the line select -cl is not needed if you are using the -r (which is “replace”) on the next line…
edit: actually, you probably dont need to select it at all (now that I read the rest of the script)

mental: if you wnat to prefix all the nodes, just select the top node and use the " prefix hierarchy names" under the modify menu…



thanks for the suggestion guys…but…

John Homer: My comrades and I are not doing it through MEL. I merely used the MEL to illustrate what we physically do by hand in the timeline and with the setKey hotkey…

mental: I have already given renaming the hierarchy a shot, and it still did not work for only those two animators on our team.

I will give the referencing a shot…perhaps there is an upstream/downstream hiccup…but I severely doubt anyhthing like that when it works fine for two separate people and consistently screws up for two others… I am boggled.

we tried clearing thier userPrefs but that still did not remedy the situation.

a call to support tomorrow I will make…reluctantly.

**** but…if anyone can figure this out, I will fire them off a free copy of Halo 2 and some swag…


hey john_homer, it is sometimes possible (mostly due to errors on the user’s part) to miss several nodes with the prefix hierarchy names command. the reference>import method basically carpet bombs the scene leaving no node untouched. i just use it so that i’m 110% sure all nodes are named the right way :slight_smile:


temp fix I think…but I am going to write something to augment the setKey system so that I can have like named objects in the same scene that only have different parent names…

a MEL script that queries the full name of what is selected and uses that name explicitly to key that object by the full path name…


I unfortunately have no time for such ventures in the midst of crunchtime…




Hey Nathan. This is a bit of a hack, but it works on my end. I can see why you would have a problem if you are selecting the objects via MEL without a full path name, or are just inputting the object in the SEL box up top.

This script seems to force Maya to print the full path name if you select it by hand. On top of that it ensures that only one object is selected to be keyed.

string $sel[] = ls -sl;
select -cl;
for ($currentNode in $sel)
select -r $currentNode;
print $currentNode;

[font=Verdana]Without knowing exactly why its happening on those 2 machines, this is just an idea that popped into my head. Best of luck.



that will just select the node itself and not give me the full path name…but hey I have help docs too and should find 5 minutes to do this… :slight_smile:


string $sel[] = ls -sl -long;
for ($current in $sel)
string $attrList[] = listAttr -k $current;
for ($attr in $attrList)
setKeyframe ($current + “.” + $attr);

did I win?
if I did, I’ll take the time to write it better tonight… I’m on the clock here :wink:
like one that keys channels only if they already have a key on them…


we have a winner. John, big thanks. I will contact you through PM about where to send the stuff…Halo 2 is out November 9th…




to get the fullpath name you can also use the listRelatives command…

 listRelatives -f;

however this also gives the shape(name) below it… :slight_smile:

this can however be removed, and this should give you the fullpath without the shapename… :slight_smile:

proc fullpathTest() 

string $daObj[] = `ls -sl`;

string $daS[] = `listRelatives -s`; //the shape of the selected object

string $daf[] = `listRelatives -f`; //the fullpath to the object 

string $fPath = `substitute ("|"+$daS[0]) $daf[0] ""`; //remove shapename from fullpath

print("fullPath = "+$fPath+" 



however a much simpler way is to use this, as John also has written… -->

ls -sl -long

this give you the same result, in one go without all the voodoo things in the testscript… thanx to John for reminding me of the powerful “ls” command, which has more flags than I remembered… :slight_smile:




Heh, I knew a high level scripter like John, dWalden or Mark W would have an answer ninja-fast

To make an excuse for my silly script, what iit did do was force that only one object would be selected, even if Maya picked al instances of the same name. I checked the docs quickly, but I just couldn’t figure out how that nugget until john posted it. the -long flag. I still find it odd that on 2 copies of Maya you would have that glitch.

Thanks for the lesson, John…!



it was not just 2 copies of Maya. it was 2 guys keying in a method that others do not frequently use…

oh well. whatever gets the job done. :slight_smile:


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.