mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Merge pull request #352 from pypeclub/feature/nukestudio_tags_out_presets
Feature/nukestudio tags out presets
This commit is contained in:
commit
0b25a6ff46
2 changed files with 274 additions and 10 deletions
262
pype/hosts/nukestudio/tags.json
Normal file
262
pype/hosts/nukestudio/tags.json
Normal file
|
|
@ -0,0 +1,262 @@
|
|||
{
|
||||
"Hierarchy": {
|
||||
"editable": "1",
|
||||
"note": "{folder}/{sequence}/{shot}",
|
||||
"icon": {
|
||||
"path": "hierarchy.png"
|
||||
},
|
||||
"metadata": {
|
||||
"folder": "FOLDER_NAME",
|
||||
"shot": "{clip}",
|
||||
"track": "{track}",
|
||||
"sequence": "{sequence}",
|
||||
"episode": "EPISODE_NAME",
|
||||
"root": "{projectroot}"
|
||||
}
|
||||
},
|
||||
"Source Resolution": {
|
||||
"editable": "1",
|
||||
"note": "Use source resolution",
|
||||
"icon": {
|
||||
"path": "resolution.png"
|
||||
},
|
||||
"metadata": {
|
||||
"family": "resolution"
|
||||
}
|
||||
},
|
||||
"Retiming": {
|
||||
"editable": "1",
|
||||
"note": "Clip has retime or TimeWarp effects (or multiple effects stacked on the clip)",
|
||||
"icon": {
|
||||
"path": "retiming.png"
|
||||
},
|
||||
"metadata": {
|
||||
"family": "retiming",
|
||||
"marginIn": 1,
|
||||
"marginOut": 1
|
||||
}
|
||||
},
|
||||
"Frame start": {
|
||||
"editable": "1",
|
||||
"note": "Starting frame for comps. \n\n> Use `value` and add either number or write `source` (if you want to preserve source frame numbering)",
|
||||
"icon": {
|
||||
"path": "icons:TagBackground.png"
|
||||
},
|
||||
"metadata": {
|
||||
"family": "frameStart",
|
||||
"value": "1001"
|
||||
}
|
||||
},
|
||||
"[Lenses]": {
|
||||
"Set lense here": {
|
||||
"editable": "1",
|
||||
"note": "Adjust parameters of your lense and then drop to clip. Remember! You can always overwrite on clip",
|
||||
"icon": {
|
||||
"path": "lense.png"
|
||||
},
|
||||
"metadata": {
|
||||
"focalLengthMm": 57
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
"[Subsets]": {
|
||||
"Audio": {
|
||||
"editable": "1",
|
||||
"note": "Export with Audio",
|
||||
"icon": {
|
||||
"path": "volume.png"
|
||||
},
|
||||
"metadata": {
|
||||
"family": "audio",
|
||||
"subset": "main"
|
||||
}
|
||||
},
|
||||
"plateFg": {
|
||||
"editable": "1",
|
||||
"note": "Add to publish to \"forground\" subset. Change metadata subset name if different order number",
|
||||
"icon": {
|
||||
"path": "z_layer_fg.png"
|
||||
},
|
||||
"metadata": {
|
||||
"family": "plate",
|
||||
"subset": "Fg01"
|
||||
}
|
||||
},
|
||||
"plateBg": {
|
||||
"editable": "1",
|
||||
"note": "Add to publish to \"background\" subset. Change metadata subset name if different order number",
|
||||
"icon": {
|
||||
"path": "z_layer_bg.png"
|
||||
},
|
||||
"metadata": {
|
||||
"family": "plate",
|
||||
"subset": "Bg01"
|
||||
}
|
||||
},
|
||||
"plateRef": {
|
||||
"editable": "1",
|
||||
"note": "Add to publish to \"reference\" subset.",
|
||||
"icon": {
|
||||
"path": "icons:Reference.png"
|
||||
},
|
||||
"metadata": {
|
||||
"family": "plate",
|
||||
"subset": "Ref"
|
||||
}
|
||||
},
|
||||
"plateMain": {
|
||||
"editable": "1",
|
||||
"note": "Add to publish to \"main\" subset.",
|
||||
"icon": {
|
||||
"path": "z_layer_main.png"
|
||||
},
|
||||
"metadata": {
|
||||
"family": "plate",
|
||||
"subset": "main"
|
||||
}
|
||||
},
|
||||
"plateProxy": {
|
||||
"editable": "1",
|
||||
"note": "Add to publish to \"proxy\" subset.",
|
||||
"icon": {
|
||||
"path": "z_layer_main.png"
|
||||
},
|
||||
"metadata": {
|
||||
"family": "plate",
|
||||
"subset": "proxy"
|
||||
}
|
||||
},
|
||||
"review": {
|
||||
"editable": "1",
|
||||
"note": "Upload to Ftrack as review component.",
|
||||
"icon": {
|
||||
"path": "review.png"
|
||||
},
|
||||
"metadata": {
|
||||
"family": "review",
|
||||
"track": "review"
|
||||
}
|
||||
}
|
||||
},
|
||||
"[Handles]": {
|
||||
"start: add 20 frames": {
|
||||
"editable": "1",
|
||||
"note": "Adding frames to start of selected clip",
|
||||
"icon": {
|
||||
"path": "3_add_handles_start.png"
|
||||
},
|
||||
"metadata": {
|
||||
"family": "handles",
|
||||
"value": "20",
|
||||
"args": "{'op':'add','where':'start'}"
|
||||
}
|
||||
},
|
||||
"start: add 10 frames": {
|
||||
"editable": "1",
|
||||
"note": "Adding frames to start of selected clip",
|
||||
"icon": {
|
||||
"path": "3_add_handles_start.png"
|
||||
},
|
||||
"metadata": {
|
||||
"family": "handles",
|
||||
"value": "10",
|
||||
"args": "{'op':'add','where':'start'}"
|
||||
}
|
||||
},
|
||||
"start: add 5 frames": {
|
||||
"editable": "1",
|
||||
"note": "Adding frames to start of selected clip",
|
||||
"icon": {
|
||||
"path": "3_add_handles_start.png"
|
||||
},
|
||||
"metadata": {
|
||||
"family": "handles",
|
||||
"value": "5",
|
||||
"args": "{'op':'add','where':'start'}"
|
||||
}
|
||||
},
|
||||
"start: add 0 frames": {
|
||||
"editable": "1",
|
||||
"note": "Adding frames to start of selected clip",
|
||||
"icon": {
|
||||
"path": "3_add_handles_start.png"
|
||||
},
|
||||
"metadata": {
|
||||
"family": "handles",
|
||||
"value": "0",
|
||||
"args": "{'op':'add','where':'start'}"
|
||||
}
|
||||
},
|
||||
"end: add 20 frames": {
|
||||
"editable": "1",
|
||||
"note": "Adding frames to end of selected clip",
|
||||
"icon": {
|
||||
"path": "1_add_handles_end.png"
|
||||
},
|
||||
"metadata": {
|
||||
"family": "handles",
|
||||
"value": "20",
|
||||
"args": "{'op':'add','where':'end'}"
|
||||
}
|
||||
},
|
||||
"end: add 10 frames": {
|
||||
"editable": "1",
|
||||
"note": "Adding frames to end of selected clip",
|
||||
"icon": {
|
||||
"path": "1_add_handles_end.png"
|
||||
},
|
||||
"metadata": {
|
||||
"family": "handles",
|
||||
"value": "10",
|
||||
"args": "{'op':'add','where':'end'}"
|
||||
}
|
||||
},
|
||||
"end: add 5 frames": {
|
||||
"editable": "1",
|
||||
"note": "Adding frames to end of selected clip",
|
||||
"icon": {
|
||||
"path": "1_add_handles_end.png"
|
||||
},
|
||||
"metadata": {
|
||||
"family": "handles",
|
||||
"value": "5",
|
||||
"args": "{'op':'add','where':'end'}"
|
||||
}
|
||||
},
|
||||
"end: add 0 frames": {
|
||||
"editable": "1",
|
||||
"note": "Adding frames to end of selected clip",
|
||||
"icon": {
|
||||
"path": "1_add_handles_end.png"
|
||||
},
|
||||
"metadata": {
|
||||
"family": "handles",
|
||||
"value": "0",
|
||||
"args": "{'op':'add','where':'end'}"
|
||||
}
|
||||
}
|
||||
},
|
||||
"NukeScript": {
|
||||
"editable": "1",
|
||||
"note": "Collecting track items to Nuke scripts.",
|
||||
"icon": {
|
||||
"path": "icons:TagNuke.png"
|
||||
},
|
||||
"metadata": {
|
||||
"family": "nukescript",
|
||||
"subset": "main"
|
||||
}
|
||||
},
|
||||
"Comment": {
|
||||
"editable": "1",
|
||||
"note": "Comment on a shot.",
|
||||
"icon": {
|
||||
"path": "icons:TagComment.png"
|
||||
},
|
||||
"metadata": {
|
||||
"family": "comment",
|
||||
"subset": "main"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,16 +1,22 @@
|
|||
import re
|
||||
import os
|
||||
import json
|
||||
import hiero
|
||||
|
||||
from pype.api import (
|
||||
config,
|
||||
Logger
|
||||
)
|
||||
from pype.api import Logger
|
||||
from avalon import io
|
||||
|
||||
log = Logger().get_logger(__name__, "nukestudio")
|
||||
|
||||
|
||||
def tag_data():
|
||||
current_dir = os.path.dirname(__file__)
|
||||
json_path = os.path.join(current_dir, "tags.json")
|
||||
with open(json_path, "r") as json_stream:
|
||||
data = json.load(json_stream)
|
||||
return data
|
||||
|
||||
|
||||
def create_tag(key, value):
|
||||
"""
|
||||
Creating Tag object.
|
||||
|
|
@ -58,13 +64,9 @@ def add_tags_from_presets():
|
|||
return
|
||||
|
||||
log.debug("Setting default tags on project: {}".format(project.name()))
|
||||
|
||||
# get all presets
|
||||
presets = config.get_presets()
|
||||
|
||||
# get nukestudio tag.json from presets
|
||||
nks_pres = presets["nukestudio"]
|
||||
nks_pres_tags = nks_pres.get("tags", None)
|
||||
# get nukestudio tags.json
|
||||
nks_pres_tags = tag_data()
|
||||
|
||||
# Get project task types.
|
||||
tasks = io.find_one({"type": "project"})["config"]["tasks"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue