MayaFlux 0.4.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 TypedHook< LogicContext > &  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 588 of file Logic.cpp.

589{
590 add_callback(callback, target_state ? LogicEventType::TRUE : LogicEventType::FALSE);
591}
void add_callback(const TypedHook< LogicContext > &callback, LogicEventType type, const std::optional< NodeCondition > &condition=std::nullopt)
Adds a callback to the list of all callbacks.
Definition Logic.hpp:624
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: