26 N_(
"Multiply the input image's RGBA channels by the alpha input value")},
31 N_(
"Replace the input image's alpha channel by the alpha input value")},
32 {0,
nullptr, 0,
nullptr,
nullptr},
37 b.use_custom_socket_order();
38 b.allow_any_socket_order();
40 b.add_input<
decl::Color>(
"Image").default_value({1.0f, 1.0f, 1.0f, 1.0f}).hide_value();
41 b.add_output<
decl::Color>(
"Image").align_with_previous();
43 b.add_input<
decl::Float>(
"Alpha").default_value(1.0f).min(0.0f).max(1.0f);
70 static auto function = mf::build::SI3_SO<float4, float, MenuValue, float4>(
81 mf::build::exec_presets::AllSpanOrSingle());
99 ntype.
declare = file_ns::cmp_node_setalpha_declare;
100 ntype.
initfunc = file_ns::node_composit_init_setalpha;
103 ntype.
gpu_fn = file_ns::node_gpu_material;
#define NODE_CLASS_CONVERTER
#define CMP_NODE_SETALPHA
@ CMP_NODE_SETALPHA_MODE_REPLACE_ALPHA
@ CMP_NODE_SETALPHA_MODE_APPLY
bool GPU_stack_link(GPUMaterial *mat, const bNode *node, const char *name, GPUNodeStack *in, GPUNodeStack *out,...)
#define NOD_REGISTER_NODE(REGISTER_FUNC)
void set_matching_fn(const mf::MultiFunction *fn)
void * MEM_callocN(size_t len, const char *str)
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))
static void node_build_multi_function(blender::nodes::NodeMultiFunctionBuilder &builder)
static int node_gpu_material(GPUMaterial *material, bNode *node, bNodeExecData *, GPUNodeStack *inputs, GPUNodeStack *outputs)
static const EnumPropertyItem type_items[]
static void node_composit_init_setalpha(bNodeTree *, bNode *node)
static void cmp_node_setalpha_declare(NodeDeclarationBuilder &b)
VecBase< float, 4 > float4
static void register_node_type_cmp_setalpha()
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_free_standard_storage(bNode *node)
void node_copy_standard_storage(bNodeTree *, bNode *dest_node, const bNode *src_node)
std::string ui_description
void(* initfunc)(bNodeTree *ntree, bNode *node)
NodeGPUExecFunction gpu_fn
NodeMultiFunctionBuildFunction build_multi_function
const char * enum_name_legacy
NodeDeclareFunction declare