mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
Merged in feature/PYPE-478-frame-start-from-source-frame-n (pull request #264)
Feature/PYPE-478 frame start from source frame n Approved-by: Milan Kolar <milan@orbi.tools>
This commit is contained in:
commit
194018a798
3 changed files with 14 additions and 2 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
from pyblish import api
|
from pyblish import api
|
||||||
|
import os
|
||||||
|
|
||||||
class CollectClipTagFrameStart(api.InstancePlugin):
|
class CollectClipTagFrameStart(api.InstancePlugin):
|
||||||
"""Collect FrameStart from Tags of selected track items."""
|
"""Collect FrameStart from Tags of selected track items."""
|
||||||
|
|
@ -19,8 +19,20 @@ class CollectClipTagFrameStart(api.InstancePlugin):
|
||||||
|
|
||||||
# gets only task family tags and collect labels
|
# gets only task family tags and collect labels
|
||||||
if "frameStart" in t_family:
|
if "frameStart" in t_family:
|
||||||
|
t_value = t_metadata.get("tag.value", "")
|
||||||
|
|
||||||
|
# backward compatibility
|
||||||
t_number = t_metadata.get("tag.number", "")
|
t_number = t_metadata.get("tag.number", "")
|
||||||
start_frame = int(t_number)
|
|
||||||
|
try:
|
||||||
|
start_frame = int(t_number) or int(t_value)
|
||||||
|
except ValueError:
|
||||||
|
if "source" in t_value:
|
||||||
|
source_first = instance.data["sourceFirst"]
|
||||||
|
source_in = instance.data["sourceIn"]
|
||||||
|
handle_start = instance.data["handleStart"]
|
||||||
|
start_frame = (source_first + source_in) - handle_start
|
||||||
|
|
||||||
instance.data["startingFrame"] = start_frame
|
instance.data["startingFrame"] = start_frame
|
||||||
self.log.info("Start frame on `{0}` set to `{1}`".format(
|
self.log.info("Start frame on `{0}` set to `{1}`".format(
|
||||||
instance, start_frame
|
instance, start_frame
|
||||||
|
|
|
||||||
BIN
setup/nukestudio/hiero_plugin_path/Icons/retiming.png
Normal file
BIN
setup/nukestudio/hiero_plugin_path/Icons/retiming.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 30 KiB |
BIN
setup/nukestudio/hiero_plugin_path/Icons/retiming.psd
Normal file
BIN
setup/nukestudio/hiero_plugin_path/Icons/retiming.psd
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue