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

Method Load

lib/variables/variable.cpp:46–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44}
45
46void Variable::Load(obs_data_t *obj)
47{
48 Item::Load(obj);
49 _saveAction =
50 static_cast<SaveAction>(obs_data_get_int(obj, "saveAction"));
51 _defaultValue = obs_data_get_string(obj, "defaultValue");
52
53 if (_saveAction == SaveAction::SAVE) {
54 SetValue(obs_data_get_string(obj, "value"));
55 } else if (_saveAction == SaveAction::SET_DEFAULT) {
56 SetValue(_defaultValue);
57 }
58
59 setLastVariableChangeTime();
60}
61
62void Variable::Save(obs_data_t *obj) const
63{

Callers 2

LoadVariablesFunction · 0.45
ImportVariablesFunction · 0.45

Calls 1

Tested by

no test coverage detected