Hi folks! I’m having hard times trying to bring the whole pipeline up and running.
The issue is I can’t figure out why maya addon does not copy template file to shot location.
The launcher output is
- { ApplicationLaunchContext-maya/2024 }: [ Discovery of launch hooks started. ]
- { ApplicationLaunchContext-maya/2024 }: [ Paths searched for launch hooks:
- C:\Users\n_prudov\AppData\Local\Ynput\AYON\addons\core_1.3.2\ayon_core\hooks
- C:\Users\n_prudov\AppData\Local\Ynput\AYON\addons\applications_1.1.3\ayon_applications\hooks
- C:\Users\n_prudov\AppData\Local\Ynput\AYON\addons\equalizer_0.1.2\ayon_equalizer\hooks
- C:\Users\n_prudov\AppData\Local\Ynput\AYON\addons\maya_0.4.8\ayon_maya\hooks ]
- { ApplicationLaunchContext-maya/2024 }: [ Skipped hook invalid for current launch context: CopyTemplateWorkfile ]
- { ApplicationLaunchContext-maya/2024 }: [ Skipped hook invalid for current launch context: FilterFarmEnvironments ]
- { ApplicationLaunchContext-maya/2024 }: [ Skipped hook invalid for current launch context: LaunchWithTerminal ]
- { ApplicationLaunchContext-maya/2024 }: [ Skipped hook invalid for current launch context: LaunchNewConsoleApps ]
- { ApplicationLaunchContext-maya/2024 }: [ Skipped hook invalid for current launch context: LaunchTerminalWindowsCreationflags ]
- { ApplicationLaunchContext-maya/2024 }: [ Skipped hook invalid for current launch context: AddLast3DEWorkfileToLaunchArgs ]
- { ApplicationLaunchContext-maya/2024 }: [ Skipped hook invalid for current launch context: InstallQtBinding ]
- { ApplicationLaunchContext-maya/2024 }: [ Found 8 prelaunch and 0 postlaunch hooks. ]
- { ApplicationLaunchContext-maya/2024 }: [ Executing prelaunch hook: GlobalHostDataHook ]
- { GlobalHostDataHook }: [ Project name is set to "ayon_test" ]
>>> [ Will add environments for apps and tools: maya/2024 ]
- { GlobalHostDataHook }: [ Context environments set:
{
"AYON_PROJECT_NAME": "ayon_test",
"AYON_APP_NAME": "maya/2024",
"AYON_FOLDER_PATH": "/sequences/cgi_010/cgi_010_090",
"AYON_TASK_NAME": "animation"
} ]
- { GlobalHostDataHook }: [ Last workfile should be opened on start. ]
- { GlobalHostDataHook }: [ Workfiles for launch context does not exists yet but path will be set. ]
- { GlobalHostDataHook }: [ Setting last workfile path: T:\tmp\_ayon\projects\ayon_test\cgi_010\cgi_010_090\animation\maya\cgi_010_090_animation_v001.ma ]
- { ApplicationLaunchContext-maya/2024 }: [ Executing prelaunch hook: OCIOEnvHook ]
- { OCIOEnvHook }: [ OCIO not set or enabled ]
- { ApplicationLaunchContext-maya/2024 }: [ Executing prelaunch hook: PreRemoveLauncherPaths ]
- { ApplicationLaunchContext-maya/2024 }: [ Executing prelaunch hook: MayaPreAutoLoadPlugins ]
- { ApplicationLaunchContext-maya/2024 }: [ Executing prelaunch hook: MayaPreOpenWorkfilePostInitialization ]
>>> [ Current context does not have any workfile yet. ]
- { ApplicationLaunchContext-maya/2024 }: [ Executing prelaunch hook: AddLastWorkfileToLaunchArgs ]
>>> [ It is set to not start last workfile on start. ]
- { ApplicationLaunchContext-maya/2024 }: [ Executing prelaunch hook: CreateWorkdirExtraFolders ]
- { ApplicationLaunchContext-maya/2024 }: [ Executing prelaunch hook: PreCopyMel ]
- { ApplicationLaunchContext-maya/2024 }: [ All prelaunch hook executed. Starting new process. ]
>>> [ Launching "maya/2024" with args (1): ['C:\\Program Files\\Autodesk\\Maya2024\\bin\\maya.exe'] ]
- { ApplicationLaunchContext-maya/2024 }: [ Launch of maya/2024 finished. ]
Well these are the most relevant parts:
- { ApplicationLaunchContext-maya/2024 }: [ Skipped hook invalid for current launch context: CopyTemplateWorkfile ]
...
- { GlobalHostDataHook }: [ Last workfile should be opened on start. ]
- { GlobalHostDataHook }: [ Workfiles for launch context does not exists yet but path will be set. ]
- { GlobalHostDataHook }: [ Setting last workfile path: T:\tmp\_ayon\projects\ayon_test\cgi_010\cgi_010_090\animation\maya\cgi_010_090_animation_v001.ma ]
...
>>> [ Current context does not have any workfile yet. ]
>>> [ It is set to not start last workfile on start. ]
So why does it skip CopyTemplateWorkfile hook?
It also looks contradictory that it says Last workfile should be opened and then It is set to not start last workfile on start
my maya addon settngs are (I leave here only non default values):
Summary
{
"ext_mapping": [
{
"name": "workfile",
"value": "mb"
}
],
"workfile_build": {
"profiles": [
{
"task_types": [
"Modeling",
"Shading",
"Cloth",
"Groom",
"Rigging",
"Lookdev",
"CFX",
"Matchmove",
"RND",
"Dev",
"Env Layout",
"Env Lighting",
"Asset CFX",
"Asset FX",
"Fix",
"Feature",
"Previs",
"Export_previs",
"Layout",
"Animation",
"Export",
"Lighting",
"FX",
"CFX Cloth",
"CFX Hair",
"Rendering",
"Compositing",
"Archive"
],
"tasks": [],
"current_context": [
{
"product_name_filters": [
".+[Mm]ain"
],
"product_types": [
"model"
],
"repre_names": [
"abc",
"mb"
],
"loaders": [
"ReferenceLoader"
]
},
{
"product_name_filters": [],
"product_types": [
"animation",
"pointcache",
"proxyAbc"
],
"repre_names": [
"abc"
],
"loaders": [
"ReferenceLoader"
]
},
{
"product_name_filters": [],
"product_types": [
"rendersetup"
],
"repre_names": [
"json"
],
"loaders": [
"RenderSetupLoader"
]
},
{
"product_name_filters": [],
"product_types": [
"camera"
],
"repre_names": [
"abc"
],
"loaders": [
"ReferenceLoader"
]
}
],
"linked_assets": [
{
"product_name_filters": [],
"product_types": [
"setdress"
],
"repre_names": [
"mb"
],
"loaders": [
"ReferenceLoader"
]
}
]
}
]
},
"templated_workfile_build": {
"profiles": [
{
"task_types": [
"Modeling",
"Shading",
"Cloth",
"Groom",
"Rigging",
"Lookdev",
"CFX",
"Matchmove",
"RND",
"Dev",
"Env Layout",
"Env Lighting",
"Asset CFX",
"Asset FX",
"Fix",
"Feature",
"Previs",
"Export_previs",
"Layout",
"Animation",
"Export",
"Lighting",
"FX",
"CFX Cloth",
"CFX Hair",
"Rendering",
"Compositing",
"Archive"
],
"task_names": [],
"path": "T:\\tools\\templates\\maya\\scene.mb"
}
]
}
}
UPD:
For now I figured out that LauncHook from applications addon seem to be skipping CopyTemplateWorkfile hook for maya because of missing “maya” in app_goups here ayon-core/client/ayon_core/hooks/pre_copy_template_workfile.py at a269244e78c56b049cfc381bd0a927f2373f7f1d · ynput/ayon-core · GitHub
Not sure is this a case, (houdini is also missing there, but templates are copied ok)
btw template file copy is still failing despite Skipped hook invalid for current launch context is gone now
- { ApplicationLaunchContext-maya/2024 }: [ Executing prelaunch hook: CopyTemplateWorkfile ]
>>> [ Last workfile does not exist. ]
- { CopyTemplateWorkfile }: [ Started filtering of custom template paths. ]
>>> [ Seems like old version of settings is used. Can't access custom templates in host "maya". ]
>>> [ Registered custom templates didn't match current context. ]


