diff --git a/pype/hooks/premiere/prelaunch.py b/pype/hooks/premiere/prelaunch.py index 118493e9a7..c0a65c0bf2 100644 --- a/pype/hooks/premiere/prelaunch.py +++ b/pype/hooks/premiere/prelaunch.py @@ -1,5 +1,6 @@ import os import traceback +import winreg from avalon import api, io, lib from pype.lib import PypeHook from pype.api import Logger, Anatomy @@ -14,6 +15,12 @@ class PremierePrelaunch(PypeHook): shell script. """ project_code = None + reg_string_value = [{ + "path": r"Software\Adobe\CSXS.9", + "name": "PlayerDebugMode", + "type": winreg.REG_SZ, + "value": "1" + }] def __init__(self, logger=None): if not logger: @@ -55,6 +62,10 @@ class PremierePrelaunch(PypeHook): # adding project code to env env["AVALON_PROJECT_CODE"] = self.project_code + # add keys to registry + self.modify_registry() + + # start avalon try: __import__("pype.hosts.premiere") __import__("pyblish") @@ -69,6 +80,24 @@ class PremierePrelaunch(PypeHook): return True + def modify_registry(self): + # adding key to registry + for key in self.reg_string_value: + winreg.CreateKey(winreg.HKEY_CURRENT_USER, key["path"]) + rg_key = winreg.OpenKey( + key=winreg.HKEY_CURRENT_USER, + sub_key=key["path"], + reserved=0, + access=winreg.KEY_ALL_ACCESS) + + winreg.SetValueEx( + rg_key, + key["name"], + 0, + key["type"], + key["value"] + ) + def get_anatomy_filled(self): root_path = api.registered_root() project_name = self._S["AVALON_PROJECT"] diff --git a/pype/plugins/premiere/publish/collect_frameranges.py b/pype/plugins/premiere/publish/collect_frameranges.py index ffcc1023b5..075f84e8e3 100644 --- a/pype/plugins/premiere/publish/collect_frameranges.py +++ b/pype/plugins/premiere/publish/collect_frameranges.py @@ -11,7 +11,7 @@ class CollectFrameranges(pyblish.api.InstancePlugin): """ label = "Collect Clip Frameranges" - order = pyblish.api.CollectorOrder + order = pyblish.api.CollectorOrder - 0.01 families = ['clip'] def process(self, instance): diff --git a/pype/plugins/premiere/publish/collect_instance_representations.py b/pype/plugins/premiere/publish/collect_instance_representations.py index f53c60ad64..b62b47c473 100644 --- a/pype/plugins/premiere/publish/collect_instance_representations.py +++ b/pype/plugins/premiere/publish/collect_instance_representations.py @@ -12,7 +12,7 @@ class CollectClipRepresentations(pyblish.api.InstancePlugin): """ label = "Collect Clip Representations" - order = pyblish.api.CollectorOrder + order = pyblish.api.CollectorOrder + 0.1 families = ['clip'] def process(self, instance): diff --git a/pype/plugins/premiere/publish/validate_auto_sync_off.py b/pype/plugins/premiere/publish/validate_auto_sync_off.py index b6429cfa05..1f3f0b58a5 100644 --- a/pype/plugins/premiere/publish/validate_auto_sync_off.py +++ b/pype/plugins/premiere/publish/validate_auto_sync_off.py @@ -37,13 +37,7 @@ class ValidateAutoSyncOff(pyblish.api.ContextPlugin): query = 'Project where full_name is "{}"'.format(project_name) project = session.query(query).one() - invalid = None - - if project.get('custom_attributes', {}).get( - 'avalon_auto_sync', False): - invalid = project - - return invalid + return project @classmethod def repair(cls, context): @@ -55,4 +49,4 @@ class ValidateAutoSyncOff(pyblish.api.ContextPlugin): except Exception: tp, value, tb = sys.exc_info() session.rollback() - six.reraise(tp, value, tb) + raise