PDA

View Full Version : Duplicate Refrence through code


trancor
06-05-2008, 04:40 PM
ok, so when I turn on Echo All Commands, maya pumps this out when I hit duplicate reference --
duplicateReference 1 $gReferenceEditorPanel;
Ok, thats fine, so I open the command reference, and sure enough there is no command duplicateReference. Ok, so seeing how I can't find out how to work with it that way, and that $gReferenceEditorPanel is simply the name of the reference window in maya; I don't really know how to duplicate references through code without the reference window being open.

Any help?

-- The particle side of things --
I'm looking to duplicate out scenes of an animated character to connect it's transform onto a particle. Now this is different than geometry replacement (or at least I don't know if you can do this through geo replacement), because my character is animated to work with a crowd system I wrote in maya, that the character has cycles (standing, then walking, then running, then jumping) and the crowd system I wrote calls up the animation cycles from the file. When ever I do geometry replacement it's just the same guy replicated over and over. Giving no difference in animation. Thats why I want to connect references to the particles.


If there are different ways to do what I want, that would be great too.

trancor
06-05-2008, 04:58 PM
I guess I got an idea for how to do this. I was looking around at the different commands, and checked out File. And as of right now I'm just generating new refrences on the fly, but this is making the run time for the scripts and systems to go slow.


string $refName=`referenceQuery -filename attackerRN`;
file -r -ns "attacker" $refName;



Any better ways of doing what I'm trying to do?

greatPumpkin
06-05-2008, 06:12 PM
duplicate reference is a mel script, you can find where it exsits on your local machine by running the following:

whatIs duplicateReference;

also your solution should work just fine too-

CGTalk Moderation
06-05-2008, 06:12 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.