[code lang="c"]
// 
// aoKit
// Andrew Odendaal's Maya Script Kit
// Software developed by Andrew Odendaal
// Code compatible with versions 7 - 8.5
//
// Author : Andrew Odendaal
// E-mail : [email protected]
// Website: http://www.andrewodendaal.com
// 

global procaoKitRenderantUI()
{
window -t "Renderant";
columnLayout -adjustableColumn true;
frameLayout -l "-- Render Single Shot:" -borderStyle "in";
rowColumnLayout -numberOfColumns 2 -columnWidth 1 100 -columnWidth 2 225;
text -l "Render : "; optionMenu -w 225 shotsComboSingle; menuItem -l "Shot01";menuItem -l "Shot02";menuItem -l "Shot05";menuItem -l "Shot06";menuItem -l "Shot07";menuItem -l "Shot08";menuItem -l "Shot09";menuItem -l "Shot10";menuItem -l "Shot11";menuItem -l "Shot12";menuItem -l "Shot14";menuItem -l "Shot15";menuItem -l "Shot16";menuItem -l "Shot17";menuItem -l "Shot18";menuItem -l "Shot19";menuItem -l "Shot20";menuItem -l "Shot21";menuItem -l "Shot22";menuItem -l "Shot23";menuItem -l "Shot24";menuItem -l "Shot25";menuItem -l "Shot26";menuItem -l "Shot27";menuItem -l "Shot28";menuItem -l "Shot29";
text -l " "; button -l "Render Now!" -c ("aoKitRenderantRenderSingleShot `optionMenu -q -value shotsComboSingle`");
setParent ..;
setParent ..;


frameLayout -l "-- Render Multi Shot:" -borderStyle "in";
rowColumnLayout -numberOfColumns 4 -columnWidth 1 100 -columnWidth 2 100 -columnWidth 3 25 -columnWidth 4 100;
text -l "Render : ";textField;
text -l " to "; textField;
//setParent ..;
showWindow;
}

global proc aoKitRenderantRenderSingleShot(string $shotToRender)
{
global string $aoKitMayaProject;

string $fileNameToRender = $aoKitMayaProject + "scenes/shots/" + $shotToRender + "/" + $shotToRender + ".ma";
string $space = " ";

string $systemDo = "mayaBatch" + " -batch -file " + "\"" + $fileNameToRender + "\"";

print ("Will now start " + $systemDo);

system ( "start " + $systemDo);
}
[/code]

Leave a Reply

Your email address will not be published.