MayaFlux 0.2.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ on_change_to()

void MayaFlux::Nodes::Generator::Logic::on_change_to ( bool  target_state,
const NodeHook callback 
)

Registers a callback for when output changes to a specific state.

Parameters
target_stateThe state to detect (true for 1.0, false for 0.0)
callbackFunction to call when state changes to target_state

Definition at line 584 of file Logic.cpp.

585{
586 add_callback(callback, target_state ? LogicEventType::TRUE : LogicEventType::FALSE);
587}
void add_callback(const NodeHook &callback, LogicEventType type, const std::optional< NodeCondition > &condition=std::nullopt)
Adds a callback to the list of all callbacks.
Definition Logic.hpp:598
LogicEventType
Events that can trigger callbacks.
Definition Logic.hpp:50

References add_callback(), MayaFlux::Nodes::Generator::FALSE, and MayaFlux::Nodes::Generator::TRUE.

+ Here is the call graph for this function: