PDA

View Full Version : Need help in mel script...


aslaminanimation
01-24-2011, 03:07 PM
Hi im new to mel scripting, may be it is simple sorry for that. please help me with this...

I have created curve with name Pelvis_Ctrl with attribute Mirror_Pose. If i change the attr Mirror pose, set of commands need to execute. I have used Script job command to do this task. I have used Script node to parent this script to the scene file. If i execute the command it works but the problem is if i close the file and reopen the file the script doedn't work. I again needed to execute this commands. May be i was wrong with "scriptNode" command . Pls help me with this so that i d't run this scipt every time i open the file. Here we go..

scriptNode -st 1 -bs dothis;
global proc dothis()
{
scriptJob -per -cu true -ac "Pelvis_Ctrl.Mirror_Pose" "sel";
}




global proc sel()
{
print "script works";
}

dothis;

Thanks n advance...

3dKris
01-24-2011, 06:56 PM
well, if I remember correctly, your script job command will need to be run every time the scene opens. The easiest way to do that is to go into Window>Animation Editors>Expression Editor, then in the expression editor, Selec Filter>By Script Node Name. Then make a script node that has "execute on:" set to Open/Close. That should make the script Node run every time that scene file is opened.

Hope this helps!

CGTalk Moderation
01-24-2011, 06:56 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.