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

Method load

lib/legacy/switch-generic.cpp:108–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106}
107
108void SceneSwitcherEntry::load(obs_data_t *obj, const char *targetTypeLoadName,
109 const char *targetLoadName,
110 const char *transitionLoadName)
111{
112 targetType = static_cast<SwitchTargetType>(
113 obs_data_get_int(obj, targetTypeLoadName));
114
115 const char *targetName = obs_data_get_string(obj, targetLoadName);
116
117 if (targetType == SwitchTargetType::Scene) {
118 usePreviousScene = strcmp(targetName, previous_scene_name) == 0;
119 if (!usePreviousScene) {
120 scene = GetWeakSourceByName(targetName);
121 }
122 } else if (targetType == SwitchTargetType::SceneGroup) {
123 group = GetSceneGroupByName(targetName);
124 }
125
126 usePreviousScene = strcmp(targetName, previous_scene_name) == 0;
127
128 const char *transitionName =
129 obs_data_get_string(obj, transitionLoadName);
130 transition = GetWeakTransitionByName(transitionName);
131
132 useCurrentTransition =
133 strcmp(transitionName, current_transition_name) == 0;
134}
135
136void SwitchWidget::SceneGroupAdd(const QString &name)
137{

Callers

nothing calls this directly

Calls 3

GetWeakSourceByNameFunction · 0.85
GetSceneGroupByNameFunction · 0.85
GetWeakTransitionByNameFunction · 0.85

Tested by

no test coverage detected