Maya scripting


#1

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;
intField;
intField;
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 ?


#2

no one can help me to code this ??


#3

https://nccastaff.bournemouth.ac.uk/jmacey/RobTheBloke/www/mel/GUI_controls.html#IFIELD

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!


#4

Hi Kiryha,

thank you,

i will follow your advice…

have a good day

Best