Color Management: Add BLENDER_OCIO environment variable

THis works the same as OCIO, but is Blender specific in case you want to
use a different one than other applications.

Pull Request: https://projects.blender.org/blender/blender/pulls/145882
This commit is contained in:
Brecht Van Lommel
2025-09-07 19:22:45 +02:00
parent 2825f98f80
commit 9a5ac6d5ec
2 changed files with 9 additions and 1 deletions

View File

@@ -616,6 +616,12 @@ static void colormanage_free_config()
void colormanagement_init()
{
/* Handle Blender specific override. */
const char *blender_ocio_env = BLI_getenv("BLENDER_OCIO");
if (blender_ocio_env) {
BLI_setenv("OCIO", blender_ocio_env);
}
/* First try config from environment variable. */
const char *ocio_env = BLI_getenv("OCIO");

View File

@@ -883,7 +883,9 @@ static void print_help(bArgs *ba, bool all)
" $BLENDER_CUSTOM_SPLASH_BANNER Full path to an image to overlay on the splash screen.\n");
if (defs.with_opencolorio) {
PRINT(" $OCIO Path to override the OpenColorIO configuration file.\n");
PRINT(
" $BLENDER_OCIO Path to override the OpenColorIO configuration file.\n"
" If not set, the $OCIO environment variable is used.\n");
}
if (defs.win32 || all) {
PRINT(" $TEMP Store temporary files here (MS-Windows).\n");