-
Notifications
You must be signed in to change notification settings - Fork 129
Pyblish Pype: Improve UI updates during processing #2646
Conversation
- This now defaults to having "animations" disabled - with the small timeout that was there '3' that didn't visually show anyway. So disabling them doesn't make much of a difference, except for that the UI correctly updates to the latest state.
@@ -74,6 +74,10 @@ def _execute(self): | |||
item = self._items_to_process.popleft() | |||
item.process() | |||
|
|||
# Process events directly after the item processed. This allows to | |||
# correctly show "highlighted" state for the next item to process | |||
QtWidgets.QApplication.instance().processEvents() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be honest I and don't like this. It can trigger processing of next plugin directly or cause issues on different builds of Qt. If you'll change time interval back to 3 then you don't need to do it (interval 3ms == 0.003s).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure? Isn't that exactly what it is supposed to counter?
An interval or zero should wait for all events to process?. I'd be happy to change it back of course. Just wondering what could actually happen.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd be happy to change it back of course. Just wondering what could actually happen.
The whole reason of using timer with timeout is to avoid calling processEvents
. It caused issues on other than windows platforms especially in hosts with Qt binding.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted interval back to 3 with 6c12932
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The goal was to remove this line with processEvents
:)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately it doesn't work as intended without that line.
Without processEvents() I had to put the timer_interval above 8
or so to sometimes get it to look right but it's visually slower to process (just due to the amount of plug-ins.)
Say there's about 60 plug-ins in Maya x 3 instances that can run into 60x3x8 = 1440ms vs 540ms. I mean those are not crazy differences if then "everything always works". But originally the delay was much higher, e.g. 50ms intervals would make it 60x3x50 = 9000ms = 9s that the UI would always add as overhead between running the plug-ins. And with 8
or 10
interval it still happens that some runs it doesn't actually highlight correctly, and I haven't had that happen with the processEvents()
in my tests here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iLLiCiTiT It also fixes the cases where if you press the STOP button during the Extract Pointcache that takes a long time that it actually stops after it's done. Otherwise it'd still continue to Integrate Asset New.
Removed comment in code because you're right. I think it had longer timeout in past. |
f13c83e Added a setting to disable the "info" printing to the console that just prints things like this:
Note that the duplicate ones are "per instance" However, I kept the default setting to have it enabled so you won't notice unless you set the env var or explicitly override the setting in |
Avoid using processEvents
Thanks to some tweaks by @iLLiCiTiT the explicit call to |
There was an issue with the recent speed ups for pyblish with UI not drawing correctly.
OPENPYPE_PYBLISH_ANIMATED
in settings. With the small timeout that was introduced recently with Publish pype: Reduce publish process defering #2464 which sped up the publishing by tons it did mean animations didn't really visually show anyway. So disabling them doesn't make much of a difference, except for that the UI correctly updates to the latest state.