Hi,
I have a pipeline step named ‘ModelAnimation’. It’s short code is ‘ModelAnim’
I have a maya scene file which corresponds to a template. This template uses the {Step} key.
If I do this:
mayascene = r"\\server01\shared2\projects\Donat_test123_P42918\assets\Character\Bidule\ModelAnim\work\Bidule_ModelAnim_v004.ma"
tk = sgtk.sgtk_from_path(mayascene)
context = tk.context_from_path(mayascene)
print context.step['name']
I get ModelAnimation
If I do this:
tmpl = tk.templates["maya_asset_work"]
print tmpl.validate_and_get_fields(mayascene)['Step']
I get ModelAnim
This is annoying because in our code we sometime use the context, and sometime the template to find out the pipeline step. Is their a way to:
a/ with the context, return the short name of the pipeline step
b/ with the template, return the ‘long’ name of the pipeline step
Regards