Mel Script Not Working on MAYA 2018
Hey,
How is it going, I have this Mel script but for some reason it works on Maya 2022 but it has errors on Maya 2018. Would any one be able to point out why it my not be working. Thank you
//Returns TimeWarp State as Enabled/Disabled
global proc string checkTimeWarpState ()
{
global int $timeWarpState;
string $state;
$timeWarpState = `getAttr time1.enableTimewarp`;
if ($timeWarpState == 0)
{
$state = "Disabled";
//print("checkTimeWarpState: " + $state + "\n");
}
else if ($timeWarpState == 1)
{
$state = "Enabled";
//print("State: " + $state + "\n");
}
return $state;
} // TimeWarp State return end
global proc Enable_TimeWarp_HUD ()
{
global int $timeWarpState;
//Enable timeWarp
EnableTimeWarp;
//set TimeWarp State to var to read later
$timeWarpState = `getAttr time1.enableTimewarp`;
print("timeWarpState: " + $timeWarpState + "\n");
print("checkTimeWarpState: " + checkTimeWarpState() + "\n");
if ($timeWarpState == 1){
//Turn on heads headsUpDisplay
headsUpDisplay -section 3
-block 0
-blockSize "large"
-label "TimeWarp :"
-labelFontSize "large"
-command "checkTimeWarpState()"
-event "SelectionChanged"
-nodeChanges "attributeChange"
HUDTimeWarpEnabled;
}else if ($timeWarpState == 0){
//setTimeWarp();
headsUpDisplay -rem HUDTimeWarpEnabled;
}//check enabled/disabled end
}//EnableHUD end