nier
01-15-2008, 03:28 PM
Hi
I am trying to delete objects' expressions using Python, using the following code:
#option 1 (e = expression name)
cmds.delete(e)
#option 2
cmds.select(e, r=1)
cmds.delete()
But both give me the error: "TypeError: Object expression1 is invalid #"
But it seems to work in MEL, at least when I type it in the script editor...
Does anybody know how to solve this? Or maybe is there a better way to delete all expressions from a given object?
Thank you!
Daniel
I am trying to delete objects' expressions using Python, using the following code:
#option 1 (e = expression name)
cmds.delete(e)
#option 2
cmds.select(e, r=1)
cmds.delete()
But both give me the error: "TypeError: Object expression1 is invalid #"
But it seems to work in MEL, at least when I type it in the script editor...
Does anybody know how to solve this? Or maybe is there a better way to delete all expressions from a given object?
Thank you!
Daniel
