MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/OpenColorIO / CreateFromEnv

Method CreateFromEnv

src/OpenColorIO/Config.cpp:1135–1152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1133}
1134
1135ConstConfigRcPtr Config::CreateFromEnv()
1136{
1137 std::string file;
1138 Platform::Getenv(OCIO_CONFIG_ENVVAR, file);
1139
1140 // File may be one of the following:
1141 // 1) Path to a config file (e.g. /home/user/ocio/config.ocio)
1142 // 2) Path to an archived config file (e.g. /home/user/ocio/archived_config.ocioz)
1143 // 3) URI to a built-in config (e.g. ocio://cg-config-v0.1.0_aces-v1.3_ocio-v2.1.1)
1144 if(!file.empty()) return CreateFromFile(file.c_str());
1145
1146 static const char err[] =
1147 "Color management disabled. (Specify the $OCIO environment variable to enable.)";
1148
1149 LogInfo(err);
1150
1151 return CreateRaw();
1152}
1153
1154ConstConfigRcPtr Config::CreateFromFile(const char * filename)
1155{

Callers 2

Calls 3

GetenvFunction · 0.85
LogInfoFunction · 0.85
emptyMethod · 0.45

Tested by 2