OpenPype
OpenPype copied to clipboard
Maya: Hosts as modules
Brief description
Hosts are OpenPype modules so they have more abilities and more defined structure.
Description
First step to be able define hosts as OpenPype modules which can make them self contained parts. Added interface IHostModule
which marks a module as host module so it can handle host related logic before a DCC or process, where host is integrated, is running. Host module must have set which host it represents with it name (host_name
). Can define it's workfile extensions out of integration so it's available before DCC is running. As module it can handle some logic more dynamically without predetermined paths. For example can define path to launch hooks using get_launch_hook_paths
or handle launch environments implementing add_implementation_envs
as module method.
Changed how paths to prelaunch hooks are received. An object of application which is launched is passed as an argument to get_launch_hook_paths
so it is possible to filter out if it make sense to add certain launch hook paths for passed application. Module does not have to inherit from ILaunchHookPaths
to be able define launch hooks.
To demonstrate the functionality a maya implementation is now used as module.
Testing notes:
- Launch Maya
- Last workfile should be used on launch (if exists and the feature is enabled)
- Maya pre launch hooks should work (workspace mel is created)
- OpenPype is integrated in launched maya
Task linked: OP-3314 Hosts as Addons step 1