mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-07-13 08:44:29 -04:00
libobs: Remove group_sceneitem from obs_scene struct
(This commit also modifies UI) Removes obs_scene::group_sceneitem and replaces it with obs_scene::is_group. Changes a number of other functions related to groups so that a group is not inherently tied to a specific scene, and helps allow a single group to be referenced in multiple scenes if desired.
This commit is contained in:
@@ -420,7 +420,7 @@ void OBSBasicPreview::GetStretchHandleData(const vec2 &pos)
|
||||
cropSize.y = float(obs_source_get_height(source) -
|
||||
startCrop.top - startCrop.bottom);
|
||||
|
||||
stretchGroup = obs_sceneitem_get_group(stretchItem);
|
||||
stretchGroup = obs_sceneitem_get_group(scene, stretchItem);
|
||||
if (stretchGroup) {
|
||||
obs_sceneitem_get_draw_transform(stretchGroup,
|
||||
&invGroupTransform);
|
||||
@@ -1135,8 +1135,11 @@ void OBSBasicPreview::mouseMoveEvent(QMouseEvent *event)
|
||||
pos.y = std::round(pos.y);
|
||||
|
||||
if (stretchHandle != ItemHandle::None) {
|
||||
OBSBasic *main = reinterpret_cast<OBSBasic*>(
|
||||
App()->GetMainWindow());
|
||||
OBSScene scene = main->GetCurrentScene();
|
||||
obs_sceneitem_t *group = obs_sceneitem_get_group(
|
||||
stretchItem);
|
||||
scene, stretchItem);
|
||||
if (group) {
|
||||
vec3 group_pos;
|
||||
vec3_set(&group_pos, pos.x, pos.y, 0.0f);
|
||||
|
||||
Reference in New Issue
Block a user