0

I'm working on a simple program for my organization to use to share configurations across workstations for multiple programs. I'm trying to understand Blender's configuration layout so I can make sure everything in the settings on one station can be copied to others, so it's possible to go from a workstation at one location to another and have the same addons, plugins, config settings, and so on, remain the same for each program on each workstation.

Blender has documented the configuration layout for their configuration on this page in the Blender 3.6 manual (current version). The information is rather vague and I'm confused, since one of the directories does not exist and can't be accessed on macOS. The three configuration directories are:

LOCAL: Location of configuration and run-time data (for self-contained bundle).

USER: Location of configuration files (typically in the user’s home directory).

SYSTEM: Location of run-time data for system wide installation (may be read-only).

(This is from the page in the link.)

The descriptions are a bit sparse. For instance, it's not clear if LOCAL contains files specifically for the install and run-time, or if it includes files that will change according to user preferences. Another point that's confusing is that the SYSTEM location on macOS is /Library/Application Support/Blender, but that directory doesn't exist on macOS installations and, as things are now, can't exist. Anything in /Library requires admin permission to write to. Blender is a drag-n-drop install, so it doesn't run an installer and never asks for admin authorization to write to any place on a Mac. It can't access that directory while running unless it asks the user for admin authorization.

Also, there's the question of addons that a user will write and add or that are downloaded for use. I'm not clear if those go in the USER location or the LOCAL directory or in a location pointed to by something in one of those.

What kind of files go in each of these locations? I suspect LOCAL is only for Blender use and doesn't need to be copied if I'm trying to sync installs on different computers and I don't see how SYSTEM can be used for much of anything important or necessary if it can't be reached on one of the OSes Blender supports. This makes me think the only directory tree that needs to be copied between installations to sync them is the USER one. I'm also not clear if addons or any Python scripts I write would be stored in USER. I've asked in a Blender forum, but I'm not getting clear answers.

Could someone clarify how Blender uses each of these locations and if I need to copy any other files or directory trees to make sure I keep multiple installs in sync with each other?

Tango
  • 511
  • 2
  • 22

1 Answers1

1

The documentation says:

For system installations both SYSTEM and USER directories are needed.

For locally extracted Blender distributions, the user configuration and run-time data are kept in the same subdirectory, allowing multiple Blender versions to run without conflict, ignoring the USER and SYSTEM files. This requires you to create a folder named config in the LOCAL directory.

So you have USER and SYSTEM for any Blender installations and LOCAL applies to portable zip version(you should not place user files in the installation directory of Blender otherwise). It might not be the best idea to mix versions and operating systems in your work environment.

There is also this section on Overriding Default Directories. So you should set environment variables of the OS(have no idea how you do that on MacOS, but that should be easy to find online by just searching "set environment variables MacOS") to your desired paths.

For example I created BLENDER_USER_RESOURCES environment variable on my machine running Windows(first I copied the user preferences folder to the path):

enter image description here

And now when I start Blender I can see my user installed add-ons are loaded from another path:

enter image description here

Note that some add-ons might be created for specific OS, so they might not work on another and if you place the folder on a network drive, keep in mind accessing files from it will be limited by the network speed so this might be a problem/slightly slower in some cases, like loading assets.

New add-ons will be installed to user preferences directory. In my case that's the directory the environment variable now points to.

Martynas Žiemys
  • 24,274
  • 2
  • 34
  • 77
  • Your rephrasing of the docs helps me some. I'm still trying to make sure I have it all together. It's still confusing that it says it needs the SYSTEM directory when it can't create one on the Mac unless it uses a setup app that asks for your password (which it doesn't). I think it'll take a Blender developer to clarify that! I've been confused about the LOCAL directory, but the way you put it, it sounds like that's for situations like using multiple versions on one system and if you're only using one install on a system, that directory can be ignored (in terms of copying and sharing). – Tango Oct 10 '23 at 08:45
  • Also, it sounds like you added a new location for your scripts and add-ons. (And thanks for the point that some add-ons might be OS specific!) It sounds, though, like the default is to store them in the USER directory unless otherwise specified. Right now I just want to make sure I know where to copy to get all the settings that are specific to that system. As best I can figure, unless I add other settings for my scripts and add-ons, that just copying the USER directory will get everything I need. – Tango Oct 10 '23 at 08:50
  • If I place my preferences in a BLENDER_SYSTEM_RESOURCES directory(pointed to by environment variable), Blender does not seem to load anything from there. So that doesn't seem to work on Windows at least, so BLENDER_USER_RESOURCES is probably the variable you want to set. This is not only for the scripts and add-ons, all user preferences will be saved there. You might want to simply add another scripts directory from Blender's Preferences, File Paths tab for shared add-ons. It might not be a very good idea to limit users from any customisation in general even if they work in the same team. – Martynas Žiemys Oct 10 '23 at 09:26
  • I would just copy user preferences to each user's machine(that's the path called USER in the docs). I just realised what you are actually trying to do... If somebody tried to force me to use same configuration as everyone at the place I work, I would simply quit :D – Martynas Žiemys Oct 10 '23 at 09:29
  • Yeah, most people aren't big on using the same config. It's mostly me, but I have multiple workstations. (One at work, one at home, one in the barn were Itest things out for work...) and it's been driving me crazy going from one configuration to another. I often can't remember where a panel on one machine is because I expect it to be where it is on another system. But I'm thinking what you said should do it: Copy USER and keep it synced. – Tango Oct 10 '23 at 17:06
  • I'm thinking I would not change BLENDER_USER_RESOURCES, so everything is stored in the default location, which makes copying and syncing easier. What I'm not clear about is if add-ons and scripts (aren't they the same?) are, by default, stored in USER. If so, then, yes, copying USER should be all I need to do. – Tango Oct 10 '23 at 17:08
  • Yes, they are in subfolders in USER path. Add-ons are in [USER]/scripts/addons/ specifically. Only copying USER folder will transfer all user preferences. There are rare exceptions - some more sophisticated add-ons like renderers or add-ons containing assets might store files elsewhere or require some other software to be installed elsewhere, but mostly only copying that folder is enough. If it's only for you, you could even set up Google drive or similar cloud storage/backup service to sync them. – Martynas Žiemys Oct 10 '23 at 18:00
  • Thanks for your patience and willingness to clarify. That is a big help. As you indicated, there was that paragraph in the documentation, but I did not feel like it was as clear as it could be. I'm using a LAN share for this and other programs (like LibreOffice) I need to sync and Tailscale (since I use Starlink and can't port forward) to connect when I'm not on my LAN. – Tango Oct 11 '23 at 04:17