Skip to content

Commit

Permalink
Merge pull request #1041 from ynput/bugfix/AY_7222-fix_create_custom_dir
Browse files Browse the repository at this point in the history
AY-7222 Fix otio_review no handles and tempdir for Resolve
  • Loading branch information
robin-ynput authored Dec 11, 2024
2 parents 79903e4 + 80057eb commit 30dcf53
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
16 changes: 16 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,21 @@ def _create_local_staging_dir(prefix, suffix, dirpath=None):
)


def create_custom_tempdir(project_name, anatomy=None):
"""Backward compatibility deprecated since 2024/12/09.
"""
warnings.warn(
"Used deprecated 'create_custom_tempdir' "
"use 'ayon_core.pipeline.tempdir.get_temp_dir' instead.",
DeprecationWarning,
)

if anatomy is None:
anatomy = Anatomy(project_name)

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

0 comments on commit 30dcf53

Please sign in to comment.