From 60213ecc5dd4e384170da38a7735fd4efdb4826e Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Tue, 1 Dec 2020 15:03:06 +0100 Subject: [PATCH] feat(resolve): collect workfile --- .../resolve/publish/collect_workfile.py | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/pype/plugins/resolve/publish/collect_workfile.py b/pype/plugins/resolve/publish/collect_workfile.py index a8b09573db..d1b45117c9 100644 --- a/pype/plugins/resolve/publish/collect_workfile.py +++ b/pype/plugins/resolve/publish/collect_workfile.py @@ -2,6 +2,7 @@ import os import pyblish.api from pype.hosts import resolve from avalon import api as avalon +from pprint import pformat class CollectWorkfile(pyblish.api.ContextPlugin): @@ -18,6 +19,7 @@ class CollectWorkfile(pyblish.api.ContextPlugin): project = resolve.get_current_project() name = project.GetName() + fps = project.GetSetting("timelineFrameRate") base_name = name + exported_projet_ext current_file = os.path.join(staging_dir, base_name) @@ -27,17 +29,18 @@ class CollectWorkfile(pyblish.api.ContextPlugin): video_tracks = resolve.get_video_track_names() # set main project attributes to context - context.data["activeProject"] = project - context.data["activeSequence"] = active_sequence - context.data["videoTracks"] = video_tracks - context.data["currentFile"] = current_file - - self.log.info("currentFile: {}".format(current_file)) + context.data.update({ + "activeProject": project, + "activeSequence": active_sequence, + "videoTracks": video_tracks, + "currentFile": current_file, + "fps": fps, + }) # creating workfile representation representation = { - 'name': 'hrox', - 'ext': 'hrox', + 'name': exported_projet_ext[1:], + 'ext': exported_projet_ext[1:], 'files': base_name, "stagingDir": staging_dir, } @@ -56,3 +59,4 @@ class CollectWorkfile(pyblish.api.ContextPlugin): instance = context.create_instance(**instance_data) self.log.info("Creating instance: {}".format(instance)) + self.log.debug("__ instance.data: {}".format(pformat(instance.data)))