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

Method Load

plugins/base/macro-action-scene-switch.cpp:248–268  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

246}
247
248bool MacroActionSwitchScene::Load(obs_data_t *obj)
249{
250 MacroAction::Load(obj);
251 _action = static_cast<Action>(obs_data_get_int(obj, "action"));
252 if (obs_data_has_user_value(obj, "canvas")) {
253 _canvas =
254 GetWeakCanvasByName(obs_data_get_string(obj, "canvas"));
255 } else {
256 OBSCanvasAutoRelease main = obs_get_main_canvas();
257 _canvas = obs_canvas_get_weak_canvas(main);
258 }
259
260 _index.Save(obj, "index");
261 _scene.Load(obj);
262 _transition.Load(obj);
263 _duration.Load(obj);
264 _blockUntilTransitionDone =
265 obs_data_get_bool(obj, "blockUntilTransitionDone");
266 _sceneType = static_cast<SceneType>(obs_data_get_int(obj, "sceneType"));
267 return true;
268}
269
270std::string MacroActionSwitchScene::GetShortDesc() const
271{

Callers

nothing calls this directly

Calls 4

GetWeakCanvasByNameFunction · 0.85
obs_get_main_canvasFunction · 0.85
SaveMethod · 0.45

Tested by

no test coverage detected