Blender V5.0
blender::nodes::value_elem Namespace Reference

Classes

struct  PrimitiveValueElem
struct  BoolElem
struct  FloatElem
struct  IntElem
struct  VectorElem
struct  RotationElem
struct  MatrixElem
struct  ElemVariant
struct  SocketElem
struct  GroupInputElem
struct  ValueNodeElem
class  ElemEvalParams
class  InverseElemEvalParams

Functions

std::optional< ElemVariantget_elem_variant_for_socket_type (const eNodeSocketDatatype type)
std::optional< ElemVariantconvert_socket_elem (const bNodeSocket &old_socket, const bNodeSocket &new_socket, const ElemVariant &old_elem)

Detailed Description

A #ValueElem is an abstract element or part of a value. It does not store the actual value of the type but which parts of it are affected. For example, VectorElem does not store the actual vector values but just a boolean for each component.

Some nodes implement special #node_eval_elem and #node_eval_inverse_elem methods which allow analyzing the potential impact of changing part of a value in one place of a node tree.

The types are generally quite small and trivially copyable and destructible. They just contain some booleans.

Function Documentation

◆ convert_socket_elem()

◆ get_elem_variant_for_socket_type()

std::optional< ElemVariant > blender::nodes::value_elem::get_elem_variant_for_socket_type ( eNodeSocketDatatype type)

Get the default value element for the given socket type if it exists.

Definition at line 9 of file value_elem.cc.

References SOCK_BOOLEAN, SOCK_FLOAT, SOCK_INT, SOCK_MATRIX, SOCK_ROTATION, and SOCK_VECTOR.

Referenced by convert_socket_elem(), and blender::nodes::inverse_eval::find_local_inverse_eval_targets().