obsproject / obs-websocket

Remote-control of OBS Studio through WebSocket
GNU General Public License v2.0
3.86k stars 707 forks source link

Feature Request: Set sceneitemId #1126

Closed awrebels closed 1 year ago

awrebels commented 1 year ago

Feature Request Type

RPC Request

Feature Request Type (Other)

No response

Requested Feature

Is there a way even if very manual to set a scene item id? I recognize that there would need to be some rails placed around the user being able to manually set a scene item id but in my case it'd be very useful. I'm essentially connecting to OBS installs together and have a script which converts websocket events from essentially the server to the client machine. Right now luckily the scene item ids have all matched; except for newly created items.

if there isn't already a method perhaps it could be a feature.

thanks!

Requested Feature Usage Scenario

Changing scene item id to manually structure scene collection.

tt2468 commented 1 year ago

OBS operates on the guarantee that a scene item's ID never changes. To allow a scene item to have its ID changed would have implications far outside of obs-websocket.

If you must have some way of modifying data associated with a scene item and cannot store that data externally, you can use Get/SetSceneItemPrivateData to store your own data alongside a given scene item. These requests are not available but not officially a part of the API, and have no guarantees of working long-term: https://github.com/obsproject/obs-websocket/blob/master/src/requesthandler/RequestHandler_SceneItems.cpp#L738

EDIT: A more dependable solution may be Get/SetPersistentData, which works similarly to the requests mentioned above, but is officially supported. We are working on adding UUID support to sources and scene items, which would make data stored here (like id associations between two OBS instances) more reliable.