Skip to content

Commit

Permalink
fix(iv): If OCIO env is not set or doesn't exist, have iv use built-i…
Browse files Browse the repository at this point in the history
…n config (#4285)

Signed-off-by: Larry Gritz <lg@larrygritz.com>
  • Loading branch information
lgritz authored Jun 13, 2024
1 parent 762fe7b commit e575f3b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/iv/ivmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,13 @@ main(int argc, char* argv[])

bool use_ocio = color_space != "" && display != "" && view != "";

#ifdef OCIO_HAS_BUILTIN_CONFIGS
std::string ocioenv = Sysutil::getenv("OCIO");
if (ocioenv.empty() || !Filesystem::exists(ocioenv)) {
setenv("OCIO", "ocio://default", 1);
}
#endif

ImageViewer* mainWin = new ImageViewer(use_ocio, color_space, display,
view);
#else
Expand Down

0 comments on commit e575f3b

Please sign in to comment.