Blender V5.0
SocketType Struct Reference

#include <node_type.h>

Public Types

enum  Type {
  UNDEFINED = 0 , BOOLEAN , FLOAT , INT ,
  UINT , UINT64 , COLOR , VECTOR ,
  POINT , NORMAL , POINT2 , CLOSURE ,
  STRING , ENUM , TRANSFORM , NODE ,
  BOOLEAN_ARRAY , FLOAT_ARRAY , INT_ARRAY , COLOR_ARRAY ,
  VECTOR_ARRAY , POINT_ARRAY , NORMAL_ARRAY , POINT2_ARRAY ,
  STRING_ARRAY , TRANSFORM_ARRAY , NODE_ARRAY , NUM_TYPES
}
enum  Flags {
  LINKABLE = (1 << 0) , ANIMATABLE = (1 << 1) , SVM_INTERNAL = (1 << 2) , OSL_INTERNAL = (1 << 3) ,
  INTERNAL = (1 << 2) | (1 << 3) , LINK_TEXTURE_GENERATED = (1 << 4) , LINK_TEXTURE_NORMAL = (1 << 5) , LINK_TEXTURE_UV = (1 << 6) ,
  LINK_TEXTURE_INCOMING = (1 << 7) , LINK_INCOMING = (1 << 8) , LINK_NORMAL = (1 << 9) , LINK_POSITION = (1 << 10) ,
  LINK_TANGENT = (1 << 11) , LINK_OSL_INITIALIZER = (1 << 12) , DEFAULT_LINK_MASK
}

Public Member Functions

size_t storage_size () const
size_t packed_size () const
bool is_array () const

Static Public Member Functions

static size_t size (Type type, bool packed)
static size_t max_size ()
static ustring type_name (Type type)
static void * zero_default_value ()
static bool is_float3 (Type type)

Public Attributes

ustring name
Type type
int struct_offset
const void * default_value
const NodeEnumenum_values
const NodeTypenode_type
int flags
ustring ui_name
SocketModifiedFlags modified_flag_bit

Detailed Description

Definition at line 25 of file node_type.h.

Member Enumeration Documentation

◆ Flags

Enumerator
LINKABLE 
ANIMATABLE 
SVM_INTERNAL 
OSL_INTERNAL 
INTERNAL 
LINK_TEXTURE_GENERATED 
LINK_TEXTURE_NORMAL 
LINK_TEXTURE_UV 
LINK_TEXTURE_INCOMING 
LINK_INCOMING 
LINK_NORMAL 
LINK_POSITION 
LINK_TANGENT 
LINK_OSL_INITIALIZER 
DEFAULT_LINK_MASK 

Definition at line 60 of file node_type.h.

◆ Type

Enumerator
UNDEFINED 
BOOLEAN 
FLOAT 
INT 
UINT 
UINT64 
COLOR 
VECTOR 
POINT 
NORMAL 
POINT2 
CLOSURE 
STRING 
ENUM 
TRANSFORM 
NODE 
BOOLEAN_ARRAY 
FLOAT_ARRAY 
INT_ARRAY 
COLOR_ARRAY 
VECTOR_ARRAY 
POINT_ARRAY 
NORMAL_ARRAY 
POINT2_ARRAY 
STRING_ARRAY 
TRANSFORM_ARRAY 
NODE_ARRAY 
NUM_TYPES 

Definition at line 26 of file node_type.h.

Member Function Documentation

◆ is_array()

bool SocketType::is_array ( ) const

Definition at line 25 of file node_type.cpp.

References BOOLEAN_ARRAY, and type.

Referenced by Node::copy_value(), and Node::set_value().

◆ is_float3()

◆ max_size()

size_t SocketType::max_size ( )
static

Definition at line 93 of file node_type.cpp.

Referenced by OSLNode::create(), and OSLNode::input_default_value().

◆ packed_size()

size_t SocketType::packed_size ( ) const

Definition at line 20 of file node_type.cpp.

References size(), and type.

◆ size()

◆ storage_size()

CCL_NAMESPACE_BEGIN size_t SocketType::storage_size ( ) const

Definition at line 15 of file node_type.cpp.

References size(), and type.

Referenced by Node::copy_value(), and Node::get_total_size_in_bytes().

◆ type_name()

ustring SocketType::type_name ( Type type)
static

Definition at line 104 of file node_type.cpp.

References NUM_TYPES, and type.

◆ zero_default_value()

void * SocketType::zero_default_value ( )
static

Definition at line 98 of file node_type.cpp.

References transform_zero().

Member Data Documentation

◆ default_value

const void* SocketType::default_value

Definition at line 84 of file node_type.h.

Referenced by NodeType::register_input(), and NodeType::register_output().

◆ enum_values

◆ flags

◆ modified_flag_bit

SocketModifiedFlags SocketType::modified_flag_bit

Definition at line 89 of file node_type.h.

Referenced by NodeType::register_input().

◆ name

◆ node_type

const NodeType* SocketType::node_type

Definition at line 86 of file node_type.h.

Referenced by NodeType::register_input(), and NodeType::register_output().

◆ struct_offset

◆ type

◆ ui_name

ustring SocketType::ui_name

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