Blender  V2.93
Public Member Functions | Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
Node Union Referenceabstract

#include <node.h>

Inherited by Background, Camera, Film, Geometry, Integrator, Light, 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, int value)
 
void set (const SocketType &input, uint value)
 
void set (const SocketType &input, float value)
 
void set (const SocketType &input, float2 value)
 
void set (const SocketType &input, 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)
 
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
 
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 &input) const
 
void copy_value (const SocketType &input, const Node &other, const SocketType &other_input)
 
void set_value (const SocketType &input, const Node &other, const SocketType &other_input)
 
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 ()
 
void tag_modified ()
 
void clear_modified ()
 
void print_modified_sockets () const
 
const NodeOwnerget_owner () const
 
void set_owner (const NodeOwner *owner_)
 

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)
 
template<typename T >
void set_if_different (const SocketType &input, array< T > &value)
 

Static Protected Member Functions

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

Protected Attributes

const NodeOwnerowner
 
SocketModifiedFlags socket_modified
 

Detailed Description

Definition at line 98 of file node.h.

Constructor & Destructor Documentation

◆ Node()

Node::Node ( const NodeType type,
ustring  name = ustring() 
)
explicit

Definition at line 33 of file node.cpp.

References NodeType::inputs, name, NodeType::name, owner, set_default_value(), tag_modified(), and type.

◆ ~Node()

Node::~Node ( )
pure virtual

Definition at line 51 of file node.cpp.

Member Function Documentation

◆ clear_modified()

void Node::clear_modified ( )

Definition at line 791 of file node.cpp.

References socket_modified.

◆ copy_value()

void Node::copy_value ( const SocketType input,
const Node other,
const SocketType other_input 
)

◆ equals()

bool Node::equals ( const Node other) const

Definition at line 546 of file node.cpp.

References equals_value(), NodeType::inputs, and type.

◆ equals_value()

bool Node::equals_value ( const Node other,
const SocketType input 
) const

◆ get_bool()

bool Node::get_bool ( const SocketType input) const

Definition at line 192 of file node.cpp.

References SocketType::BOOLEAN, and SocketType::type.

◆ get_bool_array()

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

Definition at line 257 of file node.cpp.

References SocketType::BOOLEAN_ARRAY, and SocketType::type.

◆ get_float()

float Node::get_float ( const SocketType input) const

◆ get_float2()

float2 Node::get_float2 ( const SocketType input) const

Definition at line 216 of file node.cpp.

References SocketType::POINT2, and SocketType::type.

◆ get_float2_array()

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

Definition at line 275 of file node.cpp.

References SocketType::POINT2_ARRAY, and SocketType::type.

◆ 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 281 of file node.cpp.

References is_socket_array_float3().

◆ get_float_array()

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

Definition at line 269 of file node.cpp.

References SocketType::FLOAT_ARRAY, and SocketType::type.

◆ get_int()

int Node::get_int ( const SocketType input) const

Definition at line 198 of file node.cpp.

References SocketType::ENUM, SocketType::INT, and SocketType::type.

◆ get_int_array()

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

Definition at line 263 of file node.cpp.

References SocketType::INT_ARRAY, and SocketType::type.

◆ get_node()

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

Definition at line 250 of file node.cpp.

References SocketType::NODE, and SocketType::type.

◆ get_node_array()

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

Definition at line 299 of file node.cpp.

References SocketType::NODE_ARRAY, and SocketType::type.

◆ get_owner()

const NodeOwner * Node::get_owner ( ) const

Definition at line 765 of file node.cpp.

References owner.

◆ get_socket_value()

template<typename T >
static T& Node::get_socket_value ( const Node node,
const SocketType socket 
)
inlinestaticprotected

Definition at line 183 of file node.h.

References node, SocketType::struct_offset, and T.

Referenced by set_if_different(), and set_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 287 of file node.cpp.

References SocketType::STRING_ARRAY, and SocketType::type.

◆ get_total_size_in_bytes()

size_t Node::get_total_size_in_bytes ( ) const

◆ get_transform()

Transform Node::get_transform ( const SocketType input) const

Definition at line 244 of file node.cpp.

References SocketType::TRANSFORM, and SocketType::type.

◆ get_transform_array()

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

Definition at line 293 of file node.cpp.

References SocketType::TRANSFORM_ARRAY, and SocketType::type.

◆ get_uint()

uint Node::get_uint ( const SocketType input) const

Definition at line 204 of file node.cpp.

References SocketType::type, and SocketType::UINT.

◆ has_default_value()

bool Node::has_default_value ( const SocketType input) const

Definition at line 307 of file node.cpp.

References SocketType::default_value, and SocketType::size().

◆ hash()

void Node::hash ( MD5Hash md5)

◆ is_a()

bool Node::is_a ( const NodeType type)

Definition at line 755 of file node.cpp.

References NodeType::base, and type.

Referenced by xml_read_node().

◆ is_modified()

bool Node::is_modified ( )

◆ print_modified_sockets()

void Node::print_modified_sockets ( ) const

Definition at line 818 of file node.cpp.

References NodeType::inputs, name, SocketType::name, socket_is_modified(), and type.

◆ set() [1/18]

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

Definition at line 143 of file node.cpp.

References SocketType::BOOLEAN_ARRAY, set_if_different(), and SocketType::type.

◆ set() [2/18]

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

Definition at line 155 of file node.cpp.

References SocketType::FLOAT_ARRAY, set_if_different(), and SocketType::type.

◆ set() [3/18]

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

Definition at line 161 of file node.cpp.

References SocketType::POINT2_ARRAY, set_if_different(), and SocketType::type.

◆ set() [4/18]

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

Definition at line 167 of file node.cpp.

References is_socket_array_float3(), and set_if_different().

◆ set() [5/18]

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

Definition at line 149 of file node.cpp.

References SocketType::INT_ARRAY, set_if_different(), and SocketType::type.

◆ set() [6/18]

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

Definition at line 185 of file node.cpp.

References SocketType::NODE_ARRAY, set_if_different(), and SocketType::type.

◆ set() [7/18]

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

Definition at line 179 of file node.cpp.

References set_if_different(), SocketType::TRANSFORM_ARRAY, and SocketType::type.

◆ set() [8/18]

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

Definition at line 173 of file node.cpp.

References set_if_different(), SocketType::STRING_ARRAY, and SocketType::type.

◆ set() [9/18]

void Node::set ( const SocketType input,
bool  value 
)

Definition at line 70 of file node.cpp.

References SocketType::BOOLEAN, set_if_different(), and SocketType::type.

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

◆ set() [10/18]

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

Definition at line 106 of file node.cpp.

References set().

◆ set() [11/18]

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

Definition at line 130 of file node.cpp.

References set_if_different(), SocketType::TRANSFORM, and SocketType::type.

◆ set() [12/18]

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

Definition at line 88 of file node.cpp.

References SocketType::FLOAT, set_if_different(), and SocketType::type.

◆ set() [13/18]

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

Definition at line 94 of file node.cpp.

References SocketType::POINT2, set_if_different(), and SocketType::type.

◆ set() [14/18]

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

Definition at line 100 of file node.cpp.

References is_socket_float3(), and set_if_different().

◆ set() [15/18]

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

Definition at line 76 of file node.cpp.

References SocketType::ENUM, SocketType::INT, set_if_different(), and SocketType::type.

◆ set() [16/18]

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

Definition at line 136 of file node.cpp.

References SocketType::NODE, set_if_different(), and SocketType::type.

◆ set() [17/18]

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

Definition at line 82 of file node.cpp.

References set_if_different(), SocketType::type, and SocketType::UINT.

◆ set() [18/18]

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

◆ set_default_value()

void Node::set_default_value ( const SocketType input)

Definition at line 314 of file node.cpp.

References SocketType::default_value, SocketType::size(), and SocketType::struct_offset.

Referenced by Node().

◆ set_if_different() [1/2]

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

◆ set_if_different() [2/2]

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

Definition at line 796 of file node.cpp.

References SocketType::modified_flag_bit, and socket_modified.

Referenced by set().

◆ set_owner()

void Node::set_owner ( const NodeOwner owner_)

Definition at line 770 of file node.cpp.

References owner.

◆ set_value()

void Node::set_value ( const SocketType input,
const Node other,
const SocketType other_input 
)

◆ socket_is_modified()

bool Node::socket_is_modified ( const SocketType input) const

Definition at line 776 of file node.cpp.

References SocketType::modified_flag_bit, and socket_modified.

Referenced by print_modified_sockets(), and set_if_different().

◆ tag_modified()

void Node::tag_modified ( )

Member Data Documentation

◆ internal

InternalNode Node::internal

Definition at line 177 of file octree.h.

Referenced by Octree::scanConvert().

◆ leaf

LeafNode Node::leaf

Definition at line 178 of file octree.h.

◆ name

ustring Node::name

◆ owner

const NodeOwner* Node::owner
protected

Definition at line 181 of file node.h.

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

◆ socket_modified

SocketModifiedFlags Node::socket_modified
protected

◆ type

const NodeType* Node::type

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