Blender V5.3
node_texture_proc.cc File Reference
#include "BKE_material.hh"
#include "BKE_texture.h"
#include "BLI_listbase.hh"
#include "BLI_math_vector_c.hh"
#include "DNA_material_types.h"
#include "node_texture_util.hh"
#include "node_util.hh"
#include "RE_texture.h"

Go to the source code of this file.

Namespaces

namespace  blender
 BMesh Iterators.

Macros

#define I   2
#define COMMON_INPUTS   {SOCK_RGBA, "Color 1", 0.0f, 0.0f, 0.0f, 1.0f}, {SOCK_RGBA, "Color 2", 1.0f, 1.0f, 1.0f, 1.0f}
#define ProcNoInputs(name)
#define ProcDef(name)
#define TexDef(TEXTYPE, idname, outputs, name, Name, EnumNameLegacy)
#define C   outputs_color_only
#define CV   outputs_both

Typedefs

using blender::MapFn = void (*)(Tex *tex, bNodeStack **in, TexParams *p, const short thread)

Functions

static void blender::do_proc (float *result, TexParams *p, const float col1[4], const float col2[4], Tex *tex, const short thread)
static void blender::texfn (float *result, TexParams *p, bNode *node, bNodeStack **in, MapFn map_inputs, short thread)
static int blender::count_outputs (bNode *node)
static void blender::voronoi_map_inputs (Tex *tex, bNodeStack **in, TexParams *p, short thread)
 blender::ProcDef (voronoi)
 blender::ProcNoInputs (blend)
 blender::ProcDef (blend)
static void blender::magic_map_inputs (Tex *tex, bNodeStack **in, TexParams *p, short thread)
 blender::ProcDef (magic)
static void blender::marble_map_inputs (Tex *tex, bNodeStack **in, TexParams *p, short thread)
 blender::ProcDef (marble)
static void blender::clouds_map_inputs (Tex *tex, bNodeStack **in, TexParams *p, short thread)
 blender::ProcDef (clouds)
static void blender::distnoise_map_inputs (Tex *tex, bNodeStack **in, TexParams *p, short thread)
 blender::ProcDef (distnoise)
static void blender::wood_map_inputs (Tex *tex, bNodeStack **in, TexParams *p, short thread)
 blender::ProcDef (wood)
static void blender::musgrave_map_inputs (Tex *tex, bNodeStack **in, TexParams *p, short thread)
 blender::ProcDef (musgrave)
 blender::ProcNoInputs (noise)
 blender::ProcDef (noise)
static void blender::stucci_map_inputs (Tex *tex, bNodeStack **in, TexParams *p, short thread)
 blender::ProcDef (stucci)
static void blender::init (bNodeTree *, bNode *node)
 blender::TexDef (TEX_VORONOI, "TextureNodeTexVoronoi", CV, voronoi, "Voronoi", "TEX_VORONOI")
 blender::TexDef (TEX_BLEND, "TextureNodeTexBlend", C, blend, "Blend", "TEX_BLEND")
 blender::TexDef (TEX_MAGIC, "TextureNodeTexMagic", C, magic, "Magic", "TEX_MAGIC")
 blender::TexDef (TEX_MARBLE, "TextureNodeTexMarble", CV, marble, "Marble", "TEX_MARBLE")
 blender::TexDef (TEX_CLOUDS, "TextureNodeTexClouds", CV, clouds, "Clouds", "TEX_CLOUDS")
 blender::TexDef (TEX_WOOD, "TextureNodeTexWood", CV, wood, "Wood", "TEX_WOOD")
 blender::TexDef (TEX_MUSGRAVE, "TextureNodeTexMusgrave", CV, musgrave, "Musgrave", "TEX_MUSGRAVE")
 blender::TexDef (TEX_NOISE, "TextureNodeTexNoise", C, noise, "Noise", "TEX_NOISE")
 blender::TexDef (TEX_STUCCI, "TextureNodeTexStucci", CV, stucci, "Stucci", "TEX_STUCCI")
 blender::TexDef (TEX_DISTNOISE, "TextureNodeTexDistNoise", CV, distnoise, "Distorted Noise", "TEX_DISTNOISE")

Variables

static bke::bNodeSocketTemplate blender::outputs_both []
static bke::bNodeSocketTemplate blender::outputs_color_only [] = {{SOCK_RGBA, N_("Color")}, {-1, ""}}
static bke::bNodeSocketTemplate blender::voronoi_inputs []
static bke::bNodeSocketTemplate blender::blend_inputs [] = {COMMON_INPUTS, {-1, ""}}
static bke::bNodeSocketTemplate blender::magic_inputs []
static bke::bNodeSocketTemplate blender::marble_inputs []
static bke::bNodeSocketTemplate blender::clouds_inputs []
static bke::bNodeSocketTemplate blender::distnoise_inputs []
static bke::bNodeSocketTemplate blender::wood_inputs []
static bke::bNodeSocketTemplate blender::musgrave_inputs []
static bke::bNodeSocketTemplate blender::noise_inputs [] = {COMMON_INPUTS, {-1, ""}}
static bke::bNodeSocketTemplate blender::stucci_inputs []

Macro Definition Documentation

◆ C

#define C   outputs_color_only

Definition at line 267 of file node_texture_proc.cc.

◆ COMMON_INPUTS

#define COMMON_INPUTS   {SOCK_RGBA, "Color 1", 0.0f, 0.0f, 0.0f, 1.0f}, {SOCK_RGBA, "Color 2", 1.0f, 1.0f, 1.0f, 1.0f}

Definition at line 31 of file node_texture_proc.cc.

◆ CV

◆ I

#define I   2

Definition at line 30 of file node_texture_proc.cc.

Referenced by btDeformableLinearElasticityForce::addScaledDampingForce(), btDeformableNeoHookeanForce::addScaledDampingForce(), btDeformableLinearElasticityForce::addScaledDampingForceDifferential(), btDeformableNeoHookeanForce::addScaledDampingForceDifferential(), btDeformableLinearElasticityForce::addScaledHessian(), btSoftBody::applyRepulsionForce(), blender::ValueSequence< T, Elements >::at_index(), blender::blinn_specular(), bump_shadowing_term(), blender::clouds_map_inputs(), btRigidBody::computeGyroscopicImpulseImplicit_World(), libmv::ComputeTrackingEquation(), libmv::ComputeTrackingEquation(), Freestyle::computeVisibility(), blender::copy_particle_systems_to_object(), blender::dfdx_spring(), blender::distnoise_map_inputs(), ensure_valid_specular_reflection(), evalEulerEqn(), evalEulerEqnDeriv(), blender::fn::multi_function::build::detail::execute_element_fn_as_multi_function(), blender::fn::lazy_function::detail::execute_lazy_function_eagerly_impl(), film_adaptive_sampling_convergence_check(), Freestyle::findOccludee(), Freestyle::findOccludee(), workbench::prepass::frag_transparent(), blender::blenlib_detail::get_default_hash_array(), workbench::get_matcap_lighting(), workbench::get_matcap_lighting(), workbench::get_world_lighting(), guiding_record_volume_segment(), light_pdf_area_to_solid_angle(), blender::magic_map_inputs(), blender::marble_map_inputs(), workbench::matcap_uv_compute(), eevee::camera::mirror_ball_to_direction(), mirrorball_to_direction(), blender::musgrave_map_inputs(), btDeformableBackwardEulerObjective::reinitialize(), libmv::SelectKeyframesBasedOnGRICAndVariance(), shader_setup_from_displace(), shader_setup_from_sample(), shading_incoming(), blender::SIM_hair_volume_vertex_grid_forces(), blender::SIM_mass_spring_add_constraint_ndof1(), blender::SIM_mass_spring_add_constraint_ndof2(), blender::SIM_mass_spring_force_drag(), blender::SIM_mass_spring_force_spring_bending_hair(), blender::SIM_mass_spring_solver_create(), blender::spring_grad_dir(), blender::stucci_map_inputs(), blender::studiolight_lights_eval(), triangle_light_pdf_area_sampling(), blender::unroll_impl(), blender::voronoi_map_inputs(), and blender::wood_map_inputs().

◆ ProcDef

#define ProcDef ( name)
Value:
static void name##_colorfn( \
float *result, TexParams *p, bNode *node, bNodeStack **in, short thread) \
{ \
texfn(result, p, node, in, &name##_map_inputs, thread); \
} \
static void name##_exec(void *data, \
int , \
bNode *node, \
bNodeExecData *execdata, \
bNodeStack **in, \
bNodeStack **out) \
{ \
int outs = count_outputs(node); \
if (outs >= 1) { \
tex_output(node, execdata, in, out[0], &name##_colorfn, static_cast<TexCallData *>(data)); \
} \
}

Definition at line 85 of file node_texture_proc.cc.

◆ ProcNoInputs

#define ProcNoInputs ( name)
Value:
static void name##_map_inputs( \
Tex * , bNodeStack ** , TexParams * , short ) \
{ \
}

Definition at line 79 of file node_texture_proc.cc.

◆ TexDef

#define TexDef ( TEXTYPE,
idname,
outputs,
name,
Name,
EnumNameLegacy )
Value:
void register_node_type_tex_proc_##name(void) \
{ \
static bke::bNodeType ntype; \
\
tex_node_type_base(&ntype, UString(idname), TEX_NODE_PROC + TEXTYPE); \
ntype.ui_name = Name; \
ntype.enum_name_legacy = EnumNameLegacy; \
ntype.nclass = NODE_CLASS_TEXTURE; \
bke::node_type_socket_templates(&ntype, name##_inputs, outputs); \
ntype.default_width = bke::NodeWidth::_160; \
ntype.initfunc = init; \
bke::node_type_storage(ntype, "Tex", node_free_standard_storage, node_copy_standard_storage); \
ntype.exec_fn = name##_exec; \
ntype.flag |= NODE_PREVIEW; \
\
bke::node_register_type(ntype); \
}
#define NODE_CLASS_TEXTURE
Definition BKE_node.hh:488
#define TEX_NODE_PROC
void init()

Definition at line 248 of file node_texture_proc.cc.