Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Resolve - loading and updating clips #932

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions pype/hosts/resolve/README.markdown
Original file line number Diff line number Diff line change
@@ -1 +1,26 @@
#### 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
![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
![image](https://user-images.githubusercontent.com/40640033/102792588-ffcb1c80-43a8-11eb-9c6b-bf2114ed578e.png) with installed CMake in PATH.
- install PySide2 for 3.6 `%LOCALAPPDATA%\Programs\Python\Python36\python.exe -m pip install PySide2`
- make sure Resovle Fusion (Fusion Tab/menu/Fusion/Fusion Setings) is set to Python 3.6
![image](https://user-images.githubusercontent.com/40640033/102631545-280b0f00-414e-11eb-89fc-98ac268d209d.png)

#### Editorial setup

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**
2. then select any clips in `main` track and change their color to `Chocolate`
3. in Pype 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.
461 changes: 461 additions & 0 deletions pype/hosts/resolve/RESOLVE_API_README_v16.2.0_up.txt

Large diffs are not rendered by default.

64 changes: 40 additions & 24 deletions pype/hosts/resolve/__init__.py
Original file line number Diff line number Diff line change
@@ -1,47 +1,56 @@
from .utils import (
from .api.utils import (
setup,
get_resolve_module
)

from .pipeline import (
from .api.pipeline import (
install,
uninstall,
ls,
containerise,
update_container,
publish,
launch_workfiles_app,
maintained_selection
)

from .lib import (
from .api.lib import (
maintain_current_timeline,
publish_clip_color,
get_project_manager,
get_current_project,
get_current_sequence,
get_current_timeline,
create_bin,
get_media_pool_item,
create_media_pool_item,
create_timeline_item,
get_timeline_item,
get_video_track_names,
get_current_track_items,
get_track_item_pype_tag,
set_track_item_pype_tag,
get_current_timeline_items,
get_pype_timeline_item_by_name,
get_timeline_item_pype_tag,
set_timeline_item_pype_tag,
imprint,
set_publish_attribute,
get_publish_attribute,
create_current_sequence_media_bin,
create_compound_clip,
swap_clips,
get_pype_clip_metadata,
set_project_manager_to_folder_name,
get_reformated_path,
get_otio_clip_instance_data
get_otio_clip_instance_data,
get_reformated_path
)

from .menu import launch_pype_menu
from .api.menu import launch_pype_menu

from .plugin import (
from .api.plugin import (
ClipLoader,
TimelineItemLoader,
Creator,
PublishClip
)

from .workio import (
from .api.workio import (
open_file,
save_file,
current_file,
Expand All @@ -50,15 +59,16 @@
work_root
)

bmdvr = None
bmdvf = None
from .api.testing_utils import TestGUI


__all__ = [
# pipeline
"install",
"uninstall",
"ls",
"containerise",
"update_container",
"reload_pipeline",
"publish",
"launch_workfiles_app",
Expand All @@ -69,29 +79,37 @@
"get_resolve_module",

# lib
"maintain_current_timeline",
"publish_clip_color",
"get_project_manager",
"get_current_project",
"get_current_sequence",
"get_current_timeline",
"create_bin",
"get_media_pool_item",
"create_media_pool_item",
"create_timeline_item",
"get_timeline_item",
"get_video_track_names",
"get_current_track_items",
"get_track_item_pype_tag",
"set_track_item_pype_tag",
"get_current_timeline_items",
"get_pype_timeline_item_by_name",
"get_timeline_item_pype_tag",
"set_timeline_item_pype_tag",
"imprint",
"set_publish_attribute",
"get_publish_attribute",
"create_current_sequence_media_bin",
"create_compound_clip",
"swap_clips",
"get_pype_clip_metadata",
"set_project_manager_to_folder_name",
"get_reformated_path",
"get_otio_clip_instance_data",
"get_reformated_path",

# menu
"launch_pype_menu",

# plugin
"ClipLoader",
"TimelineItemLoader",
"Creator",
"PublishClip",

Expand All @@ -103,7 +121,5 @@
"file_extensions",
"work_root",

# singleton with black magic resolve module
"bmdvr",
"bmdvf"
"TestGUI"
]
11 changes: 11 additions & 0 deletions pype/hosts/resolve/api/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
"""
resolve api
"""
import os

bmdvr = None
bmdvf = None

API_DIR = os.path.dirname(os.path.abspath(__file__))
HOST_DIR = os.path.dirname(API_DIR)
PLUGINS_DIR = os.path.join(HOST_DIR, "plugins")
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class SelectInvalidAction(pyblish.api.Action):
def process(self, context, plugin):

try:
from . import get_project_manager
from .lib import get_project_manager
pm = get_project_manager()
self.log.debug(pm)
except ImportError:
Expand Down
Loading