Skip to content

Commit f202033

Browse files
committed
ocio: don't discard shader view when display is empty (offscreen renders)
Same defect as the process_thumbnail fix (4a0d5c76), second site: display_transform() reset both display AND view to the config defaults whenever either was empty. Offscreen/snapshot viewport pipeline instances always have an empty Display attribute, so a valid resolved view (e.g. 'raw' for un-tone-mapped media) was replaced by the default Client-look view, double-grading annotation exports and any offscreen render. Fill display and view independently instead. (cherry picked from commit e53a9849fc764cb25b25d2f05120cc30d7511b47)
1 parent 7991f45 commit f202033

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

src/plugin/colour_pipeline/ocio/src/ocio_engine.cpp

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -594,10 +594,16 @@ OCIO::TransformRcPtr OCIOEngine::display_transform(
594594
if (!bypass) {
595595
std::string _display = display;
596596
std::string _view = view;
597-
if (display.empty() or view.empty()) {
597+
// Fill display and view INDEPENDENTLY (same fix as process_thumbnail):
598+
// offscreen/snapshot viewport pipeline instances are never attached to
599+
// a physical display so their Display attribute is empty; the combined
600+
// `display.empty() or view.empty()` check then discarded a valid
601+
// caller-supplied view (e.g. 'raw' for un-tone-mapped media) and
602+
// double-graded offscreen renders such as annotation exports.
603+
if (_display.empty())
598604
_display = ocio_config->getDefaultDisplay();
599-
_view = ocio_config->getDefaultView(_display.c_str());
600-
}
605+
if (_view.empty())
606+
_view = ocio_config->getDefaultView(_display.c_str());
601607

602608
OCIO::DisplayViewTransformRcPtr dt = OCIO::DisplayViewTransform::Create();
603609
dt->setSrc(working_space(src_colour_mgmt_metadata).c_str());

0 commit comments

Comments
 (0)