Message 1 of 8
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello everyone! I use python to run mel code (-removeDuplicates <distance >). I want to modify the distance and execute it in the code by entering text, but why does the current runtime script report an error? (error during execution of MEL script)
def del_OBJ():
OBJ = cmds.textField("parameter", q=True, text=True)
for i in OBJ:
mel_cmd = ('-removeDuplicates', i)
path = mel.eval(mel_cmd)
return path
##-removeDuplicates <distance>
cmds.textField("parameter", editable=True,h=30, w=50)
cmds.button("Delete duplicate objects", w=130,h=30, c="del_OBJ()")
Solved! Go to Solution.