tinodo / obsclient

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

SceneItemTransformChanged not triggers #8

Closed FaNim21 closed 6 months ago

FaNim21 commented 6 months ago

Hello again i found that most of the event for scene items works for me but no SceneItemTransformChanged if i manually move my scene item in scene or even when i change values in transform for that specific transform it does not trigger anything at all

Client.SceneItemTransformChanged += OnSceneItemTransformChanged;

public void OnSceneItemTransformChanged(object? parametr, SceneItemTransformChangedEventArgs args)
{
    //no breakpoints catches
}
tinodo commented 6 months ago

Most likely, you have not subscribed to the event. You can do this during the connection:

var isConnected = await client.ConnectAsync(true, "password", "localhost", 4455, EventSubscriptions.All | EventSubscriptions.SceneItemTransformChanged);

By default, we subscribe to the most common events, using EventSubscriptions.All.

FaNim21 commented 6 months ago

oh ye that worked, but its weird that i had by default all, but for SceneItemTransformChanged i need to add anyone to that all ye so it is not intuitive, but i understand why its not by default in all thank you for help

FaNim21 commented 6 months ago

@tinodo Will there be a future update to retrieve a scene item by its ID or name in the API? Do you think this is unnecessary? Also, what about having more detailed responses from the API, such as in the 'scene item transform changed' event, where it returns both the name and ID of the item instead of just the ID? Using only the item ID limits the information I can obtain, as there are no methods to retrieve additional details like the item's name. like i mean in scene item transform changed i want to filter the item by its name if i want to update transform from specific item etc etc Maybe i see something wrong? and i know there are some limitations from just obs api

tinodo commented 6 months ago

This has been requested by to community to the maintainers of the OBS Studio Websockets interface, but they are reluctant do so.

The only option you have is to, once connected, get all the scenes and items and keep track of change to them through the events. A hassle, I agree, but that's the only way for now.

FaNim21 commented 6 months ago

Then okay, thank you so much for help <3