mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Revert "Merge branch 'draft/pyblish_pype_keep_gui_responsive' into feature/451-Fusion_basic_integration"
This reverts commit bcb7201ffb.
This commit is contained in:
parent
bcb7201ffb
commit
04ea72f0a6
1 changed files with 2 additions and 34 deletions
|
|
@ -9,10 +9,8 @@ import os
|
|||
import sys
|
||||
import traceback
|
||||
import inspect
|
||||
import threading
|
||||
|
||||
import six
|
||||
from Qt import QtCore, QtWidgets
|
||||
from Qt import QtCore
|
||||
|
||||
import pyblish.api
|
||||
import pyblish.util
|
||||
|
|
@ -30,27 +28,6 @@ class IterationBreak(Exception):
|
|||
pass
|
||||
|
||||
|
||||
class ProcessThread(threading.Thread):
|
||||
def __init__(self, plugin, context, instance):
|
||||
super(ProcessThread, self).__init__()
|
||||
|
||||
self.result = None
|
||||
self.exception = None
|
||||
|
||||
self.plugin = plugin
|
||||
self.context = context
|
||||
self.instance = instance
|
||||
|
||||
def run(self):
|
||||
try:
|
||||
result = pyblish.plugin.process(
|
||||
self.plugin, self.context, self.instance
|
||||
)
|
||||
self.result = result
|
||||
except Exception:
|
||||
self.exception = sys.exc_info()
|
||||
|
||||
|
||||
class Controller(QtCore.QObject):
|
||||
# Emitted when the GUI is about to start processing;
|
||||
# e.g. resetting, validating or publishing.
|
||||
|
|
@ -254,16 +231,7 @@ class Controller(QtCore.QObject):
|
|||
self.processing["nextOrder"] = plugin.order
|
||||
|
||||
try:
|
||||
thread = ProcessThread(plugin, self.context, instance)
|
||||
thread.start()
|
||||
while thread.isAlive():
|
||||
QtWidgets.QApplication.processEvents()
|
||||
|
||||
thread.join()
|
||||
if thread.exception:
|
||||
six.reraise(*thread.exception)
|
||||
|
||||
result = thread.result
|
||||
result = pyblish.plugin.process(plugin, self.context, instance)
|
||||
# Make note of the order at which the
|
||||
# potential error error occured.
|
||||
if result["error"] is not None:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue