tinodo / obsclient

A Complete .NET Client for OBS Studio 28 and up.
MIT License
10 stars 2 forks source link

Is There a way to create group item? #11

Closed FaNim21 closed 1 month ago

FaNim21 commented 2 months ago

Hi i would like to create groups in scene via api and i can't find a way in your obsclient for that, but found that there is group functions in obs api https://docs.obsproject.com/reference-scenes#scene-item-group-functions So iam missing something in current functions to create the group or there is no option to do that?

tinodo commented 2 months ago

In OBS, Groups are Scenes and the websockets side of OBS Studio treats them as such. For example, here: GetGroupList So perhaps you can make this work using normal scenes. I just implement the methods available through the websockets interface, not the internal OBS Studio API you are referencing.

FaNim21 commented 2 months ago

Oh okay so i was looking at wrong things, but then how do i convert a scene to a group in other scene? i can't see any references to that

tinodo commented 2 months ago

You should use Nested Scenes instead of Group as per documentation: "Using groups at all in OBS is discouraged, as they are very broken under the hood. Please use nested scenes instead."

FaNim21 commented 2 months ago

Okay then i know everything now thank you and by the way iam getting timeouts on CreateScene and only using that method

System.TimeoutException: „Timeout waiting for OBS Studio response to request 6404f546-9688-4f61-b1be-26f0757aa8c6.”

tinodo commented 2 months ago

I will check into that...

tinodo commented 2 months ago

Calling CreateScene seems to work fine for me. (Using the provided sample app.)

FaNim21 commented 2 months ago

I found the issue with this. If you don't set RequestTimeout then CreateScene throws "Timeout waiting...". In sample app you have that on 5000

FaNim21 commented 2 months ago

And i found that SceneItemListReindexed on trigger in SceneItemListReindexedEventArgs gives null for inputKind, isGroup, sceneItemTransform and sourceName in all items in SceneItems