Blender V4.3
blender::fn::lazy_function::NodeState Struct Reference

Public Attributes

std::mutex mutex
 
InputStateinputs
 
OutputStateoutputs
 
int missing_required_inputs = 0
 
bool node_has_finished = false
 
bool always_used_inputs_requested = false
 
bool storage_and_defaults_initialized = false
 
bool has_side_effects = false
 
bool enabled_multi_threading = false
 
NodeScheduleState schedule_state = NodeScheduleState::NotScheduled
 
void * storage = nullptr
 

Detailed Description

Definition at line 133 of file lazy_function_graph_executor.cc.

Member Data Documentation

◆ always_used_inputs_requested

bool blender::fn::lazy_function::NodeState::always_used_inputs_requested = false

Set to true once the always required inputs have been requested. This happens the first time the node is run.

Definition at line 162 of file lazy_function_graph_executor.cc.

◆ enabled_multi_threading

bool blender::fn::lazy_function::NodeState::enabled_multi_threading = false

Whether this node has enabled multi-threading. If this is true, the node is allowed to call methods on #Params from multiple threads.

Definition at line 177 of file lazy_function_graph_executor.cc.

◆ has_side_effects

bool blender::fn::lazy_function::NodeState::has_side_effects = false

Nodes with side effects should always be executed when their required inputs have been computed.

Definition at line 172 of file lazy_function_graph_executor.cc.

Referenced by blender::fn::lazy_function::Executor::execute().

◆ inputs

InputState* blender::fn::lazy_function::NodeState::inputs

States of the individual input and output sockets. One can index into these arrays without locking. However, to access data inside, a lock is needed unless noted otherwise. Those are not stored as #Span to reduce memory usage. The number of inputs and outputs is stored on the node already.

Definition at line 145 of file lazy_function_graph_executor.cc.

◆ missing_required_inputs

int blender::fn::lazy_function::NodeState::missing_required_inputs = 0

Counts the number of inputs that still have to be provided to this node, until it should run again. This is used as an optimization so that nodes are not scheduled unnecessarily in many cases.

Definition at line 152 of file lazy_function_graph_executor.cc.

◆ mutex

std::mutex blender::fn::lazy_function::NodeState::mutex
mutable

Needs to be locked when any data in this state is accessed that is not explicitly marked as not needing the lock.

Definition at line 138 of file lazy_function_graph_executor.cc.

◆ node_has_finished

bool blender::fn::lazy_function::NodeState::node_has_finished = false

Is set to true once the node is done with its work, i.e. when all outputs that may be used have been computed.

Definition at line 157 of file lazy_function_graph_executor.cc.

◆ outputs

OutputState* blender::fn::lazy_function::NodeState::outputs

Definition at line 146 of file lazy_function_graph_executor.cc.

◆ schedule_state

NodeScheduleState blender::fn::lazy_function::NodeState::schedule_state = NodeScheduleState::NotScheduled

A node is always in one specific schedule state. This helps to ensure that the same node does not run twice at the same time accidentally.

Definition at line 182 of file lazy_function_graph_executor.cc.

◆ storage

void* blender::fn::lazy_function::NodeState::storage = nullptr

Custom storage of the node.

Definition at line 186 of file lazy_function_graph_executor.cc.

◆ storage_and_defaults_initialized

bool blender::fn::lazy_function::NodeState::storage_and_defaults_initialized = false

Set to true when the storage and defaults have been initialized. This happens the first time the node function is executed.

Definition at line 167 of file lazy_function_graph_executor.cc.


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