Blender V5.0
libocio_look.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2025 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#include "libocio_look.hh"
6
7#if defined(WITH_OPENCOLORIO)
8
10
11namespace blender::ocio {
12
13LibOCIOLook::LibOCIOLook(const int index, const OCIO_NAMESPACE::ConstLookRcPtr &ocio_look)
14 : ocio_look_(ocio_look)
15{
16 this->index = index;
17 this->is_noop = (ocio_look == nullptr);
18
19 if (ocio_look_) {
20 const StringRefNull look_name = ocio_look_->getName();
21
22 StringRef view, ui_name;
23 if (split_view_specific_look(look_name, view, ui_name)) {
24 view_ = view;
25 ui_name_ = ui_name;
26 }
27 }
28}
29
30} // namespace blender::ocio
31
32#endif
static AppView * view
bool split_view_specific_look(const StringRef look_name, StringRef &view, StringRef &ui_name)