View Full Version : Testing if an expression exists through mel
02-07-2008, 07:21 AM
A big part of one of my scripts is creating copies of an object, and creating an expression for it. Then after it does its job, the object gets deleted, but the expressions do not.
I call for the delete more times than the object exists...this is fine because i can test
if (objExists blah)
unfortunately this does not work for an expression...it seems the only other exists are for straight commands (exists) objects (objExists) particles (particleExists) and attributes (attributeExists)
Is there any way to test if an expression exists?
02-07-2008, 01:13 PM
command objExists should work with expression also.
I made quick test. Created object with expression "expression1"
And command: objExists "expression1";
returns 1 - true.
Hope this helps :)
02-07-2008, 10:49 PM
I can confirm that objExists does delete expressions as I use it :)
02-08-2008, 12:46 AM
omg...your right...what was I doing........
I blame the hours staring at the screen.
Thanks a bunch!
hello.. sorry for taking this thread, but I have the same question. I want to delete the an expression which is in the Use Image Sequence.
First I tried this,
setAttr "file1.useFrameExtension" 1;
I thought I could do this. but nothing happend
if (`objectExists "expression1"`)
I get this msg. and the expression stills there.
// Warning: line 184: attribute already connected: particleShape1.currentTime
Thanks in advance.
09-30-2008, 09:58 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.