Programmatically created groups UI not updating

KlayKree

New Member
Im creating a group and adding an image source to it like so:

C:
obs_source_t* groupSource = obs_source_create("group", "group test", NULL, NULL);
obs_sceneitem_t* groupItem = obs_scene_add(scene, groupSource);

obs_source_t* imageSource = obs_source_create("image_source", "image source test", settings, NULL);
obs_sceneitem_t* imageItem = obs_scene_add(scene, imageSource);

obs_sceneitem_group_add_item(groupItem, imageItem);

The group and image source get added to the scene but the UI doesn't show the image source as a child of the group until the '>' is clicked.

I was wondering if there is something Im doing wrong here, or some kind of "force UI update" I could use to have it show up as a child without needing to click the '>' group expander/contracter.
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
I think it's not watching for any signals related to this, instead relying on UI actions to explicitly determine whether to update. I'll see if I can fix this next update (can't 100% promise though)
 

KlayKree

New Member
I realised this only occurs in the create function in a module, when I moved my code to the activate function it will add the source to the group as expected.
 
Top