modules have method that can be called on host installation

This commit is contained in:
Jakub Trllo 2022-06-16 17:05:26 +02:00
parent ee4b635edd
commit 94f9d63098

View file

@ -463,6 +463,25 @@ class OpenPypeModule:
pass
def on_host_install(self, host, host_name, project_name):
"""Host was installed which gives option to handle in-host logic.
It is a good option to register in-host event callbacks which are
specific for the module. The module is kept in memory for rest of
the process.
Arguments may change in future. E.g. 'host_name' should be possible
to receive from 'host' object.
Args:
host (ModuleType): Access to installed/registered host object.
host_name (str): Name of host.
project_name (str): Project name which is main part of host
context.
"""
pass
def cli(self, module_click_group):
"""Add commands to click group.