Developer Forum

Setting a custom script path in the preferences doesnt seem to work?

when you install it I think it automatically puts it into the app data folder, unless there’s a third place it saves them to :smiley:

So basically it wont work unless you install the plugin (which unzips it to the app data folder) or manually place it in the two locations mentioned, the custom folder and the app data folder.

Well, unless you unzip the folder into the daily builds addon folder, in which case it installs it automatically when you open blender, and also places it in the app data folder automatically.

Sure, yes, you need to “Enable” the addon still. But that doesn’t modify the AppData folder here - have you checked?

yep, just checked and my addons have been unzipped by blender into the app data folder for 2.8 upwards. In those instances I’d copied the addon to the downloaded daily build’s addon folder, and blender had added them to the addon list (not installed sorry), and also copied them to the app data folder.

I was speaking to the design connected team a few months ago when they’d just released their asset manager addon for blender. They were also extremely confused with this behaviour, unsure where to put what.

Yes, that’s what happens when you “Install” from a .zip – it will be unzipped into the AppData folder (not the custom script folder)

I guess that’s where the confusion lies. The custom script folder is for already unzipped addons.

When using custom script paths you do not “Install”, you just “Enable” since the custom script folder is more the “search path” (per the docs: An additional location to search for Python scripts.) and not an “install files here” or “automatically install zips from this location when launched”

yep, but I don’t want to install it from a zip, I want it to place it in the custom addon folder and it just appear in the preferences addon list, otherwise what’s the point in the custom location if you’ve still got to install it to another location or manually place the unzipped folder into two locations? Makes no sense to me.

If it listed it in the addons and then automatically copied it to the app data folder, the same as it does if you use the daily builds addon folder, then that would be halfway to a better system I guess…but I’m still not sure why it needs to unzip the same folder to the app data folder if that identical folder is already sat there in the custom folder.

??? You don’t? I didn’t have to with the addon I tried above.

Here’s what I did:

  • I unzipped an addon to c:\users___\Desktop\tests\addons\ called modifier_list (it will remain here forever now; this is the only time you have to perform this step)
  • I set blender to use c:\users___\Desktop\test\ as a custom script path
  • I re-opened blender and immediately just “Enabled” addon modifier_list (it did not get copied to AppData)

Weird, that’s what I’ve done and the addon in the custom folder aren’t appearing in the addon list.

unless it’s a bug with 2.9? Have you tried it with 2.9?

edit: just saw 2.9 in your file path.

stumped then.

Unless there is a third location that it gets saved to. Maybe you’ve used that addon in a previous version number, so it’s in an additional location blender checks for addons.

Could you try downloading some addon you’ve definitely never used before, unzip it into your new custom folder, and then see if it appears in the addons list when you restart blender?

maybe try putting the custom folder on a different drive too, although I can’t imagine that should matter.

this is my setup:

full path to addon:

E:\blender\shared files between versions\scripts\addons\Screencast-Keys-master\

not listed after restarting blender:

That looks like, another, common problem I see pop up over and over in many other places – did you just copy the github repo of that addon?

If so, that’s not going to work; the directory structure in git is different than the directory structure of a proper addon.

You can try to set a BLENDER_USER_SCRIPTS environment variable - works for me.

1 Like

you hit the nail on the head, the problem was between the chair and the keyboard :smiley: Thanks for your help.

thanks, sorted though, it was my fault. I was copying the github root instead of the source folder.

It seems you got it working, but Blender’s way of dealing with file paths in general is a bit… interesting…

It has some design ideas that limit things like Project Managers as in Maya or Houdini to be a very hard to add as a addon or alike.

And just a note here… Try to avoid long foldernames, especially with spaces. Use a _ if neccessary.
Unless the filepath was a example :wink:

Hi Jim,

How does one define this in a init startup file, like with Maya’s or Houdini’s .env file?
I have a set of custom application templates running, and if I can add this to the script, it would already make my life a bit simpler :wink:
Or even better, use all the File Paths variables for a init startup script.

rob

edit: with the help of the code inside the preferences menu and the application template example I got it to work just fine. It was just getting the proper context in the init file.

In review I’m not sure I understood the question, nor realized purpose of the forum. I’m new to Blender and wanted to get started with Python scripting. I found myself loading Blender defaults a lot and wanted to not have to set the Scripts file path every time I reset. I found that by setting the BLENDER_USER_SCRIPTS operating system environment variable my test scripts and addons where available no matter which version (stable or nightly) of Blender I opened.