when you are running Ayon Launcher in dev mode and you modified some code in the plugin client folder, does Ayon automatically detect the change and reload the modified module?
This is to make sure that you are currently running the latest code? Or do I have to restart Ayon Launcher every time?
Furthermore, how do I set the log level to debug when I’m in developer mode?
In my context, I’m tinkering with the Ayon ftrack addon to see how it work and I don’t know how to make sure that what I have is always the latest change.
Hello,
Firstly, Dev mode is designed to work exclusively with the client code/directory.
To update server code and frontend elements, you’ll still need to create and upload the addon package.
Usage Based on Module Type:
From my experience using AYON, it depends on the module itself.
Core Addon: For modules within the core addon, it’s likely necessary to restart the launcher for the new module to be recognized.
DCC Addon (e.g., Maya or Houdini): Modules in a DCC addon typically require restarting the application to ensure it detects the new module.
Pyblish Plugin: If the module is a Pyblish plugin, whether it’s part of the core or a DCC addon, you might only need to refresh the publisher Tool by clicking button. This is because Pyblish reads these plugins as text files and compile on refreshing.
TIP:
When discussing the development of Pyblish plugins in AYON. We may touch on this topic Pyblish Plugins Debugging
Honestly, the simplest explanation for dev mode is that it’ll run the CLIENT side code live from the location you specify. From that point in time, it behaves exactly like regular python code.
E.g. you can do live reloads manually (if you know what you’re doing with importlib.reload).
And pyblish publish plug-ins, loaders and creators are always “rediscovered” and reload automatically on reset of the publisher or loader, etc. So for changes to just those files you may not need to restart. If those import other libraries, then either relaunch your application or get a bit clever with importlib.reload if you really want to.
So dev mode, you’re just running live over that code. As soon as you edit that code, then it still behaves like just Python running that and you can do “live” whatever Python allows you to do.