Loss of Blender Shortcuts and Addons

Hey - our artists are having two issues with the Blender integration and wondered if this was happening for anyone else if there is a work around:

  • Custom shortcuts are lost on start up. This happens every time Blender is started from the launcher.
  • Local plugins are lost on start up and have to be manually re-installed:

    This appears to be intermittent, potentially every time we update the Blender addon on the server.

Blender is outside of my expertise but in AYON integration addons there are some processes that run before launching the app:

  1. Pre launch hooks: InstallPySideToBlender, AddPythonScriptToLaunchArgs and BlenderConsoleWindows
  2. Modify environments: add_implementation_envs

I hope this helps finding the issue.

How have you installed your addons and shortcuts? Are you referring to just locally installed ones in Blender, or are these somehow managed in a different way in the studio?

I haven’t heard of this happening myself - but would love to get to the bottom of what you’re facing here because it definitely sounds wrong! :slight_smile:

Both are installed locally (we don’t have the bandwidth to sort out studio distribution yet).

We do have our own internal tooling that may be the cause but I am wanting to see if anyone else is experiencing this to help narrow it down.
I think this firmly points things towards our internal tools then so I will have to do some digging there.

So testing this locally with our in house tools disabled:

Launching 4.2.2 LTS standalone my test key map is there and is the active one:

Launching through Ayon, they are not even in the list of presets to pick from:

I have narrowed it down to this line:

My understanding is this is overriding the default directory, which is contains the missing keymaps and addons.
This variable can only be a single path, but this thread has some work arounds:

The work arounds in that thread won’t work as they require editing native Blender py files.
I thought well if I just get everyone to re-setup their keymaps and addons in a Blender launched by Ayon then they will be setup in the Ayon user scripts location, but that looks to be pointing to the ayon-blender addon folder, so every time a new version is rolled out the key map and addons will be lost again :frowning:

From the docs:

You can force BLENDER_USER_SCRIPTS in Ayon’s settings, to point to your own scripts folder.
Then Ayon will make sure both your custom scripts and Ayon’s own scripts are all available.

Thanks - issue is the directory is unique to each artist, in their app data folder, so it needs the %APPDATA% variable which does not seem to be expanded/resolved by Ayon’s launch process.
I added my app data as a hardcoded path and it still doesn’t appear to include the key map :frowning:

I think this is because any pre-existing BLENDER_USER_SCRIPTS is moved to AYON_BLENDER_USER_SCRIPTS in favour of the Ayon path.

Yes, your custom BLENDER_USER_SCRIPTS is saved into AYON_BLENDER_USER_SCRIPTS.
Then, scripts that are in AYON_BLENDER_USER_SCRIPTS (your scripts) are executed by Ayon, here :

For me it works all right (to execute both my scripts and Ayon’s scripts).
But I don’t override key maps, so maybe that’s a different beast :wink:

@munkybutt with the information you’ve gather and the source to point to - could you create an issue on ayon-blender repository with the minimal details that explain the issue and provide a simple reproducable use case there.

I’m pretty sure user addons are handled as needed already (if not, then let’s make sure to report that as a bug too!) - but it may indeed be that it does not work. If so, report that too, same manner with a minimal reproducable and we can take a look in our backlog.

Also, we should avoid Blender trying to save into the addon for its preferences too - that’s way too confusing and prone to weird behavior I think. If that’s really the case - then that may also warrant an issue of its own.

1 Like

shall do once I get some spare time