isInit() will also work on a concrete ofParameter<T>, as well as ofParameterGroup (recursively calling isInit() on itself and returning true only if all the children are true).
note that isInit() is not linked to activity but current instantaneous value (if true, a parameter could have changed in the past, but is by some means back to it's init value). see didNotify() to check for "activity" (which will return true even if it's to go back to it's initial value).
following the discussion in https://forum.openframeworks.cc/t/can-i-tell-if-an-ofabstractparameter-is-set-to-its-default-value/ this builds on the recent 'init' mechanism of ofParameter and adds the ability to verify if the value is at it's initial value or not, without the need to "unwrap" (cast) the internal data type of the abstract parameter at the call site.
isInit()
will also work on a concreteofParameter<T>
, as well asofParameterGroup
(recursively callingisInit()
on itself and returning true only if all the children are true).note that
isInit()
is not linked to activity but current instantaneous value (if true, a parameter could have changed in the past, but is by some means back to it's init value). seedidNotify()
to check for "activity" (which will return true even if it's to go back to it's initial value).