godolinium
05-29-2007, 08:28 PM
Hi there, I hope someone can spare me the time of day for a rather noob question.
Ive been using mel since I started using Maya years ago but never more than to replicate functions I was seeing printed in the script editor window.
Im now trying to write a script to automate part of the animation process and keep finding holes in my mel vocab.
If I have a group in my scene called theGroupInMyScene (at the root level in my outliner)
and run the folowing script...
if( !`objExists ("theGroupInMyScene")` );
{
group -em;
rename"null1" "theGroupInMyScene";
};
rather than skiping the mel (like I would hope) it executes and creates a second group called theGroupInMyScene1.
If someone can shed some light on how to write an if else statement with a not opperator, inorder to test if a group exists I would really appreciate it
Ta
Ive been using mel since I started using Maya years ago but never more than to replicate functions I was seeing printed in the script editor window.
Im now trying to write a script to automate part of the animation process and keep finding holes in my mel vocab.
If I have a group in my scene called theGroupInMyScene (at the root level in my outliner)
and run the folowing script...
if( !`objExists ("theGroupInMyScene")` );
{
group -em;
rename"null1" "theGroupInMyScene";
};
rather than skiping the mel (like I would hope) it executes and creates a second group called theGroupInMyScene1.
If someone can shed some light on how to write an if else statement with a not opperator, inorder to test if a group exists I would really appreciate it
Ta
