We’ve established a series of plugins and have everything running smoothly within one of our DCC platforms. When I attempted running within another DCC I got a slew of exceptions that certain plugins were not for the correct host. I was under the impression that host filtering was done at the api level… do I have to perform additional functionality?
Here’s what I’m currently doing:
- Registering the current host
- Registering a slew of plugins for a slew of hosts (some are shared some are specific)
Is this possible out of the box to filter plugins based on current host, or am I doing it wrong?
I was looking at the register_discovery_filter function, but it feels overly complex for what I’m attempting to achieve. Is this what I would need to do before registering plugins:
my_host = 'maya' pyblish.api.register_host(my_host) def filter_by_host(plugin): return pyblish.plugin.current_host() in plugin.hosts register_discovery_filter(filter_by_host)
Any info would be appreciated.