Blender V5.0
Node Union Referenceabstract

#include <node.h>

Inherited by Background, BufferParams, BufferPass, Camera, DenoiseParams, Film, Geometry, Integrator, Object, ParticleSystem, Pass, Procedural, Shader, and ShaderNode.

Public Member Functions

 Node (const NodeType *type, ustring name=ustring())
virtual ~Node ()=0
void set (const SocketType &input, bool value)
void set (const SocketType &input, const int value)
void set (const SocketType &input, const uint value)
void set (const SocketType &input, const uint64_t value)
void set (const SocketType &input, const float value)
void set (const SocketType &input, const float2 value)
void set (const SocketType &input, const float3 value)
void set (const SocketType &input, const char *value)
void set (const SocketType &input, ustring value)
void set (const SocketType &input, const Transform &value)
void set (const SocketType &input, Node *value)
template<class ValueType, std::enable_if_t< std::is_enum_v< ValueType >, bool > = true>
void set (const SocketType &input, const ValueType &value)
void set (const SocketType &input, array< bool > &value)
void set (const SocketType &input, array< int > &value)
void set (const SocketType &input, array< float > &value)
void set (const SocketType &input, array< float2 > &value)
void set (const SocketType &input, array< float3 > &value)
void set (const SocketType &input, array< ustring > &value)
void set (const SocketType &input, array< Transform > &value)
void set (const SocketType &input, array< Node * > &value)
bool get_bool (const SocketType &input) const
int get_int (const SocketType &input) const
uint get_uint (const SocketType &input) const
uint64_t get_uint64 (const SocketType &input) const
float get_float (const SocketType &input) const
float2 get_float2 (const SocketType &input) const
float3 get_float3 (const SocketType &input) const
ustring get_string (const SocketType &input) const
Transform get_transform (const SocketType &input) const
Nodeget_node (const SocketType &input) const
const array< bool > & get_bool_array (const SocketType &input) const
const array< int > & get_int_array (const SocketType &input) const
const array< float > & get_float_array (const SocketType &input) const
const array< float2 > & get_float2_array (const SocketType &input) const
const array< float3 > & get_float3_array (const SocketType &input) const
const array< ustring > & get_string_array (const SocketType &input) const
const array< Transform > & get_transform_array (const SocketType &input) const
const array< Node * > & get_node_array (const SocketType &input) const
bool has_default_value (const SocketType &input) const
void set_default_value (const SocketType &input)
bool equals_value (const Node &other, const SocketType &socket) const
void copy_value (const SocketType &socket, const Node &other, const SocketType &other_socket)
void set_value (const SocketType &socket, const Node &other, const SocketType &other_socket)
bool equals (const Node &other) const
void hash (MD5Hash &md5)
size_t get_total_size_in_bytes () const
bool is_a (const NodeType *type)
bool socket_is_modified (const SocketType &input) const
bool is_modified () const
void tag_modified ()
void clear_modified ()
void print_modified_sockets () const
const NodeOwnerget_owner () const
void set_owner (const NodeOwner *owner_)
int reference_count () const
void reference ()
void dereference ()
void clear_reference_count ()

Public Attributes

ustring name
const NodeTypetype
InternalNode internal
LeafNode leaf

Protected Member Functions

template<typename T>
void set_if_different (const SocketType &input, T value)
void set_if_different (const SocketType &input, Node *value)
template<typename T>
void set_if_different (const SocketType &input, array< T > &value)
void set_if_different (const SocketType &input, array< Node * > &value)
void dereference_all_used_nodes ()

Static Protected Member Functions

template<typename T>
static Tget_socket_value (const Node *node, const SocketType &socket)

Protected Attributes

const NodeOwnerowner
int ref_count {0}
SocketModifiedFlags socket_modified

Detailed Description

Definition at line 90 of file graph/node.h.

Constructor & Destructor Documentation

◆ Node()

◆ ~Node()

Node::~Node ( )
pure virtual

Definition at line 36 of file graph/node.cpp.

Member Function Documentation

◆ clear_modified()

◆ clear_reference_count()

void Node::clear_reference_count ( )
inline

Definition at line 201 of file graph/node.h.

References ref_count.

Referenced by Scene::delete_node().

◆ copy_value()

◆ dereference()

void Node::dereference ( )
inline

Definition at line 193 of file graph/node.h.

References ref_count.

Referenced by dereference_all_used_nodes(), and set_if_different().

◆ dereference_all_used_nodes()

void Node::dereference_all_used_nodes ( )
protected

◆ equals()

bool Node::equals ( const Node & other) const

Definition at line 561 of file graph/node.cpp.

References assert, equals_value(), Node(), and type.

Referenced by ImageSlotTextureNode::equals().

◆ equals_value()

◆ get_bool()

bool Node::get_bool ( const SocketType & input) const

◆ get_bool_array()

const array< bool > & Node::get_bool_array ( const SocketType & input) const

Definition at line 250 of file graph/node.cpp.

References assert, SocketType::BOOLEAN_ARRAY, get_socket_value(), and input.

Referenced by GetNodeValue().

◆ get_float()

◆ get_float2()

float2 Node::get_float2 ( const SocketType & input) const

Definition at line 211 of file graph/node.cpp.

References assert, get_socket_value(), input, and SocketType::POINT2.

Referenced by GetNodeValue().

◆ get_float2_array()

const array< float2 > & Node::get_float2_array ( const SocketType & input) const

Definition at line 268 of file graph/node.cpp.

References assert, get_socket_value(), input, and SocketType::POINT2_ARRAY.

Referenced by GetNodeValue().

◆ get_float3()

float3 Node::get_float3 ( const SocketType & input) const

◆ get_float3_array()

const array< float3 > & Node::get_float3_array ( const SocketType & input) const

Definition at line 274 of file graph/node.cpp.

References assert, get_socket_value(), input, and is_socket_array_float3().

Referenced by GetNodeValue().

◆ get_float_array()

const array< float > & Node::get_float_array ( const SocketType & input) const

Definition at line 262 of file graph/node.cpp.

References assert, SocketType::FLOAT_ARRAY, get_socket_value(), and input.

Referenced by GetNodeValue().

◆ get_int()

int Node::get_int ( const SocketType & input) const

◆ get_int_array()

const array< int > & Node::get_int_array ( const SocketType & input) const

Definition at line 256 of file graph/node.cpp.

References assert, get_socket_value(), input, and SocketType::INT_ARRAY.

Referenced by GetNodeValue().

◆ get_node()

Node * Node::get_node ( const SocketType & input) const

Definition at line 243 of file graph/node.cpp.

References assert, get_socket_value(), input, SocketType::NODE, and Node().

◆ get_node_array()

const array< Node * > & Node::get_node_array ( const SocketType & input) const

Definition at line 292 of file graph/node.cpp.

References assert, get_socket_value(), input, and SocketType::NODE_ARRAY.

◆ get_owner()

◆ get_socket_value()

◆ get_string()

ustring Node::get_string ( const SocketType & input) const

◆ get_string_array()

const array< ustring > & Node::get_string_array ( const SocketType & input) const

Definition at line 280 of file graph/node.cpp.

References assert, get_socket_value(), input, and SocketType::STRING_ARRAY.

Referenced by GetNodeValue().

◆ get_total_size_in_bytes()

◆ get_transform()

Transform Node::get_transform ( const SocketType & input) const

Definition at line 237 of file graph/node.cpp.

References assert, get_socket_value(), input, and SocketType::TRANSFORM.

Referenced by GetNodeValue().

◆ get_transform_array()

const array< Transform > & Node::get_transform_array ( const SocketType & input) const

Definition at line 286 of file graph/node.cpp.

References assert, get_socket_value(), input, and SocketType::TRANSFORM_ARRAY.

Referenced by GetNodeValue().

◆ get_uint()

uint Node::get_uint ( const SocketType & input) const

Definition at line 193 of file graph/node.cpp.

References assert, get_socket_value(), input, and SocketType::UINT.

Referenced by GetNodeValue().

◆ get_uint64()

uint64_t Node::get_uint64 ( const SocketType & input) const

Definition at line 199 of file graph/node.cpp.

References assert, get_socket_value(), input, and SocketType::UINT64.

◆ has_default_value()

bool Node::has_default_value ( const SocketType & input) const

Definition at line 300 of file graph/node.cpp.

References get_socket_value(), and input.

◆ hash()

◆ is_a()

bool Node::is_a ( const NodeType * type)

Definition at line 777 of file graph/node.cpp.

References type.

Referenced by HdCyclesSession::UpdateScene().

◆ is_modified()

◆ print_modified_sockets()

void Node::print_modified_sockets ( ) const

Definition at line 900 of file graph/node.cpp.

References name, SocketType::name, printf, socket_is_modified(), and type.

◆ reference()

void Node::reference ( )
inline

Definition at line 188 of file graph/node.h.

References ref_count.

Referenced by ShaderManager::add_default(), copy_value(), and set_if_different().

◆ reference_count()

int Node::reference_count ( ) const
inline

◆ set() [1/20]

void Node::set ( const SocketType & input,
array< bool > & value )

Definition at line 132 of file graph/node.cpp.

References assert, SocketType::BOOLEAN_ARRAY, input, and set_if_different().

◆ set() [2/20]

void Node::set ( const SocketType & input,
array< float > & value )

Definition at line 144 of file graph/node.cpp.

References assert, SocketType::FLOAT_ARRAY, input, and set_if_different().

◆ set() [3/20]

void Node::set ( const SocketType & input,
array< float2 > & value )

Definition at line 150 of file graph/node.cpp.

References assert, input, SocketType::POINT2_ARRAY, and set_if_different().

◆ set() [4/20]

void Node::set ( const SocketType & input,
array< float3 > & value )

Definition at line 156 of file graph/node.cpp.

References assert, input, is_socket_array_float3(), and set_if_different().

◆ set() [5/20]

void Node::set ( const SocketType & input,
array< int > & value )

Definition at line 138 of file graph/node.cpp.

References assert, input, SocketType::INT_ARRAY, and set_if_different().

◆ set() [6/20]

void Node::set ( const SocketType & input,
array< Node * > & value )

Definition at line 174 of file graph/node.cpp.

References assert, input, SocketType::NODE_ARRAY, and set_if_different().

◆ set() [7/20]

void Node::set ( const SocketType & input,
array< Transform > & value )

Definition at line 168 of file graph/node.cpp.

References assert, input, set_if_different(), and SocketType::TRANSFORM_ARRAY.

◆ set() [8/20]

void Node::set ( const SocketType & input,
array< ustring > & value )

Definition at line 162 of file graph/node.cpp.

References assert, input, set_if_different(), and SocketType::STRING_ARRAY.

◆ set() [9/20]

◆ set() [10/20]

void Node::set ( const SocketType & input,
const char * value )

Definition at line 95 of file graph/node.cpp.

References input, and set().

◆ set() [11/20]

void Node::set ( const SocketType & input,
const float value )

Definition at line 77 of file graph/node.cpp.

References assert, SocketType::FLOAT, input, and set_if_different().

◆ set() [12/20]

void Node::set ( const SocketType & input,
const float2 value )

Definition at line 83 of file graph/node.cpp.

References assert, input, SocketType::POINT2, and set_if_different().

◆ set() [13/20]

void Node::set ( const SocketType & input,
const float3 value )

Definition at line 89 of file graph/node.cpp.

References assert, input, is_socket_float3(), and set_if_different().

◆ set() [14/20]

void Node::set ( const SocketType & input,
const int value )

Definition at line 59 of file graph/node.cpp.

References assert, SocketType::ENUM, input, SocketType::INT, and set_if_different().

◆ set() [15/20]

void Node::set ( const SocketType & input,
const Transform & value )

Definition at line 119 of file graph/node.cpp.

References assert, input, set_if_different(), and SocketType::TRANSFORM.

◆ set() [16/20]

void Node::set ( const SocketType & input,
const uint value )

Definition at line 65 of file graph/node.cpp.

References assert, input, set_if_different(), and SocketType::UINT.

◆ set() [17/20]

void Node::set ( const SocketType & input,
const uint64_t value )

Definition at line 71 of file graph/node.cpp.

References assert, input, set_if_different(), and SocketType::UINT64.

◆ set() [18/20]

template<class ValueType, std::enable_if_t< std::is_enum_v< ValueType >, bool > = true>
void Node::set ( const SocketType & input,
const ValueType & value )
inline

Definition at line 110 of file graph/node.h.

References input, and set().

◆ set() [19/20]

void Node::set ( const SocketType & input,
Node * value )

Definition at line 125 of file graph/node.cpp.

References assert, input, SocketType::NODE, Node(), and set_if_different().

◆ set() [20/20]

void Node::set ( const SocketType & input,
ustring value )

◆ set_default_value()

void Node::set_default_value ( const SocketType & input)

Definition at line 307 of file graph/node.cpp.

References input.

Referenced by Node().

◆ set_if_different() [1/4]

void Node::set_if_different ( const SocketType & input,
array< Node * > & value )
protected

Definition at line 879 of file graph/node.cpp.

References get_socket_value(), input, Node(), socket_is_modified(), and socket_modified.

◆ set_if_different() [2/4]

template<typename T>
void Node::set_if_different ( const SocketType & input,
array< T > & value )
protected

Definition at line 867 of file graph/node.cpp.

References get_socket_value(), input, socket_is_modified(), and socket_modified.

◆ set_if_different() [3/4]

void Node::set_if_different ( const SocketType & input,
Node * value )
protected

Definition at line 848 of file graph/node.cpp.

References dereference(), get_socket_value(), input, Node(), reference(), and socket_modified.

◆ set_if_different() [4/4]

template<typename T>
void Node::set_if_different ( const SocketType & input,
T value )
protected

Definition at line 838 of file graph/node.cpp.

References get_socket_value(), input, socket_modified, and T.

Referenced by set(), set(), set(), set(), set(), set(), set(), set(), set(), set(), set(), set(), set(), set(), set(), set(), set(), and set().

◆ set_owner()

void Node::set_owner ( const NodeOwner * owner_)

Definition at line 792 of file graph/node.cpp.

References assert, and owner.

◆ set_value()

◆ socket_is_modified()

bool Node::socket_is_modified ( const SocketType & input) const

Definition at line 818 of file graph/node.cpp.

References input, and socket_modified.

Referenced by print_modified_sockets(), set_if_different(), and set_if_different().

◆ tag_modified()

Member Data Documentation

◆ internal

InternalNode Node::internal

Definition at line 163 of file dualcon/intern/octree.h.

◆ leaf

LeafNode Node::leaf

Definition at line 164 of file dualcon/intern/octree.h.

◆ name

ustring Node::name

Definition at line 177 of file graph/node.h.

Referenced by ShaderManager::add_default(), OSLNode::add_input(), add_node(), OSLNode::add_output(), Geometry::apply_transform(), ConstantFolder::bypass(), check_valid_camera_multiview(), RenderStats::collect_profiling(), GeometryManager::collect_statistics(), CurvesNode::compile(), Geometry::compute_bvh(), ShaderGraph::connect(), copy_particle_systems_to_object(), GeometryManager::create_volume_mesh(), ShaderManager::device_update_common(), ObjectManager::device_update_object_transform(), SVMShaderManager::device_update_shader(), ShaderNode::disconnect_unused_input(), GeometryManager::displace(), ED_armature_bone_rename(), Pass::find(), BufferParams::find_pass(), Film::get_aov_offset(), ShaderManager::get_cryptomatte_materials(), ObjectManager::get_cryptomatte_objects(), PrincipledBsdfNode::has_nonzero_weight(), ShaderNode::input(), ShaderNode::input(), Geometry::need_attribute(), Node(), ShaderNode::output(), ShaderNode::output(), override_idtemplate_clear_exec(), blender::draw::pointcloud_sub_pass_setup_implementation(), print_modified_sockets(), ShaderNode::ShaderNode(), OutputAOVNode::simplify_settings(), BlenderSync::sync_view_layer(), template_id_liboverride_hierarchy_collections_tag_recursive(), update_depsgraph(), GeometryManager::update_osl_globals(), Hair::update_shadow_transparency(), blender::ed::object::vgroup_sort_bone_hierarchy(), blender::draw::volume_object_grids_init(), xml_read_state(), BufferParams::~BufferParams(), and Film::~Film().

◆ owner

const NodeOwner* Node::owner
protected

Definition at line 207 of file graph/node.h.

Referenced by get_owner(), Node(), and set_owner().

◆ ref_count

int Node::ref_count {0}
protected

Definition at line 208 of file graph/node.h.

Referenced by clear_reference_count(), dereference(), reference(), and reference_count().

◆ socket_modified

◆ type


The documentation for this union was generated from the following files: