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

Method Load

lib/macro/macro-condition-variable.cpp:143–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

141}
142
143bool MacroConditionVariable::Load(obs_data_t *obj)
144{
145 MacroCondition::Load(obj);
146 _variable =
147 GetWeakVariableByName(obs_data_get_string(obj, "variableName"));
148 _variable2 = GetWeakVariableByName(
149 obs_data_get_string(obj, "variable2Name"));
150 _strValue.Load(obj, "strValue");
151 _numValue = obs_data_get_double(obj, "numValue");
152 _type = static_cast<Condition>(obs_data_get_int(obj, "condition"));
153 _regex.Load(obj);
154 // TODO: remove in future version
155 if (obs_data_has_user_value(obj, "regex")) {
156 _regex.CreateBackwardsCompatibleRegex(
157 obs_data_get_bool(obj, "regex"));
158 }
159 return true;
160}
161
162std::string MacroConditionVariable::GetShortDesc() const
163{

Callers

nothing calls this directly

Calls 2

GetWeakVariableByNameFunction · 0.85

Tested by

no test coverage detected