Maya scripting


Hello everyone

I am trying to make a simple export mel script to bake skel and mesh for unity export

i would like to have a single window with 2 entries, start frame; end frame like this

if ( window -exists MyWindow ) {
deleteUI MyWindow;
window -t “AutoBake” MyWindow;

rowLayout -nc 3;
button -l “Go”;

showWindow MyWindow;

and then use this :

select -cl;
select -r ls -type joint;
select -add listTransforms "-type mesh";
bakeResults -simulation true -t “STARTFRAME:ENDFRAME” -sampleBy 1 -oversamplingRate 1 -disableImplicitControl true -preserveOutsideKeys true -sparseAnimCurveBake false -removeBakedAttributeFromLayer false -removeBakedAnimFromLayer false -bakeOnOverrideLayer false -minimizeRotation true -controlPoints false -shape true {…};

But i don’t know the syntax to enter my START FRAME and END FRAME in my command line to bake

any help please ?


no one can help me to code this ??


window -t "AutoBake" MyWindow;

rowLayout -nc 3;
intField intMin;
intField intMax;
button -l "Go";

showWindow MyWindow;

$value = `intField -query -value intMin`;
print $value

MEL is a disaster, use PyMel instead!


Hi Kiryha,

thank you,

i will follow your advice…

have a good day