I have an addon that allows changing your current theme to a custom one using bpy.ops.preferences.theme_install(path), but I also want to allow going back to the previous theme (just in case).

The previous theme won't always be the Blender Default so bpy.ops.preferences.reset_default_theme isn't that useful. Ideally, I would want to store the path of the current theme, perform the switch, and then re-use the path if the user ever wants to switch back.

Anyone know how to get the path of the current theme or something that can be of similar use?


Your Answer

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

Browse other questions tagged or ask your own question.