Events: Complete SceneItemTransformChanged

This commit is contained in:
tt2468 2021-09-03 15:58:50 -07:00
parent 3d2fb65357
commit c43d829845

View File

@ -102,6 +102,17 @@ void EventHandler::HandleSceneItemTransformChanged(void *param, calldata_t *data
{
auto eventHandler = reinterpret_cast<EventHandler*>(param);
obs_scene_t *scene = GetCalldataPointer<obs_scene_t>(data, "scene");
if (!scene)
return;
obs_sceneitem_t *sceneItem = GetCalldataPointer<obs_sceneitem_t>(data, "item");
if (!sceneItem)
return;
json eventData;
eventData["sceneName"] = obs_source_get_name(obs_scene_get_source(scene));
eventData["sceneItemId"] = obs_sceneitem_get_id(sceneItem);
eventData["sceneItemTransform"] = Utils::Obs::DataHelper::GetSceneItemTransform(sceneItem);
eventHandler->_webSocketServer->BroadcastEvent(EventSubscription::SceneItems, "SceneItemTransformChanged", eventData);
}