Announcements
Due to scheduled maintenance, the Autodesk Community will be inaccessible from 10:00PM PDT on Oct 16th for approximately 1 hour. We appreciate your patience during this time.
Community
Maya Programming
Welcome to Autodesk’s Maya Forums. Share your knowledge, ask questions, and explore popular Maya SDK topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Script job in userSetup.mel freezes Maya at start.

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
malcolm_341
252 Views, 2 Replies

Script job in userSetup.mel freezes Maya at start.

Hi, I'm trying to start a script job when Maya starts by putting it in the userSetup.mel file. For some reason my script job keeps Maya from starting and the program is hung while loading the the lookdev plugin while also hammering the CPU I think. Any way to get this script job to run without freezing Maya? I already tried evalDeferred and it produced the same hang.

 

scriptJob -runOnce 0 -compressUndo 1 -event "idle" "m341_extraHUD_refreshTimer";

2 REPLIES 2
Message 2 of 3
brentmc
in reply to: malcolm_341

Hi,

Maya will only run a single normal priority idle event each time through the event loop so having a persistent idle event can prevent lower priority idle events from running.

So I would first suggest either changing the event to "idleVeryLow" which will only be run if there are no other higher priority idle events. (and seems to be missing from the scriptJob command documentation)

There is also "idleHigh" which always gets run (and I don't think will starve lower priority idle events) but I would recommend trying "idleVeryLow" first.

Brent McPherson
Principle Engineer
Message 3 of 3
malcolm_341
in reply to: brentmc

@brentmcThanks! That's working, now I can get my script to trigger after Maya's been restarted which is a big improvement to the functionality of the tool. Thanks for your help.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report