bitfocus / companion-module-obs-studio

OBS Studio Module for Companion
MIT License
45 stars 28 forks source link

Get / Set- FilterSettings #217

Closed Joluje closed 4 weeks ago

Joluje commented 1 year ago

I would love to see the option to Get and Set the settings of an Filter thru Companion.

Set: there should be an action that includes the configuration for scene, source, filter name, and a filterSettings string. It would be really nice to have the possibility to use a drop-down to choose the filter type, instead of using a filterSetting string. Then, whichever filter type you choose, the appropriate text boxes will be revealed. (I don't know if this is possible in the current Companion version) (Websocket: https://github.com/obsproject/obs-websocket/blob/master/docs/generated/protocol.md#setsourcefiltersettings) image

Get: there should be a feedback option (which I'm not sure, but I think it gets executed regularly) where you configure the scene, source, filter name, and a variable name. This feedback will create variables (variable name + name of the setting) and set them to the corresponding value (return value). (Websocket: https://github.com/obsproject/obs-websocket/blob/master/docs/generated/protocol.md#getsourcefilter) image

I conducted some testing with the Generic WebSocket Module and found out that OBS WebSocket only returns the changed filter setting parameters. If we want to make this more user-friendly, we could combine it with the GetSourceFilterDefaultSettings function, which provides the default settings of a filter kind (e.g. color_filter_v2). image

I hope that this is not too much work. Thank you to all the contributors of this great module!

bryce-seifert commented 4 months ago

Partially addressed with https://github.com/bitfocus/companion-module-obs-studio/commit/206ee147fb9dc225a242bf3787ff4bd4baa58f04

bryce-seifert commented 4 weeks ago

The “Get” part should now be possible in the latest Companion beta.

It adds a “custom_command_response” variable which shows the last reply from a custom command call, which you can use with jsonparse to set a variable with an expression, or a variety of other workflows. Hopefully this is helpful!