Add assets tag bin

This commit is contained in:
Toke Jepsen 2019-06-25 11:12:28 +01:00
parent d864fb0cfa
commit c331a4c8f6

View file

@ -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()