mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 13:24:54 +01:00
Flame: collect timeline ocio plugin
This commit is contained in:
parent
4f612a6a16
commit
3e53a45bfa
1 changed files with 26 additions and 0 deletions
26
openpype/hosts/flame/plugins/publish/precollect_workfile.py
Normal file
26
openpype/hosts/flame/plugins/publish/precollect_workfile.py
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
import pyblish.api
|
||||
import openpype.hosts.flame.api as opfapi
|
||||
from openpype.hosts.flame.otio import flame_export
|
||||
|
||||
|
||||
class PrecollecTimelineOCIO(pyblish.api.ContextPlugin):
|
||||
"""Inject the current working context into publish context"""
|
||||
|
||||
label = "Precollect Timeline OTIO"
|
||||
order = pyblish.api.CollectorOrder - 0.5
|
||||
|
||||
def process(self, context):
|
||||
project = opfapi.get_current_project()
|
||||
sequence = opfapi.get_current_sequence(opfapi.CTX.selection)
|
||||
|
||||
# adding otio timeline to context
|
||||
otio_timeline = flame_export.create_otio_timeline(sequence)
|
||||
|
||||
# update context with main project attributes
|
||||
context.data.update({
|
||||
"otioTimeline": otio_timeline,
|
||||
"currentFile": "Flame/{}/{}".format(
|
||||
project.name, sequence.name
|
||||
),
|
||||
"fps": float(str(sequence.frame_rate)[:-4])
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue