5
$\begingroup$

How can I get the the user preferences path from blender, on windows system the path is %appdata%\Blender Foundation\Blender\2.74\config I want to get this path from blender using python on any system.

$\endgroup$
8
$\begingroup$

Using: bpy.utils.resource_path('USER')

eg:

import os
import bpy

user_path = bpy.utils.resource_path('USER')
config_path = os.path.join(user_path, "config")
  • Or on Linux:
    /home/user_name/.config/blender/2.74
  • On ms-windows will return:
    C:\Users\user_name\AppData\Roaming\Blender Foundation\Blender\2.74

See: bpy.utils.resource_path api docs

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.