Skip to content

Commit

Permalink
Merge pull request #15 from ynput/feature/AY-979_finish_Resolve_new_p…
Browse files Browse the repository at this point in the history
…ublisher

AY-979 Finalize updating Resolve to new publisher
  • Loading branch information
robin-ynput authored Oct 8, 2024
2 parents a7a7029 + c020d1f commit 249b0a3
Show file tree
Hide file tree
Showing 30 changed files with 1,884 additions and 1,420 deletions.
21 changes: 11 additions & 10 deletions client/ayon_resolve/README.markdown
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Basic setup

- Actually supported version is up to v18
- install Python 3.6.2 (latest tested v17) or up to 3.9.13 (latest tested on v18)
- Actually supported version is up to v19
- install Python 3.6.2 (latest tested v17) or up to 3.9.13 (latest tested on v19)
- pip install PySide2:
- Python 3.9.*: open terminal and go to python.exe directory, then `python -m pip install PySide2`
- pip install OpenTimelineIO:
Expand All @@ -10,19 +10,20 @@
![image](https://user-images.githubusercontent.com/40640033/102792588-ffcb1c80-43a8-11eb-9c6b-bf2114ed578e.png) with installed CMake in PATH.
- make sure Resolve Fusion (Fusion Tab/menu/Fusion/Fusion Settings) is set to Python 3.6
![image](https://user-images.githubusercontent.com/40640033/102631545-280b0f00-414e-11eb-89fc-98ac268d209d.png)
- Open OpenPype **Tray/Admin/Studio settings** > `applications/resolve/environment` and add Python3 path to `RESOLVE_PYTHON3_HOME` platform related.
- Open AYON **Tray/Admin/Studio settings** > `applications/resolve/environment` and add Python3 path to `RESOLVE_PYTHON3_HOME` platform related.

## 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.
Notice I had renamed tracks to `main` (holding metadata markers) and `review` used for generating review data with ffmpeg conversion to jpg sequence.

1. you need to start AYON menu from Resolve/EditTab/Menu/Workspace/Scripts/Comp/**__OpenPype_Menu__**
1. you need to start AYON menu from Resolve/EditTab/Menu/Workspace/Scripts/Comp/**__AYON_Menu__**
2. then select any clips in `main` track and change their color to `Chocolate`
3. in OpenPype Menu select `Create`
4. in Creator select `Create Publishable Clip [New]` (temporary name)
3. in AYON Menu select `Create`
4. in Creator select `Create Publishable Clip` (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 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.
![image](./doc_examples.jpg)
6. after you hit `ok` all clips are colored to `pink` and marked with AYON metadata tag
7. on the right-menu column you'll see that all products have been collected correctly
8. hit `Publish` to trigger the publishing process
2 changes: 2 additions & 0 deletions client/ayon_resolve/RESOLVE_API_v19.0B-build20.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

Last Updated: 1 April 2024
----------------------------
In this package, you will find a brief introduction to the Scripting API for DaVinci Resolve Studio. Apart from this README.txt file, this package contains folders containing the basic import
Expand Down Expand Up @@ -479,6 +480,7 @@ Beside primitive data types, Resolve's Python API mainly uses list and dict data
As Lua does not support list and dict data structures, the Lua API implements "list" as a table with indices, e.g. { [1] = listValue1, [2] = listValue2, ... }.
Similarly the Lua API implements "dict" as a table with the dictionary key as first element, e.g. { [dictKey1] = dictValue1, [dictKey2] = dictValue2, ... }.


Keyframe Mode information
-------------------------
This section covers additional notes for the functions Resolve.GetKeyframeMode() and Resolve.SetKeyframeMode(keyframeMode).
Expand Down
55 changes: 36 additions & 19 deletions client/ayon_resolve/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,32 @@
containerise,
update_container,
maintained_selection,
remove_instance,
list_instances
)

from .lib import (
maintain_current_timeline,
publish_clip_color,
get_project_manager,
get_current_project,
get_current_resolve_project,
get_current_project, # backward compatibility
get_current_timeline,
get_any_timeline,
get_new_timeline,
export_timeline_otio_to_file,
export_timeline_otio,
create_bin,
get_media_pool_item,
create_media_pool_item,
create_timeline_item,
get_timeline_item,
get_clip_resolution_from_media_pool,
get_video_track_names,
get_current_timeline_items,
get_pype_timeline_item_by_name,
get_timeline_item_pype_tag,
set_timeline_item_pype_tag,
get_timeline_item_by_name,
get_pype_timeline_item_by_name, # backward compatibility
get_timeline_item_ayon_tag,
get_timeline_item_pype_tag, # backward compatibility
set_timeline_item_ayon_tag,
set_timeline_item_pype_tag, # backward compatibility
imprint,
set_publish_attribute,
get_publish_attribute,
Expand All @@ -49,8 +53,10 @@
from .plugin import (
ClipLoader,
TimelineItemLoader,
Creator,
PublishClip
ResolveCreator,
Creator, # backward compatibility
PublishableClip,
PublishClip, # backward compatibility
)

from .workio import (
Expand All @@ -64,44 +70,53 @@

from .testing_utils import TestGUI


# Resolve specific singletons
bmdvr = None
bmdvf = None
project_manager = None
media_storage = None


__all__ = [
"bmdvr",
"bmdvf",
"project_manager",
"media_storage",

# pipeline
"ResolveHost",
"ls",
"containerise",
"update_container",
"maintained_selection",
"remove_instance",
"list_instances",

# utils
"get_resolve_module",

# lib
"maintain_current_timeline",
"publish_clip_color",
"get_project_manager",
"get_current_project",
"get_current_resolve_project",
"get_current_project", # backward compatibility
"get_current_timeline",
"get_any_timeline",
"get_new_timeline",
"export_timeline_otio_to_file",
"export_timeline_otio",
"create_bin",
"get_media_pool_item",
"create_media_pool_item",
"create_timeline_item",
"get_timeline_item",
"get_clip_resolution_from_media_pool",
"get_video_track_names",
"get_current_timeline_items",
"get_pype_timeline_item_by_name",
"get_timeline_item_pype_tag",
"set_timeline_item_pype_tag",
"get_timeline_item_by_name",
"get_pype_timeline_item_by_name", # backward compatibility
"get_timeline_item_ayon_tag",
"get_timeline_item_pype_tag", # backward compatibility
"set_timeline_item_ayon_tag",
"set_timeline_item_pype_tag", # backward compatibility
"imprint",
"set_publish_attribute",
"get_publish_attribute",
Expand All @@ -118,8 +133,10 @@
# plugin
"ClipLoader",
"TimelineItemLoader",
"Creator",
"PublishClip",
"ResolveCreator",
"Creator", # backward compatibility
"PublishableClip",
"PublishClip", # backward compatibility

# workio
"open_file",
Expand Down
25 changes: 25 additions & 0 deletions client/ayon_resolve/api/constants.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Ayon sequential rename variables
SELECTED_CLIP_COLOR = "Chocolate"
PUBLISH_CLIP_COLOR = "Pink"
AYON_MARKER_WORKFLOW = True

# Ayon compound clip workflow variable
AYON_TAG_NAME = "VFX Notes"

# Ayon marker workflow variables
LEGACY_OPENPYPE_MARKER_NAME = "OpenPypeData"
AYON_MARKER_NAME = "AYONData"
AYON_MARKER_DURATION = 1
AYON_MARKER_COLOR = "Mint"
TEMP_MARKER_FRAME = None

# Ayon default timeline
AYON_TIMELINE_NAME = "AYONTimeline"

# PAR constants defined by DaVinci Resolve
PAR_VALUES = {
"Square": 1.0,
"16:9 Anamorphic": 1.78,
"4:3 Standard Definition": 1.33,
"Cinemascope": 2.0
}
Loading

0 comments on commit 249b0a3

Please sign in to comment.