| 22 | } |
| 23 | |
| 24 | void 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 | |
| 40 | QColor ColorVariable::GetValue() const |
| 41 | { |
nothing calls this directly
no test coverage detected