38 .structure_type(StructureType::Dynamic);
40 "Convert from display to scene linear instead. Not all view transforms can be inverted "
41 "exactly, and the result may not match the original scene linear image");
85#ifndef WITH_OPENCOLORIO
86 layout->
label(
RPT_(
"Disabled, built without OpenColorIO"), ICON_ERROR);
92 layout->
prop(&display_ptr,
"display_device",
UI_ITEM_NONE, std::nullopt, ICON_NONE);
93 layout->
prop(&view_ptr,
"view_transform",
UI_ITEM_NONE, std::nullopt, ICON_NONE);
116 if (this->
context().use_gpu()) {
168 output_image.store_pixel(texel, input_image.load_pixel<float4>(texel));
209 ntype.
ui_name =
"Convert to Display";
211 "Convert from scene linear to display color space, with a view transform and look for tone "
#define NODE_CLASS_CONVERTER
#define NODE_STORAGE_FUNCS(StorageT)
constexpr int NODE_DEFAULT_MAX_WIDTH
#define CMP_NODE_CONVERT_TO_DISPLAY
@ COLORMANAGE_VIEW_ONLY_VIEW_LOOK
@ DISPLAY_SPACE_VIDEO_OUTPUT
void IMB_colormanagement_processor_apply(ColormanageProcessor *cm_processor, float *buffer, int width, int height, int channels, bool predivide)
ColormanageProcessor * IMB_colormanagement_display_processor_new(const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings, const ColorManagedDisplaySpace display_space=DISPLAY_SPACE_DRAW, const bool inverse=false)
void IMB_colormanagement_processor_free(ColormanageProcessor *cm_processor)
void IMB_colormanagement_processor_apply_pixel(ColormanageProcessor *cm_processor, float *pixel, int channels)
#define NOD_REGISTER_NODE(REGISTER_FUNC)
const void * data() const
StaticCacheManager & cache_manager()
const bNode & bnode() const
NodeOperation(Context &context, DNode node)
OCIOToDisplayShader & get(Context &context, const ColorManagedDisplaySettings &display_settings, const ColorManagedViewSettings &view_settings, const bool inverse)
const char * input_sampler_name()
const char * output_image_name()
void unbind_shader_and_resources()
gpu::Shader * bind_shader_and_resources()
Result & get_result(StringRef identifier)
Context & context() const
Result & get_input(StringRef identifier) const
virtual Domain compute_domain()
void share_data(const Result &source)
T get_single_value_default(const T &default_value) const
void allocate_texture(const Domain domain, const bool from_pool=true, const std::optional< ResultStorageType > storage_type=std::nullopt)
void unbind_as_texture() const
void set_single_value(const T &value)
void bind_as_texture(gpu::Shader *shader, const char *texture_name) const
int64_t channels_count() const
void unbind_as_image() const
void allocate_single_value()
void bind_as_image(gpu::Shader *shader, const char *image_name, bool read=false) const
bool is_single_value() const
const T & get_single_value() const
OCIOToDisplayShaderContainer ocio_to_display_shaders
StructureType structure_type
ColorGeometry4f default_value
NodeOperation(Context &context, DNode node)
void * MEM_callocN(size_t len, const char *str)
void MEM_freeN(void *vmemh)
void node_type_size(bNodeType &ntype, int width, int minwidth, int maxwidth)
void node_register_type(bNodeType &ntype)
void node_type_storage(bNodeType &ntype, std::optional< StringRefNull > storagename, void(*freefunc)(bNode *node), void(*copyfunc)(bNodeTree *dest_ntree, bNode *dest_node, const bNode *src_node))
void node_type_size_preset(bNodeType &ntype, eNodeSizePreset size)
void compute_dispatch_threads_at_least(gpu::Shader *shader, int2 threads_range, int2 local_size=int2(16))
void parallel_for(const int2 range, const Function &function)
static void node_init(bNodeTree *, bNode *node)
static void node_declare(NodeDeclarationBuilder &b)
static void node_copy(bNodeTree *, bNode *dest_node, const bNode *src_node)
static void node_blend_read(bNodeTree &, bNode &node, BlendDataReader &reader)
static void register_node_type_cmp_convert_to_display()
static void node_draw_buttons(uiLayout *layout, bContext *, PointerRNA *ptr)
static void node_free(bNode *node)
static void node_blend_write(const bNodeTree &, const bNode &node, BlendWriter &writer)
static NodeOperation * get_compositor_operation(Context &context, DNode node)
VecBase< float, 4 > float4
VecBase< int32_t, 2 > int2
void cmp_node_type_base(blender::bke::bNodeType *ntype, std::string idname, const std::optional< int16_t > legacy_type)
PointerRNA RNA_pointer_get(PointerRNA *ptr, const char *name)
ColorManagedDisplaySettings display_settings
ColorManagedViewSettings view_settings
NodeBlendWriteFunction blend_write_storage_content
std::string ui_description
NodeBlendDataReadFunction blend_data_read_storage_content
NodeGetCompositorOperationFunction get_compositor_operation
void(* initfunc)(bNodeTree *ntree, bNode *node)
const char * enum_name_legacy
void(* draw_buttons)(uiLayout *, bContext *C, PointerRNA *ptr)
NodeDeclareFunction declare
void label(blender::StringRef name, int icon)
void prop(PointerRNA *ptr, PropertyRNA *prop, int index, int value, eUI_Item_Flag flag, std::optional< blender::StringRef > name_opt, int icon, std::optional< blender::StringRef > placeholder=std::nullopt)