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

Function getSceneItemPosition

plugins/base/macro-action-scene-order.cpp:100–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98}
99
100static std::optional<int> getSceneItemPosition(const OBSSceneItem &item,
101 const SceneSelection &scene)
102{
103 auto sceneSource = OBSGetStrongRef(scene.GetScene());
104 auto obsScene = obs_scene_from_source(sceneSource);
105 PositionData data{item};
106 obs_scene_enum_items(obsScene, getSceneItemPositionHelper, &data);
107
108 if (!data.found) {
109 return {};
110 }
111
112 return data.position;
113}
114
115static void moveItemFromToHelper(MacroActionSceneOrder::Action action,
116 const OBSSceneItem &itemToMove,

Callers 1

moveItemToItemHelperFunction · 0.85

Calls 2

OBSGetStrongRefFunction · 0.85
GetSceneMethod · 0.80

Tested by

no test coverage detected