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

Method Load

plugins/base/macro-action-screenshot.cpp:125–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123}
124
125bool MacroActionScreenshot::Load(obs_data_t *obj)
126{
127 MacroAction::Load(obj);
128 _scene.Load(obj);
129 _source.Load(obj);
130 _saveType = static_cast<SaveType>(obs_data_get_int(obj, "saveType"));
131 _targetType =
132 static_cast<TargetType>(obs_data_get_int(obj, "targetType"));
133 _path.Load(obj, "savePath");
134 _variable = GetWeakVariableByName(obs_data_get_string(obj, "variable"));
135
136 // TODO: Remove fallback for older versions
137 if (!obs_data_has_user_value(obj, "version")) {
138 if (!_source.GetSource() && !_scene.GetScene(false)) {
139 _targetType = TargetType::MAIN_OUTPUT;
140 }
141 }
142 return true;
143}
144
145std::string MacroActionScreenshot::GetShortDesc() const
146{

Callers 1

CopyMethod · 0.45

Calls 3

GetWeakVariableByNameFunction · 0.85
GetSceneMethod · 0.80
GetSourceMethod · 0.45

Tested by

no test coverage detected