MCPcopy Create free account
hub / github.com/WarmUpTill/SceneSwitcher / Load

Method Load

plugins/base/macro-action-wait.cpp:190–212  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

188}
189
190bool MacroActionWait::Load(obs_data_t *obj)
191{
192 MacroAction::Load(obj);
193 _waitType = static_cast<Type>(obs_data_get_int(obj, "waitType"));
194 // TODO: remove this fallback
195 if (obs_data_get_int(obj, "version") == 1) {
196 _duration2.Load(obj, "duration2");
197 } else {
198 _duration2.Load(obj, "seconds2");
199 _duration2.SetUnit(static_cast<Duration::Unit>(
200 obs_data_get_int(obj, "displayUnit2")));
201 }
202 _duration.Load(obj);
203 _variable =
204 GetWeakVariableByName(obs_data_get_string(obj, "variableName"));
205 _condition = static_cast<Condition>(obs_data_get_int(obj, "condition"));
206 _strValue.Load(obj, "strValue");
207 _numValue.Load(obj, "numValue");
208 _regex.Load(obj);
209 _useTimeout = obs_data_get_bool(obj, "useTimeout");
210 _conditionTimeout.Load(obj, "conditionTimeout");
211 return true;
212}
213
214std::string MacroActionWait::GetShortDesc() const
215{

Callers

nothing calls this directly

Calls 2

GetWeakVariableByNameFunction · 0.85
SetUnitMethod · 0.80

Tested by

no test coverage detected