Closed jasperges closed 4 years ago
You are correct. Let's clean that up too. Let's try and force ourselves into there being no need for the Integrations to access the configs on install()
.
Just for clarity. This is what happens on api.install()
in the order as it is in the current code:
Step | Description |
---|---|
io.install() |
Build api.Session from environment variables and connect to Avalon database |
host.install() |
Trigger the Avalon Host Integration |
config.host.install() |
The config Host Integration specific install() |
register_host(host) |
Set the registered host |
register_config(config) |
Set the registered config |
config.install() |
The config global install() |
Where host
is the integration, e.g. maya
or nuke
.
Where config
is the studio configuration, e.g. the default polly
or your studio config.
Looking at that it still seems the order is somewhat confusing, with register_xxx
in the middle there.
Is the issue not with config.host.install()
?
How would config do custom host installation otherwise?
@tokejepsen see #501 - with that the host.install()
does not trigger the config.host.install()
but it's api.install()
that does so. That way, the code does not need to be duplicated per host integration, plus it avoids the need for the host integrations themselves to access the studio configs on install.
Does that answer your question?
Excellent!
When changing the Blender integration so it works with #501, I noticed that the
install()
anduninstall()
functions still expect theconfig
variable. If I'm not mistaken this is not needed anymore and it can be safely removed after changing this line in avalon.pipeline tohost.install()
.Is there a reason not to change this? I can make a pull request if needed.