|
1 | 1 | // SPDX-License-Identifier: Apache-2.0 |
2 | 2 | #include "ocio_engine.hpp" |
3 | 3 |
|
| 4 | +#include "xstudio/utility/helpers.hpp" |
4 | 5 | #include "xstudio/utility/string_helpers.hpp" |
5 | 6 | #include "xstudio/ui/opengl/shader_program_base.hpp" |
6 | 7 | #include "xstudio/thumbnail/thumbnail.hpp" |
@@ -328,7 +329,8 @@ OCIO::ConstConfigRcPtr |
328 | 329 | OCIOEngine::get_ocio_config(const utility::JsonStore &src_colour_mgmt_metadata) const { |
329 | 330 |
|
330 | 331 | const std::string config_name = |
331 | | - src_colour_mgmt_metadata.get_or("ocio_config", default_config_); |
| 332 | + utility::forward_remap_file_path( |
| 333 | + src_colour_mgmt_metadata.get_or("ocio_config", default_config_)); |
332 | 334 | const std::string displays = |
333 | 335 | src_colour_mgmt_metadata.get_or("active_displays", std::string("")); |
334 | 336 | const std::string views = src_colour_mgmt_metadata.get_or("active_views", std::string("")); |
@@ -378,6 +380,14 @@ OCIOEngine::get_ocio_config(const utility::JsonStore &src_colour_mgmt_metadata) |
378 | 380 | econfig->setActiveDisplays(displays.c_str()); |
379 | 381 | if (!views.empty()) |
380 | 382 | econfig->setActiveViews(views.c_str()); |
| 383 | + |
| 384 | + econfig->clearSearchPaths(); |
| 385 | + for (int i = 0; i < config->getNumSearchPaths(); ++i) { |
| 386 | + auto path = std::string(config->getSearchPath(i)); |
| 387 | + auto newpath = utility::forward_remap_file_path(path); |
| 388 | + econfig->addSearchPath(newpath.c_str()); |
| 389 | + } |
| 390 | + |
381 | 391 | config = econfig; |
382 | 392 | ocio_config_cache_[concat] = config; |
383 | 393 |
|
|
0 commit comments