Blender V5.0
blender::bke::bNodeRuntime Class Reference

#include <BKE_node_runtime.hh>

Inherits blender::NonCopyable, and blender::NonMovable.

Public Attributes

nodes::NodeDeclarationdeclaration = nullptr
uint32_t changed_flag = 0
uint8_t need_exec = 0
bNodeoriginal = nullptr
rctf draw_bounds {}
short tmp_flag = 0
char iter_flag = 0
int update = 0
float anim_ofsx
Vector< bNodeLinkinternal_links
int index_in_tree = -1
bool forward_compatible_versioning_done = false
bool is_dangling_reroute = false
Vector< bNodeSocket * > inputs
Vector< bNodeSocket * > outputs
Map< StringRefNull, bNodeSocket * > inputs_by_identifier
Map< StringRefNull, bNodeSocket * > outputs_by_identifier
bool has_available_linked_inputs = false
bool has_available_linked_outputs = false
Vector< bNode * > direct_children_in_frame
bNodeTreeowner_tree = nullptr
int toposort_left_to_right_index = -1
int toposort_right_to_left_index = -1
Array< bNodePanelRuntimepanels

Detailed Description

Run-time data for every node. This should only contain data that is somewhat persistent (i.e. data that lives longer than a single depsgraph evaluation + redraw). Data that's only used in smaller scopes should generally be stored in separate arrays and/or maps.

Definition at line 344 of file BKE_node_runtime.hh.

Member Data Documentation

◆ anim_ofsx

float blender::bke::bNodeRuntime::anim_ofsx

Offset that will be added to #bNode::locx for insert offset animation.

Definition at line 388 of file BKE_node_runtime.hh.

◆ changed_flag

uint32_t blender::bke::bNodeRuntime::changed_flag = 0

eNodeTreeChangedFlag.

Definition at line 367 of file BKE_node_runtime.hh.

◆ declaration

nodes::NodeDeclaration* blender::bke::bNodeRuntime::declaration = nullptr

Describes the desired interface of the node. This is run-time data only. The actual interface of the node may deviate from the declaration temporarily. It's possible to sync the actual state of the node to the desired state. Currently, this is only done when a node is created or loaded.

In the future, we may want to keep more data only in the declaration, so that it does not have to be synced to other places that are stored in files. That especially applies to data that can't be edited by users directly (e.g. min/max values of sockets, tooltips, ...).

The declaration of a node can be recreated at any time when it is used. Caching it here is just a bit more efficient when it is used a lot. To make sure that the cache is up-to-date, call node_declaration_ensure before using it.

Currently, the declaration is the same for every node of the same type. Going forward, that is intended to change though. Especially when nodes become more dynamic with respect to how many sockets they have.

Definition at line 364 of file BKE_node_runtime.hh.

◆ direct_children_in_frame

Vector<bNode *> blender::bke::bNodeRuntime::direct_children_in_frame

Definition at line 412 of file BKE_node_runtime.hh.

◆ draw_bounds

rctf blender::bke::bNodeRuntime::draw_bounds {}

Calculated bounding box of node in the view space of the node editor (including UI scale).

Definition at line 376 of file BKE_node_runtime.hh.

◆ forward_compatible_versioning_done

bool blender::bke::bNodeRuntime::forward_compatible_versioning_done = false

Used to avoid running forward compatibility code more often than necessary.

Definition at line 397 of file BKE_node_runtime.hh.

◆ has_available_linked_inputs

bool blender::bke::bNodeRuntime::has_available_linked_inputs = false

Definition at line 410 of file BKE_node_runtime.hh.

◆ has_available_linked_outputs

bool blender::bke::bNodeRuntime::has_available_linked_outputs = false

Definition at line 411 of file BKE_node_runtime.hh.

◆ index_in_tree

int blender::bke::bNodeRuntime::index_in_tree = -1

Eagerly maintained cache of the node's index in the tree.

Definition at line 394 of file BKE_node_runtime.hh.

◆ inputs

Vector<bNodeSocket *> blender::bke::bNodeRuntime::inputs

◆ inputs_by_identifier

Map<StringRefNull, bNodeSocket *> blender::bke::bNodeRuntime::inputs_by_identifier

Definition at line 408 of file BKE_node_runtime.hh.

◆ internal_links

Vector<bNodeLink> blender::bke::bNodeRuntime::internal_links

List of cached internal links (input to output), for muted nodes and operators.

Definition at line 391 of file BKE_node_runtime.hh.

◆ is_dangling_reroute

bool blender::bke::bNodeRuntime::is_dangling_reroute = false

If this node is reroute and this reroute is not logically linked with any source except other reroute, this will be true.

Definition at line 403 of file BKE_node_runtime.hh.

Referenced by blender::bke::node_tree_runtime::update_dangling_reroute_nodes().

◆ iter_flag

char blender::bke::bNodeRuntime::iter_flag = 0

Used at runtime when iterating over node branches.

Definition at line 382 of file BKE_node_runtime.hh.

◆ need_exec

uint8_t blender::bke::bNodeRuntime::need_exec = 0

Used as a boolean for execution.

Definition at line 370 of file BKE_node_runtime.hh.

◆ original

bNode* blender::bke::bNodeRuntime::original = nullptr

The original node in the tree (for localized tree).

Definition at line 373 of file BKE_node_runtime.hh.

◆ outputs

Vector<bNodeSocket *> blender::bke::bNodeRuntime::outputs

◆ outputs_by_identifier

Map<StringRefNull, bNodeSocket *> blender::bke::bNodeRuntime::outputs_by_identifier

Definition at line 409 of file BKE_node_runtime.hh.

◆ owner_tree

bNodeTree* blender::bke::bNodeRuntime::owner_tree = nullptr

Definition at line 413 of file BKE_node_runtime.hh.

◆ panels

Array<bNodePanelRuntime> blender::bke::bNodeRuntime::panels

Panel runtime state.

Definition at line 419 of file BKE_node_runtime.hh.

Referenced by blender::bke::node_tree_runtime::update_panels().

◆ tmp_flag

short blender::bke::bNodeRuntime::tmp_flag = 0

Used at runtime when going through the tree. Initialize before use.

Definition at line 379 of file BKE_node_runtime.hh.

◆ toposort_left_to_right_index

int blender::bke::bNodeRuntime::toposort_left_to_right_index = -1

Can be used to toposort a subset of nodes.

Definition at line 415 of file BKE_node_runtime.hh.

◆ toposort_right_to_left_index

int blender::bke::bNodeRuntime::toposort_right_to_left_index = -1

Definition at line 416 of file BKE_node_runtime.hh.

◆ update

int blender::bke::bNodeRuntime::update = 0

Update flags.

Definition at line 385 of file BKE_node_runtime.hh.


The documentation for this class was generated from the following file: