Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AY-7222 Fix otio_review no handles and tempdir for Resolve #1041

Merged
merged 5 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
13 changes: 13 additions & 0 deletions client/ayon_core/pipeline/tempdir.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import os
import tempfile
from pathlib import Path
import warnings

from ayon_core.lib import StringTemplate
from ayon_core.pipeline import Anatomy
Expand Down Expand Up @@ -70,6 +71,18 @@ def _create_local_staging_dir(prefix, suffix, dirpath=None):
)


def create_custom_tempdir(project_name, anatomy):
robin-ynput marked this conversation as resolved.
Show resolved Hide resolved
""" Deprecated 09/12/2024, here for backward-compatibility with Resolve.
robin-ynput marked this conversation as resolved.
Show resolved Hide resolved
"""
warnings.warn(
"Used deprecated 'create_custom_tempdir' "
"use 'ayon_core.pipeline.tempdir.get_temp_dir' instead.",
DeprecationWarning,
)

return _create_custom_tempdir(project_name, anatomy)


def _create_custom_tempdir(project_name, anatomy):
""" Create custom tempdir

Expand Down
7 changes: 4 additions & 3 deletions client/ayon_core/plugins/publish/extract_otio_review.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,16 @@ def process(self, instance):
# TODO: convert resulting image sequence to mp4

# get otio clip and other time info from instance clip
# TODO: what if handles are different in `versionData`?
handle_start = instance.data["handleStart"]
handle_end = instance.data["handleEnd"]
otio_review_clips = instance.data.get("otioReviewClips")

if otio_review_clips is None:
self.log.info(f"Instance `{instance}` has no otioReviewClips")
return

# TODO: what if handles are different in `versionData`?
handle_start = instance.data["handleStart"]
handle_end = instance.data["handleEnd"]

# add plugin wide attributes
self.representation_files = []
self.used_frames = []
Expand Down
Loading