| 1133 | } |
| 1134 | |
| 1135 | ConstConfigRcPtr 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 | |
| 1154 | ConstConfigRcPtr Config::CreateFromFile(const char * filename) |
| 1155 | { |