MayaFlux 0.3.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 586 of file Logic.cpp.

587{
588 add_callback(callback, target_state ? LogicEventType::TRUE : LogicEventType::FALSE);
589}
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:612
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: