Deferred commands stop being executed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello!
I am using a script to set up the Maya workspace in a certain way.
Sometimes (~20% of the time), this leads to a situation where commands in the evalDeferred command queue stop getting executed, which freezes up the end of my script as well as making some parts of the Maya UI unresponsive (for example: I can no longer execute commands in the ScriptEditor, but can still execute commands in the command bar at the bottom of the Maya window.
The issue arises when operating with the TimeSlider and RangeSlider with commands like:
workspaceControl -e -visible 1 -floating true -raise TimeSlider;
workspaceControl -e -visible 1 -floating true -raise RangeSlider;
but it's hard to tell when exactly the issue begins.
Anyway, when I check the command queue with evalDeferred -list, I see that the first command in the queue is:
timeField -edit -value `currentTime -query` TimeSlider|MainTimeSliderLayout|formLayout8|timeField1
But this command never gets evaluated and later commands just pile up behind it.
The command is in the "-lowPriority" category.
I can execute this command normally from the Maya command line, so there is no problem with the command itself.
Maybe the command execution is actually stuck on whatever command came before this command.
I have tried using maya.utils.processIdleEvents() to force Maya to execute the deferred commands, but it only returns "False" and nothing changes.
Maya does not seem to use much processor time (according to Windows Task manager), so I don't think there is any background computation waiting to be finished.
The situation also does not end by itself ever after waiting for hours.
Closing the floating TimeSlider/RangeSlider windows and opening them again often gets Maya "un-stuck", and execution of deferred commands continue.
What could be possible reasons for this happening and what could be possible solutions when such a thing happens?
Thank you!
Max