35 b.add_input<
decl::Int>(
"Start Frame").default_value(1);
36 b.add_input<
decl::Int>(
"End Frame").default_value(250);
112 "Generate a factor value (from 0.0 to 1.0) between scene start and end time, using a curve "
116 ntype.
declare = file_ns::cmp_node_time_declare;
118 ntype.
initfunc = file_ns::node_composit_init_curves_time;
132 b.is_function_node();
134 .default_value({1.0f, 1.0f, 1.0f, 1.0f})
135 .description(
"Image/Color input on which RGB color transformation will be applied");
141 .description(
"Amount of influence the node exerts on the image");
143 .default_value({0.0f, 0.0f, 0.0f, 1.0f})
144 .description(
"Input color that should be mapped to black");
146 .default_value({1.0f, 1.0f, 1.0f, 1.0f})
147 .description(
"Input color that should be mapped to white");
178 float start_slopes[
CM_TOT];
181 float range_minimums[
CM_TOT];
183 float range_dividers[
CM_TOT];
189 "curves_film_like_compositor",
200 const float min = 0.0f;
201 const float max = 1.0f;
216 "curves_combined_only_compositor",
229 "curves_combined_rgb_compositor",
247 return mf::build::SI4_SO<float4, float, float4, float4, float4>(
256 curve_mapping,
result,
color, black, black_white_scale);
260 mf::build::exec_presets::SomeSpanOrSingle<0>());
274 ntype.
ui_description =
"Perform level adjustments on each color channel of an image";
277 ntype.
declare = file_ns::cmp_node_rgbcurves_declare;
279 ntype.
initfunc = file_ns::node_composit_init_curve_rgb;
281 ntype.
gpu_fn = file_ns::node_gpu_material;
#define NODE_CLASS_OP_COLOR
#define CMP_NODE_CURVE_RGB
bool GPU_stack_link(GPUMaterial *mat, const bNode *node, const char *name, GPUNodeStack *in, GPUNodeStack *out,...)
GPUNodeLink * GPU_constant(const float *num)
GPUNodeLink * GPU_color_band(GPUMaterial *mat, int size, float *pixels, float *r_row)
bool GPU_link(GPUMaterial *mat, const char *name,...)
GPUNodeLink * GPU_uniform(const float *num)
#define NOD_REGISTER_NODE(REGISTER_FUNC)
int get_frame_number() const
const bNode & bnode() const
NodeOperation(Context &context, DNode node)
Result & get_result(StringRef identifier)
Context & context() const
Result & get_input(StringRef identifier) const
T get_single_value_default(const T &default_value) const
void set_single_value(const T &value)
void allocate_single_value()
void construct_and_set_matching_fn_cb(Fn &&create_multi_function)
const CurveMapping * get_curve_mapping()
float compute_normalized_time()
NodeOperation(Context &context, DNode node)
VecBase< float, 4 > float4
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))
GPUNodeStack & get_shader_node_input(const bNode &node, GPUNodeStack inputs[], StringRef identifier)
GPUNodeLink * get_shader_node_input_link(const bNode &node, GPUNodeStack inputs[], StringRef identifier)
T clamp(const T &a, const T &min, const T &max)
T interpolate(const T &a, const T &b, const FactorT &t)
static CurveMapping * get_curve_mapping(const bNode &node)
static void cmp_node_rgbcurves_declare(NodeDeclarationBuilder &b)
static void node_build_multi_function(blender::nodes::NodeMultiFunctionBuilder &builder)
static void node_composit_init_curve_rgb(bNodeTree *, bNode *node)
static int node_gpu_material(GPUMaterial *material, bNode *node, bNodeExecData *, GPUNodeStack *inputs, GPUNodeStack *outputs)
static NodeOperation * get_compositor_operation(Context &context, DNode node)
static void cmp_node_time_declare(NodeDeclarationBuilder &b)
static void node_composit_init_curves_time(bNodeTree *, bNode *node)
VecBase< float, 4 > float4
VecBase< float, 3 > float3
static void register_node_type_cmp_curve_time()
static void register_node_type_cmp_curve_rgb()
void cmp_node_type_base(blender::bke::bNodeType *ntype, std::string idname, const std::optional< int16_t > legacy_type)
static blender::bke::bNodeSocketTemplate outputs[]
static blender::bke::bNodeSocketTemplate inputs[]
void node_copy_curves(bNodeTree *, bNode *dest_node, const bNode *src_node)
void node_free_curves(bNode *node)
std::string ui_description
NodeGetCompositorOperationFunction get_compositor_operation
void(* initfunc)(bNodeTree *ntree, bNode *node)
NodeGPUExecFunction gpu_fn
NodeMultiFunctionBuildFunction build_multi_function
const char * enum_name_legacy
NodeDeclareFunction declare