From 1106554fb6fb40abb130f24df0163fd660d54d80 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Thu, 1 Apr 2021 14:17:57 +0200 Subject: [PATCH] Resolve: rebranding to OpenPype --- pype/hosts/resolve/README.markdown | 10 ++++---- pype/hosts/resolve/api/lib.py | 24 +++++++++---------- pype/hosts/resolve/api/menu.py | 8 +++---- pype/hosts/resolve/api/menu_style.qss | 2 +- pype/hosts/resolve/api/pipeline.py | 4 ++-- pype/hosts/resolve/api/plugin.py | 6 ++--- pype/hosts/resolve/api/todo-rendering.py | 2 +- pype/hosts/resolve/api/utils.py | 2 +- pype/hosts/resolve/hooks/pre_resolve_setup.py | 2 +- .../plugins/create/create_shot_clip.py | 2 +- .../plugins/publish/collect_instances.py | 2 +- ...ripts.py => OpenPype_sync_util_scripts.py} | 2 +- ..._PYPE__MENU__.py => __OpenPype__Menu__.py} | 4 ++-- .../utility_scripts/tests/test_otio_as_edl.py | 4 ++-- .../testing_create_timeline_item_from_path.py | 4 ++-- 15 files changed, 39 insertions(+), 39 deletions(-) rename pype/hosts/resolve/utility_scripts/{PYPE_sync_util_scripts.py => OpenPype_sync_util_scripts.py} (82%) rename pype/hosts/resolve/utility_scripts/{__PYPE__MENU__.py => __OpenPype__Menu__.py} (82%) diff --git a/pype/hosts/resolve/README.markdown b/pype/hosts/resolve/README.markdown index f8d2da0794..50664fbd21 100644 --- a/pype/hosts/resolve/README.markdown +++ b/pype/hosts/resolve/README.markdown @@ -1,7 +1,7 @@ #### Basic setup - Install [latest DaVinci Resolve](https://sw.blackmagicdesign.com/DaVinciResolve/v16.2.8/DaVinci_Resolve_Studio_16.2.8_Windows.zip?Key-Pair-Id=APKAJTKA3ZJMJRQITVEA&Signature=EcFuwQFKHZIBu2zDj5LTCQaQDXcKOjhZY7Fs07WGw24xdDqfwuALOyKu+EVzDX2Tik0cWDunYyV0r7hzp+mHmczp9XP4YaQXHdyhD/2BGWDgiMsiTQbNkBgbfy5MsAMFY8FHCl724Rxm8ke1foWeUVyt/Cdkil+ay+9sL72yFhaSV16sncko1jCIlCZeMkHhbzqPwyRuqLGmxmp8ey9KgBhI3wGFFPN201VMaV+RHrpX+KAfaR6p6dwo3FrPbRHK9TvMI1RA/1lJ3fVtrkDW69LImIKAWmIxgcStUxR9/taqLOD66FNiflHd1tufHv3FBa9iYQsjb3VLMPx7OCwLyg==&Expires=1608308139) -- add absolute path to ffmpeg into pype settings +- add absolute path to ffmpeg into openpype settings ![image](https://user-images.githubusercontent.com/40640033/102630786-43294f00-414d-11eb-98de-f0ae51f62077.png) - install Python 3.6 into `%LOCALAPPDATA%/Programs/Python/Python36` (only respected path by Resolve) - install OpenTimelineIO for 3.6 `%LOCALAPPDATA%\Programs\Python\Python36\python.exe -m pip install git+https://github.com/PixarAnimationStudios/OpenTimelineIO.git@5aa24fbe89d615448876948fe4b4900455c9a3e8` and move builded files from `%LOCALAPPDATA%/Programs/Python/Python36/Lib/site-packages/opentimelineio/cxx-libs/bin and lib` to `%LOCALAPPDATA%/Programs/Python/Python36/Lib/site-packages/opentimelineio/`. I was building it on Win10 machine with Visual Studio Community 2019 and @@ -16,11 +16,11 @@ This is how it looks on my testing project timeline ![image](https://user-images.githubusercontent.com/40640033/102637638-96ec6600-4156-11eb-9656-6e8e3ce4baf8.png) Notice I had renamed tracks to `main` (holding metadata markers) and `review` used for generating review data with ffmpeg confersion to jpg sequence. -1. you need to start Pype menu from Resolve/EditTab/Menu/Workspace/Scripts/**PYPE_MENU** +1. you need to start OpenPype menu from Resolve/EditTab/Menu/Workspace/Scripts/**__OpenPype_Menu__** 2. then select any clips in `main` track and change their color to `Chocolate` -3. in Pype Menu select `Create` +3. in OpenPype Menu select `Create` 4. in Creator select `Create Publishable Clip [New]` (temporary name) 5. set `Rename clips` to True, Master Track to `main` and Use review track to `review` as in picture ![image](https://user-images.githubusercontent.com/40640033/102643773-0d419600-4160-11eb-919e-9c2be0aecab8.png) -6. after you hit `ok` all clips are colored to `ping` and marked with pype metadata tag -7. git `Publish` on pype menu and see that all had been collected correctly. That is the last step for now as rest is Work in progress. Next steps will follow. +6. after you hit `ok` all clips are colored to `ping` and marked with openpype metadata tag +7. git `Publish` on openpype menu and see that all had been collected correctly. That is the last step for now as rest is Work in progress. Next steps will follow. diff --git a/pype/hosts/resolve/api/lib.py b/pype/hosts/resolve/api/lib.py index 11bf8a3217..5c204bf709 100644 --- a/pype/hosts/resolve/api/lib.py +++ b/pype/hosts/resolve/api/lib.py @@ -16,24 +16,24 @@ self = sys.modules[__name__] self.project_manager = None self.media_storage = None -# Pype sequencial rename variables +# OpenPype sequencial rename variables self.rename_index = 0 self.rename_add = 0 self.publish_clip_color = "Pink" self.pype_marker_workflow = True -# Pype compound clip workflow variable +# OpenPype compound clip workflow variable self.pype_tag_name = "VFX Notes" -# Pype marker workflow variables -self.pype_marker_name = "PYPEDATA" +# OpenPype marker workflow variables +self.pype_marker_name = "OpenPypeData" self.pype_marker_duration = 1 self.pype_marker_color = "Mint" self.temp_marker_frame = None -# Pype default timeline -self.pype_timeline_name = "PypeTimeline" +# OpenPype default timeline +self.pype_timeline_name = "OpenPypeTimeline" @contextlib.contextmanager @@ -360,13 +360,13 @@ def get_pype_timeline_item_by_name(name: str) -> object: def get_timeline_item_pype_tag(timeline_item): """ - Get pype track item tag created by creator or loader plugin. + Get openpype track item tag created by creator or loader plugin. Attributes: trackItem (resolve.TimelineItem): resolve object Returns: - dict: pype tag data + dict: openpype tag data """ return_tag = None @@ -389,7 +389,7 @@ def get_timeline_item_pype_tag(timeline_item): def set_timeline_item_pype_tag(timeline_item, data=None): """ - Set pype track item tag to input timeline_item. + Set openpype track item tag to input timeline_item. Attributes: trackItem (resolve.TimelineItem): resolve api object @@ -399,7 +399,7 @@ def set_timeline_item_pype_tag(timeline_item, data=None): """ data = data or dict() - # get available pype tag if any + # get available openpype tag if any tag_data = get_timeline_item_pype_tag(timeline_item) if self.pype_marker_workflow: @@ -418,7 +418,7 @@ def set_timeline_item_pype_tag(timeline_item, data=None): self.pype_tag_name, json.dumps(tag_data)) else: tag_data = data - # if pype tag available then update with input data + # if openpype tag available then update with input data # add it to the input track item timeline_item.SetMetadata(self.pype_tag_name, json.dumps(tag_data)) @@ -672,7 +672,7 @@ def _validate_tc(x): def get_pype_clip_metadata(clip): """ - Get pype metadata created by creator plugin + Get openpype metadata created by creator plugin Attributes: clip (resolve.TimelineItem): resolve's object diff --git a/pype/hosts/resolve/api/menu.py b/pype/hosts/resolve/api/menu.py index 73ea937513..68ba3af967 100644 --- a/pype/hosts/resolve/api/menu.py +++ b/pype/hosts/resolve/api/menu.py @@ -44,11 +44,11 @@ class Spacer(QtWidgets.QWidget): self.setLayout(layout) -class PypeMenu(QtWidgets.QWidget): +class OpenPypeMenu(QtWidgets.QWidget): def __init__(self, *args, **kwargs): super(self.__class__, self).__init__(*args, **kwargs) - self.setObjectName("PypeMenu") + self.setObjectName("OpenPypeMenu") self.setWindowFlags( QtCore.Qt.Window @@ -58,7 +58,7 @@ class PypeMenu(QtWidgets.QWidget): | QtCore.Qt.WindowStaysOnTopHint ) - self.setWindowTitle("Pype") + self.setWindowTitle("OpenPype") workfiles_btn = QtWidgets.QPushButton("Workfiles", self) create_btn = QtWidgets.QPushButton("Create", self) publish_btn = QtWidgets.QPushButton("Publish", self) @@ -144,7 +144,7 @@ class PypeMenu(QtWidgets.QWidget): def launch_pype_menu(): app = QtWidgets.QApplication(sys.argv) - pype_menu = PypeMenu() + pype_menu = OpenPypeMenu() stylesheet = load_stylesheet() pype_menu.setStyleSheet(stylesheet) diff --git a/pype/hosts/resolve/api/menu_style.qss b/pype/hosts/resolve/api/menu_style.qss index 5a1d39fe79..fd947e58c1 100644 --- a/pype/hosts/resolve/api/menu_style.qss +++ b/pype/hosts/resolve/api/menu_style.qss @@ -51,7 +51,7 @@ QLineEdit { qproperty-alignment: AlignCenter; } -#PypeMenu { +#OpenPypeMenu { border: 1px solid #fef9ef; } diff --git a/pype/hosts/resolve/api/pipeline.py b/pype/hosts/resolve/api/pipeline.py index 2d08203650..7666ac670b 100644 --- a/pype/hosts/resolve/api/pipeline.py +++ b/pype/hosts/resolve/api/pipeline.py @@ -150,7 +150,7 @@ def ls(): def parse_container(timeline_item, validate=True): - """Return container data from timeline_item's pype tag. + """Return container data from timeline_item's openpype tag. Args: timeline_item (hiero.core.TrackItem): A containerised track item. @@ -187,7 +187,7 @@ def parse_container(timeline_item, validate=True): def update_container(timeline_item, data=None): - """Update container data to input timeline_item's pype tag. + """Update container data to input timeline_item's openpype tag. Args: timeline_item (hiero.core.TrackItem): A containerised track item. diff --git a/pype/hosts/resolve/api/plugin.py b/pype/hosts/resolve/api/plugin.py index 0423f15c2a..1273c9f1df 100644 --- a/pype/hosts/resolve/api/plugin.py +++ b/pype/hosts/resolve/api/plugin.py @@ -25,7 +25,7 @@ class CreatorWidget(QtWidgets.QDialog): | QtCore.Qt.WindowCloseButtonHint | QtCore.Qt.WindowStaysOnTopHint ) - self.setWindowTitle(name or "Pype Creator Input") + self.setWindowTitle(name or "OpenPype Creator Input") self.resize(500, 700) # Where inputs and labels are set @@ -527,7 +527,7 @@ class PublishClip: kwargs (optional): additional data needed for rename=True (presets) Returns: - hiero.core.TrackItem: hiero track item object with pype tag + hiero.core.TrackItem: hiero track item object with openpype tag """ vertical_clip_match = dict() tag_data = dict() @@ -623,7 +623,7 @@ class PublishClip: "track_data": self.timeline_item_data["track"] }) - # create pype tag on timeline_item and add data + # create openpype tag on timeline_item and add data lib.imprint(self.timeline_item, self.tag_data) return self.timeline_item diff --git a/pype/hosts/resolve/api/todo-rendering.py b/pype/hosts/resolve/api/todo-rendering.py index 87b04dd98f..5238d76dec 100644 --- a/pype/hosts/resolve/api/todo-rendering.py +++ b/pype/hosts/resolve/api/todo-rendering.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# TODO: convert this script to be usable with PYPE +# TODO: convert this script to be usable with OpenPype """ Example DaVinci Resolve script: Load a still from DRX file, apply the still to all clips in all timelines. diff --git a/pype/hosts/resolve/api/utils.py b/pype/hosts/resolve/api/utils.py index 32ac5b2aa9..25110de327 100644 --- a/pype/hosts/resolve/api/utils.py +++ b/pype/hosts/resolve/api/utils.py @@ -146,4 +146,4 @@ def setup(env=None): # synchronize resolve utility scripts _sync_utility_scripts(env) - log.info("Resolve Pype wrapper has been installed") + log.info("Resolve OpenPype wrapper has been installed") diff --git a/pype/hosts/resolve/hooks/pre_resolve_setup.py b/pype/hosts/resolve/hooks/pre_resolve_setup.py index d19c56fe09..9e003cc538 100644 --- a/pype/hosts/resolve/hooks/pre_resolve_setup.py +++ b/pype/hosts/resolve/hooks/pre_resolve_setup.py @@ -14,7 +14,7 @@ class ResolvePrelaunch(PreLaunchHook): app_groups = ["resolve"] def execute(self): - # TODO: add OTIO installation from `pype/requirements.py` + # TODO: add OTIO installation from `openpype/requirements.py` # making sure pyton 3.6 is installed at provided path py36_dir = os.path.normpath( self.launch_context.env.get("PYTHON36_RESOLVE", "")) diff --git a/pype/hosts/resolve/plugins/create/create_shot_clip.py b/pype/hosts/resolve/plugins/create/create_shot_clip.py index 09b2b73775..5b7dd66a25 100644 --- a/pype/hosts/resolve/plugins/create/create_shot_clip.py +++ b/pype/hosts/resolve/plugins/create/create_shot_clip.py @@ -12,7 +12,7 @@ class CreateShotClip(resolve.Creator): defaults = ["Main"] gui_tracks = resolve.get_video_track_names() - gui_name = "Pype publish attributes creator" + gui_name = "OpenPype publish attributes creator" gui_info = "Define sequential rename and fill hierarchy data." gui_inputs = { "renameHierarchy": { diff --git a/pype/hosts/resolve/plugins/publish/collect_instances.py b/pype/hosts/resolve/plugins/publish/collect_instances.py index b1eafd512e..2465e2e2c4 100644 --- a/pype/hosts/resolve/plugins/publish/collect_instances.py +++ b/pype/hosts/resolve/plugins/publish/collect_instances.py @@ -26,7 +26,7 @@ class CollectInstances(pyblish.api.ContextPlugin): data = dict() timeline_item = timeline_item_data["clip"]["item"] - # get pype tag data + # get openpype tag data tag_data = resolve.get_timeline_item_pype_tag(timeline_item) self.log.debug(f"__ tag_data: {pformat(tag_data)}") diff --git a/pype/hosts/resolve/utility_scripts/PYPE_sync_util_scripts.py b/pype/hosts/resolve/utility_scripts/OpenPype_sync_util_scripts.py similarity index 82% rename from pype/hosts/resolve/utility_scripts/PYPE_sync_util_scripts.py rename to pype/hosts/resolve/utility_scripts/OpenPype_sync_util_scripts.py index 753bddc1da..5b5d487c74 100644 --- a/pype/hosts/resolve/utility_scripts/PYPE_sync_util_scripts.py +++ b/pype/hosts/resolve/utility_scripts/OpenPype_sync_util_scripts.py @@ -6,7 +6,7 @@ import pype def main(env): import pype.hosts.resolve as bmdvr - # Registers pype's Global pyblish plugins + # Registers openpype's Global pyblish plugins pype.install() bmdvr.setup(env) diff --git a/pype/hosts/resolve/utility_scripts/__PYPE__MENU__.py b/pype/hosts/resolve/utility_scripts/__OpenPype__Menu__.py similarity index 82% rename from pype/hosts/resolve/utility_scripts/__PYPE__MENU__.py rename to pype/hosts/resolve/utility_scripts/__OpenPype__Menu__.py index 230a7a80f0..d49e75bf3a 100644 --- a/pype/hosts/resolve/utility_scripts/__PYPE__MENU__.py +++ b/pype/hosts/resolve/utility_scripts/__OpenPype__Menu__.py @@ -10,10 +10,10 @@ log = Logger().get_logger(__name__) def main(env): import pype.hosts.resolve as bmdvr - # Registers pype's Global pyblish plugins + # Registers openpype's Global pyblish plugins pype.install() - # activate resolve from pype + # activate resolve from openpype avalon.install(bmdvr) log.info(f"Avalon registred hosts: {avalon.registered_host()}") diff --git a/pype/hosts/resolve/utility_scripts/tests/test_otio_as_edl.py b/pype/hosts/resolve/utility_scripts/tests/test_otio_as_edl.py index f6f9454625..819bcaa0d2 100644 --- a/pype/hosts/resolve/utility_scripts/tests/test_otio_as_edl.py +++ b/pype/hosts/resolve/utility_scripts/tests/test_otio_as_edl.py @@ -14,9 +14,9 @@ class ThisTestGUI(TestGUI): def __init__(self): super(ThisTestGUI, self).__init__() - # Registers pype's Global pyblish plugins + # Registers openpype's Global pyblish plugins pype.install() - # activate resolve from pype + # activate resolve from openpype avalon.install(bmdvr) def _open_dir_button_pressed(self, event): diff --git a/pype/hosts/resolve/utility_scripts/tests/testing_create_timeline_item_from_path.py b/pype/hosts/resolve/utility_scripts/tests/testing_create_timeline_item_from_path.py index da1f980388..4c47242ab5 100644 --- a/pype/hosts/resolve/utility_scripts/tests/testing_create_timeline_item_from_path.py +++ b/pype/hosts/resolve/utility_scripts/tests/testing_create_timeline_item_from_path.py @@ -13,9 +13,9 @@ class ThisTestGUI(TestGUI): def __init__(self): super(ThisTestGUI, self).__init__() - # Registers pype's Global pyblish plugins + # Registers openpype's Global pyblish plugins pype.install() - # activate resolve from pype + # activate resolve from openpype avalon.install(bmdvr) def _open_dir_button_pressed(self, event):