From c331a4c8f653d6f0395e3efce853daf747632424 Mon Sep 17 00:00:00 2001 From: Toke Jepsen Date: Tue, 25 Jun 2019 11:12:28 +0100 Subject: [PATCH] Add assets tag bin --- pype/nukestudio/tags.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/pype/nukestudio/tags.py b/pype/nukestudio/tags.py index bb8582da70..04a99d2cb8 100644 --- a/pype/nukestudio/tags.py +++ b/pype/nukestudio/tags.py @@ -68,7 +68,7 @@ def add_tags_from_presets(): for task in tasks: nks_pres_tags["[Tasks]"][task["name"]] = { "editable": "1", - "note": "Tag note", + "note": "", "icon": { "path": "" }, @@ -77,6 +77,22 @@ def add_tags_from_presets(): } } + # Get project assets. Currently Ftrack specific to differentiate between + # asset builds and shots. + nks_pres_tags["[Assets]"] = {} + for asset in io.find({"type": "asset"}): + if asset["data"]["entityType"] == "AssetBuild": + nks_pres_tags["[Assets]"][asset["name"]] = { + "editable": "1", + "note": "", + "icon": { + "path": "" + }, + "metadata": { + "family": "asset" + } + } + # get project and root bin object project = hiero.core.projects()[-1] root_bin = project.tagsBin()