Operating system: Windows-10-10.0.17134 64 Bits
Graphics card: Quadro P4000/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 412.16
Blender Version
Broken: version: 2.80 (sub 50), branch: master, commit date: 2019-03-19 06:43, hash: rB4db7842a72cc
Worked: unknown, 2.79 latest shows same behavior
Short description of error
As a few times before, this is in conjunction with having a custom user_scripts path via environment variables BLENDER_USER_CONFIG and BLENDER_USER_SCRIPTS. When using the bpy.utils.user_resource( ) function for an own add-on, I came across something strange: Passing only the resource type (for instance 'SCRIPTS') to it yields the correct location of my scripts. Passing the optional sub-directory suddenly defaults back to the ones in C:\Users\ME\AppData\etcetc. See output from Blender Python console:
>>> bpy.utils.user_resource('SCRIPTS', 'test')
'C:\\Users\\ME\\AppData\\Roaming\\Blender Foundation\\Blender\\2.80\\scripts\\test'
>>> bpy.utils.user_resource('SCRIPTS')
'D:\\_PREFS_REFACTOR_\\_28_\\UserConfigs\\..\\scripts\\'
>>> bpy.utils.user_resource('CONFIG', 'test')
'C:\\Users\\ME\\AppData\\Roaming\\Blender Foundation\\Blender\\2.80\\config\\test'
>>> bpy.utils.user_resource('CONFIG')
'D:\\_PREFS_REFACTOR_\\_28_\\UserConfigs\\ME\\'This makes the creation of shared custom presets for my Add-on operator impossible for me, as the preset never lands on the network drive.
Exact steps for others to reproduce the error
- Set Blender User Scripts path and User Config path to a custom location first (on Windows, create environment variables BLENDER_USER_CONFIG and BLENDER_USER_SCRIPTS and assign path locations to it).
- Open Blender, go to Python console, test the output of the commands bpy.utils.user_resource('SCRIPTS', 'test') and bpy.utils.user_resource('SCRIPTS').