From 60a7739d8bfb282f843ba55782ef4b4ee5d7a333 Mon Sep 17 00:00:00 2001 From: Toke Jepsen Date: Wed, 24 Jul 2019 23:05:38 +0100 Subject: [PATCH] Use review source component if present. --- pype/ftrack/actions/action_rv.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/pype/ftrack/actions/action_rv.py b/pype/ftrack/actions/action_rv.py index 158ddc63e8..223fd0a94b 100644 --- a/pype/ftrack/actions/action_rv.py +++ b/pype/ftrack/actions/action_rv.py @@ -269,11 +269,28 @@ class RVAction(BaseAction): api.Session["AVALON_PROJECT"] = project["name"] io.install() + location = ftrack_api.Session().pick_location() + paths = [] for parent_name in sorted(event["data"]["values"].keys()): component = session.get( "Component", event["data"]["values"][parent_name] ) + + # Newer publishes have the source referenced in Ftrack. + online_source = False + for neighbour_component in component["version"]["components"]: + if neighbour_component["name"] != "ftrackreview-mp4_src": + continue + + paths.append( + location.get_filesystem_path(neighbour_component) + ) + online_source = True + + if online_source: + continue + asset = io.find_one({"type": "asset", "name": parent_name}) subset = io.find_one( {