Mikademius
02-07-2008, 02:41 PM
Hi gang. Haven't been scripting for over a month now (Been surfin' the waves East Coast Oz!) and one single MEL line is killing me today. I just need help puttin' the line in a button command. Simple task, but my head is grease right now...
The task I want to do is a normal OBJ Export. The code for this is:
file -op "groups=0;ptgroups=0;materials=0smoothing" -typ "OBJexport" -pr -es ($ah_wbExportConcatenatePath + (`textField -q -tx ah_wbExportObjNewNameTF`));
where
($ah_wbExportConcatenatePath + (`textField -q -tx ah_wbExportObjNewNameTF`)
is just to get the filename based on a path and given textstring in a textField. This is not important.
To get the code running I thought I should use the "eval" command and this is working in the scriptEditor. "Yey, now all I have to do is set this in the -c of the button"...
eval("file -op \"groups=0;ptgroups=0;materials=0smoothing\" -typ \"OBJexport\" -pr -es ($ah_wbExportConcatenatePath + (`textField -q -tx ah_wbExportObjNewNameTF`))")
Could someone help me with the last part here.
button -l "export" -c ? buttonName;
""'s, ()'s or what? I've tried several syntaxes and I'm going blind so I reach out to the international super MEL community :)
The task I want to do is a normal OBJ Export. The code for this is:
file -op "groups=0;ptgroups=0;materials=0smoothing" -typ "OBJexport" -pr -es ($ah_wbExportConcatenatePath + (`textField -q -tx ah_wbExportObjNewNameTF`));
where
($ah_wbExportConcatenatePath + (`textField -q -tx ah_wbExportObjNewNameTF`)
is just to get the filename based on a path and given textstring in a textField. This is not important.
To get the code running I thought I should use the "eval" command and this is working in the scriptEditor. "Yey, now all I have to do is set this in the -c of the button"...
eval("file -op \"groups=0;ptgroups=0;materials=0smoothing\" -typ \"OBJexport\" -pr -es ($ah_wbExportConcatenatePath + (`textField -q -tx ah_wbExportObjNewNameTF`))")
Could someone help me with the last part here.
button -l "export" -c ? buttonName;
""'s, ()'s or what? I've tried several syntaxes and I'm going blind so I reach out to the international super MEL community :)
