Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

userSetup.mel hangs Maya if -event "idle" is used, how to make it work?

userSetup.mel hangs Maya if -event "idle" is used, how to make it work?

malcolm_341
Collaborator Collaborator
593 Views
1 Reply
Message 1 of 2

userSetup.mel hangs Maya if -event "idle" is used, how to make it work?

malcolm_341
Collaborator
Collaborator

Hi there, I've created a custom HUD element which displays the Y up or Z up axis from the settings menu. Everything works fine, but if I put this code in my userSetup.mel file Maya 2022 will hang when it tries to load, getting stuck on loading quatNodes.mll. I've tracked the problem down to the -event "idle" command I'm using to update the HUD. What is the trick to make this work because I need to use -event "idle"?

 

Code here if you want to try for yourself

global proc string m341_extraHUD_upAxis_Display()
{
	string $upAxis = `upAxis -q -ax`;
	return $upAxis;
}

int $sectionVar = 2;
int $nextFreeBlock = `headsUpDisplay -nextFreeBlock $sectionVar`;

headsUpDisplay -section $sectionVar -block $nextFreeBlock -blockSize "small" -label "Up Axis:" -labelFontSize "small" -command "m341_extraHUD_upAxis_Display()" -event "idle" extraHUD_upAxis_HUDName;
0 Likes
Accepted solutions (1)
594 Views
1 Reply
Reply (1)
Message 2 of 2

malcolm_341
Collaborator
Collaborator
Accepted solution

Using the event -idleHigh fixes my issue and keeps Maya from hanging while trying to run the userSetup.mel The help file was not descriptive for idleHigh, anyone know what the difference is?

0 Likes