From f91045d497f0a2a509feb3afdc04fec60027ae31 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Thu, 2 Dec 2021 11:33:07 +0100 Subject: [PATCH] small fixes --- openpype/hosts/tvpaint/api/launch_script.py | 2 +- openpype/hosts/tvpaint/api/lib.py | 4 ---- openpype/hosts/tvpaint/api/pipeline.py | 17 ++++++++++------- .../plugins/publish/collect_instances.py | 2 +- 4 files changed, 12 insertions(+), 13 deletions(-) diff --git a/openpype/hosts/tvpaint/api/launch_script.py b/openpype/hosts/tvpaint/api/launch_script.py index ec34442d28..e66bf61df6 100644 --- a/openpype/hosts/tvpaint/api/launch_script.py +++ b/openpype/hosts/tvpaint/api/launch_script.py @@ -35,7 +35,7 @@ def main(launch_args): # Create Communicator object and trigger launch # - this must be done before anything is processed - communicator = CommunicationWrapper.create_communicator(qt_app) + communicator = CommunicationWrapper.create_qt_communicator(qt_app) communicator.launch(launch_args) def process_in_main_thread(): diff --git a/openpype/hosts/tvpaint/api/lib.py b/openpype/hosts/tvpaint/api/lib.py index e41bbb5aad..654aff19d8 100644 --- a/openpype/hosts/tvpaint/api/lib.py +++ b/openpype/hosts/tvpaint/api/lib.py @@ -5,10 +5,6 @@ import tempfile import avalon.io from . import CommunicationWrapper -from .pipeline import ( - list_instances, - write_instances -) log = logging.getLogger(__name__) diff --git a/openpype/hosts/tvpaint/api/pipeline.py b/openpype/hosts/tvpaint/api/pipeline.py index 235d5525f4..e7c5159bbc 100644 --- a/openpype/hosts/tvpaint/api/pipeline.py +++ b/openpype/hosts/tvpaint/api/pipeline.py @@ -15,7 +15,10 @@ from avalon.pipeline import AVALON_CONTAINER_ID from openpype.hosts import tvpaint from openpype.api import get_current_project_settings -from .communication_server import CommunicationWrapper +from .lib import ( + execute_george, + execute_george_through_file +) log = logging.getLogger(__name__) @@ -214,7 +217,7 @@ def get_workfile_metadata_string_for_keys(metadata_keys): # Execute the script george_script = "\n".join(george_script_parts) - CommunicationWrapper.execute_george_through_file(george_script) + execute_george_through_file(george_script) # Load data from temp file with open(output_filepath, "r") as stream: @@ -329,7 +332,7 @@ def write_workfile_metadata(metadata_key, value): george_script = "\n".join(george_script_parts) - return CommunicationWrapper.execute_george_through_file(george_script) + return execute_george_through_file(george_script) def get_current_workfile_context(): @@ -443,7 +446,7 @@ def set_context_settings(asset_doc=None): framerate = project_doc["data"].get("fps") if framerate is not None: - CommunicationWrapper.execute_george( + execute_george( "tv_framerate {} \"timestretch\"".format(framerate) ) else: @@ -461,7 +464,7 @@ def set_context_settings(asset_doc=None): if width is None or height is None: print("Resolution was not found!") else: - CommunicationWrapper.execute_george( + execute_george( "tv_resizepage {} {} 0".format(width, height) ) @@ -484,5 +487,5 @@ def set_context_settings(asset_doc=None): mark_in = 0 mark_out = mark_in + (frame_end - frame_start) + handle_start + handle_end - CommunicationWrapper.execute_george("tv_markin {} set".format(mark_in)) - CommunicationWrapper.execute_george("tv_markout {} set".format(mark_out)) + execute_george("tv_markin {} set".format(mark_in)) + execute_george("tv_markout {} set".format(mark_out)) diff --git a/openpype/hosts/tvpaint/plugins/publish/collect_instances.py b/openpype/hosts/tvpaint/plugins/publish/collect_instances.py index 1d7a48e389..31d2fd1fd5 100644 --- a/openpype/hosts/tvpaint/plugins/publish/collect_instances.py +++ b/openpype/hosts/tvpaint/plugins/publish/collect_instances.py @@ -218,7 +218,7 @@ class CollectInstances(pyblish.api.ContextPlugin): # - not 100% working as it was found out that layer ids can't be # used as unified identifier across multiple workstations layers_by_id = { - layer["id"]: layer + layer["layer_id"]: layer for layer in layers_data } layer_ids = instance_data["layer_ids"]