38 .compositor_domain_priority(0);
57 sub = &
col->column(
false);
63 sub = &
col->column(
false);
86 const TexMapping &texture_mapping = node_storage(*node);
93 "node_composite_map_value",
104template<
bool UseMin,
bool UseMax>
106 const float value,
const float offset,
const float size,
const float min,
const float max)
110 if constexpr (UseMin) {
114 if constexpr (UseMax) {
124 const float offset = texture_mapping.
loc[0];
125 const float size = texture_mapping.
size[0];
126 const float min = texture_mapping.
min[0];
127 const float max = texture_mapping.
max[0];
134 return mf::build::SI1_SO<float, float>(
135 "Map Value With Min With Max",
136 [=](
const float value) ->
float {
139 mf::build::exec_presets::AllSpanOrSingle());
144 return mf::build::SI1_SO<float, float>(
145 "Map Value With Min No Max",
146 [=](
const float value) ->
float {
149 mf::build::exec_presets::AllSpanOrSingle());
156 return mf::build::SI1_SO<float, float>(
157 "Map Value No Min With Max",
158 [=](
const float value) ->
float {
161 mf::build::exec_presets::AllSpanOrSingle());
166 return mf::build::SI1_SO<float, float>(
167 "Map Value No Min No Max",
168 [=](
const float value) ->
float {
171 mf::build::exec_presets::AllSpanOrSingle());
190 ntype.
declare = file_ns::cmp_node_map_value_declare;
191 ntype.
draw_buttons = file_ns::node_composit_buts_map_value;
192 ntype.
initfunc = file_ns::node_composit_init_map_value;
195 ntype.
gpu_fn = file_ns::node_gpu_material;
#define NODE_STORAGE_FUNCS(StorageT)
#define NODE_CLASS_OP_VECTOR
#define CMP_NODE_MAP_VALUE
struct TexMapping * BKE_texture_mapping_add(int type)
bool GPU_stack_link(GPUMaterial *mat, const bNode *node, const char *name, GPUNodeStack *in, GPUNodeStack *out,...)
GPUNodeLink * GPU_constant(const float *num)
GPUNodeLink * GPU_uniform(const float *num)
#define NOD_REGISTER_NODE(REGISTER_FUNC)
@ UI_ITEM_R_SPLIT_EMPTY_NAME
void uiLayoutSetActive(uiLayout *layout, bool active)
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
void construct_and_set_matching_fn_cb(Fn &&create_multi_function)
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 int node_gpu_material(GPUMaterial *material, bNode *node, bNodeExecData *, GPUNodeStack *inputs, GPUNodeStack *outputs)
static void node_composit_init_map_value(bNodeTree *, bNode *node)
static void node_composit_buts_map_value(uiLayout *layout, bContext *, PointerRNA *ptr)
static void node_build_multi_function(blender::nodes::NodeMultiFunctionBuilder &builder)
static bool get_use_min(const bNode &node)
static float map_value(const float value, const float offset, const float size, const float min, const float max)
static bool get_use_max(const bNode &node)
static void cmp_node_map_value_declare(NodeDeclarationBuilder &b)
static void register_node_type_cmp_map_value()
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)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
std::string ui_description
void(* initfunc)(bNodeTree *ntree, bNode *node)
NodeGPUExecFunction gpu_fn
NodeMultiFunctionBuildFunction build_multi_function
const char * enum_name_legacy
void(* draw_buttons)(uiLayout *, bContext *C, PointerRNA *ptr)
NodeGatherSocketLinkOperationsFunction gather_link_search_ops
NodeDeclareFunction declare
uiLayout & column(bool align)
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)