Ayon Developer Mode -- Guide

Intro

Ayon dev mode was introduced to ease pipeline client code development, however it sill has some limitations, More about that later.

Ayon dev enables users to:

  1. change addons versions within the dev bundle
  2. have explicit addon paths
  3. make it available for particular users

Here is how to setup Ayon dev mode.

Enable Ayon Developer Mode

Follow the following steps

  1. Enable developer mode for particular users.

  2. Create Dev Bundles

  3. Select your dev bundle, to start editing its settings

Caution: Don’t forget to set your Dev Bundle settings!
Hint: you may copy settings from other bundles as follows:

Animation_33

Ayon Launcher in Dev Mode

This is possible by running Ayon launcher live from Ayon launcher Repo

Get Ayon Launcher Repo

I’m on windows.

In power shell

git clone https://github.com/ynput/ayon-launcher.git
cd ayon-launcher
tools\manage.ps1
tools\manage.ps1 --create-env
tools\manage.ps1 --install-runtime-dependencies

Run Ayon Launcher in Dev Mode

From your Ayon Launcher directory, run :
Windows: use either one of these:

  • .\tools\manage.ps1 run --use-dev
    or
  • .\tools\ayon_console.bat --use-dev

Linux & macOS:

  • ./tools/make.sh run --use-dev

Checkpoint

By this step, you are able to:

  • Run Ayon Launcher in Dev mode.
  • Create dev bundle.
  • Change addons versions in your dev bundle as desired.

Explicit Addon Paths

As mentioned earlier, Ayon dev mode was introduced to ease pipeline client code development.
And, in dev bundle settings we expose addons’ client code path which is mostly the path of addons repo clones on your disk.

Let’s test that and understand the limitations.

Ayon Core Addon

You need to set core addon path to your ayon-core repo path.
Here’s the path in the screenshot.

E:\Ynput\ayon-core\client

P.S. You should create core addon zip file and upload to ayon server and then select that version in bundle settings.

Addons that are not yet separated from core e.g. Maya, Houdini, Nuke, etc…
Their code is already part of core so they are updated whenever you update core ,
However their settings not. So, you are still required to upload their addon zip files to update their settings on the server.
Note: They are always using defaults (defined in server_addon dir) as base if their addon version are set to None in Bundle settings.

Note: Set OpenPype to None

If you have OpenPype addon, you’ll need to set its version to None.

Addons that have their own Repos

For those addons, you are still required to upload their addon zip files to update their settings and server side code.

e.g. Kitsu Addon

  1. I need to upload its addon zip file in order to find it in the version drop down menu

  2. I can point to my unzipped addon client code on my side.

Create addon files

This step provides more info about creating Addon files.

We use the following commands to create addon files.
In ayon-core repo directory:
To export core addon: --output is optional

python create_package.py  --output <my-favorite-dir> 

To export other addons: --output and --addon are optional

python server_addon\create_ayon_addons.py --output <my-favorite-dir>  --addon houdini

For Addons that have their own Repos:
In their Repos directories.
Some addons like kitsu have client and server specific code for them I’m using --only-client flag.

python create_package.py --skip-zip --only-client --output  <my-favorite-dir-for-client-code>
python create_package.py --output  <my-favorite-dir-for-addon-zip-file>

Checkpoint

By this step, you are able to work on addons’ code locally on your machine.

Push addons to users

Once you are happy and comfortable with your new addons code, It’s time to upload them to users.
This is done by uploading the addon zip, which might have done while working with your addon.
But a rule of thumb, delete it from the server as settings might conflict.

Steps:

e.g. If I’m working with core-0.2.1-dev.1

  • Uninstall core-0.2.1-dev.1 from my ayon server.
  • Create core-0.2.1-dev.1 zip from the ayon core clone on my disk
  • Upload it to server
  • Create new addon (with dev disabled) and set the new addon version.

Ayon server wont allow addon installation if it’s used in any bundles (even if they were dev bundles)
So, you may need to set the version to None in your dev bundle.
Animation_35

Tip

you can define different “configurations” in your IDE to create packages automatically.
e.g. In PyCharm
image

Ayon Dev and Deadline

For windows:
you can use live Ayon launcher with deadline as mentioned in AYON / Openpype Deadline Setup by using the ayon_console.bat, it’s in tools folder inside Ayon Launcher Repo.

2 Likes

Hey!

Can any environment variable be assigned for the URL in Ayon? especially for the Ayon application login window?

(auto-login through the network using AD will also be a way to automate things)

I think this is a question for @iLLiCiT .

but, let me share my 2 cents.
As far as I know Ayon launcher in dev mode works works in the same manner regards connection credentials, where it will fetch the last used credentials… and it will only ask if it failed to obtain these info.

also, you can use --ayon-login so ayon laucnher always asks for your user info.

Hi,
For the url itself : AYON_SERVER_URL
Described here : Running AYON desktop launcher | AYON Docs

@mustafa_jafar To get beginners started with testing a PR branch, e.g. a PR of OpenPype. Could you point out the very basic steps one would need to take to get that up and running locally for testing in AYON?

I’ve had a few times having community members ask me “How to test PR X with Ayon?”

  1. Enable Developer mode for your user
  2. Git checkout the PR branch
  3. Set the OpenPype developer bundle’s path to the path of the checked out branch

Is there more to it? Do you still need to create zips and uploads? Or can you just run from there?
Any chance you could do a video recording showing this process?

Something under five minutes explaining how to get a PR up and running for testing locally would be great! :star_struck:

1 Like