32 .structure_type(StructureType::Dynamic);
49#ifndef WITH_OPENCOLORIO
50 layout->
label(
RPT_(
"Disabled, built without OpenColorIO"), ICON_ERROR);
76 if (this->
context().use_gpu()) {
86 const char *source = node_storage(
bnode()).from_color_space;
87 const char *target = node_storage(
bnode()).to_color_space;
119 const char *source = node_storage(
bnode()).from_color_space;
120 const char *target = node_storage(
bnode()).to_color_space;
131 output_image.store_pixel(texel, input_image.load_pixel<float4>(texel));
145 const char *source = node_storage(
bnode()).from_color_space;
146 const char *target = node_storage(
bnode()).to_color_space;
163 const char *source = node_storage(
bnode()).from_color_space;
164 const char *target = node_storage(
bnode()).to_color_space;
166 if (
STREQ(source, target)) {
192 ntype.
ui_name =
"Convert Colorspace";
196 ntype.
declare = file_ns::CMP_NODE_CONVERT_COLOR_SPACE_declare;
197 ntype.
draw_buttons = file_ns::node_composit_buts_convert_colorspace;
199 ntype.
initfunc = file_ns::node_composit_init_convert_colorspace;
#define NODE_CLASS_CONVERTER
#define NODE_STORAGE_FUNCS(StorageT)
constexpr int NODE_DEFAULT_MAX_WIDTH
#define CMP_NODE_CONVERT_COLOR_SPACE
#define STRNCPY_UTF8(dst, src)
ColormanageProcessor * IMB_colormanagement_colorspace_processor_new(const char *from_colorspace, const char *to_colorspace)
bool IMB_colormanagement_space_name_is_data(const char *name)
void IMB_colormanagement_processor_apply(ColormanageProcessor *cm_processor, float *buffer, int width, int height, int channels, bool predivide)
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)
@ UI_ITEM_R_SPLIT_EMPTY_NAME
const void * data() const
StaticCacheManager & cache_manager()
const bNode & bnode() const
NodeOperation(Context &context, DNode node)
OCIOColorSpaceConversionShader & get(Context &context, std::string source, std::string target)
void unbind_shader_and_resources()
const char * input_sampler_name()
gpu::Shader * bind_shader_and_resources()
const char * output_image_name()
Result & get_result(StringRef identifier)
Context & context() const
Result & get_input(StringRef identifier) const
virtual Domain compute_domain()
void share_data(const Result &source)
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
OCIOColorSpaceConversionShaderContainer ocio_color_space_conversion_shaders
StructureType structure_type
ColorGeometry4f default_value
NodeOperation(Context &context, DNode node)
void * MEM_callocN(size_t len, const char *str)
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 NodeOperation * get_compositor_operation(Context &context, DNode node)
static void node_composit_buts_convert_colorspace(uiLayout *layout, bContext *, PointerRNA *ptr)
static void CMP_NODE_CONVERT_COLOR_SPACE_declare(NodeDeclarationBuilder &b)
static void node_composit_init_convert_colorspace(bNodeTree *, bNode *node)
VecBase< float, 4 > float4
VecBase< int32_t, 2 > int2
static void register_node_type_cmp_convert_color_space()
void cmp_node_type_base(blender::bke::bNodeType *ntype, std::string idname, const std::optional< int16_t > legacy_type)
void node_free_standard_storage(bNode *node)
void node_copy_standard_storage(bNodeTree *, bNode *dest_node, const bNode *src_node)
char from_color_space[64]
std::string ui_description
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)