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

Method Load

lib/variables/variable-color.cpp:24–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22}
23
24void ColorVariable::Load(obs_data_t *obj, const char *name)
25{
26 OBSDataAutoRelease data = obs_data_get_obj(obj, name);
27 _value.setRed(obs_data_get_int(data, "red"));
28 _value.setGreen(obs_data_get_int(data, "green"));
29 _value.setBlue(obs_data_get_int(data, "blue"));
30 if (!obs_data_has_user_value(data, "version")) {
31 // Old format: no variable support, just R/G/B
32 _type = Type::FIXED_VALUE;
33 return;
34 }
35 auto variableName = obs_data_get_string(data, "variable");
36 _variable = GetWeakVariableByName(variableName);
37 _type = static_cast<Type>(obs_data_get_int(data, "type"));
38}
39
40QColor ColorVariable::GetValue() const
41{

Callers

nothing calls this directly

Calls 1

GetWeakVariableByNameFunction · 0.85

Tested by

no test coverage detected