Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Maya: Hosts as modules #3647

Merged
merged 11 commits into from
Aug 17, 2022
Merged

Conversation

iLLiCiTiT
Copy link
Member

@iLLiCiTiT iLLiCiTiT commented Aug 11, 2022

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:

  1. Launch Maya
  2. Last workfile should be used on launch (if exists and the feature is enabled)
  3. Maya pre launch hooks should work (workspace mel is created)
  4. OpenPype is integrated in launched maya

@ynbot
Copy link
Contributor

ynbot commented Aug 11, 2022

Task linked: OP-3314 Hosts as Addons step 1

@iLLiCiTiT iLLiCiTiT self-assigned this Aug 11, 2022
@iLLiCiTiT iLLiCiTiT added the type: refactor Structural changes not affecting functionality label Aug 11, 2022
Copy link
Member

@m-u-r-p-h-y m-u-r-p-h-y left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • maya launched with latest workfile loaded
  • workspace.mel created
  • openPype menu loaded

image

@iLLiCiTiT iLLiCiTiT changed the title General: Hosts as modules Maya: Hosts as modules Aug 12, 2022
@iLLiCiTiT iLLiCiTiT merged commit 9694a76 into develop Aug 17, 2022
@iLLiCiTiT iLLiCiTiT deleted the feature/OP-3314_Hosts-as-Addons-step-1 branch August 17, 2022 13:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: refactor Structural changes not affecting functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants