bitfocus / companion-module-studiocoast-vmix

Studiocoast vMix module for Bitfocus Companion
MIT License
32 stars 10 forks source link

Using Custom variable at the Layer Input on Multiview #192

Closed pajtimzeka closed 1 year ago

pajtimzeka commented 1 year ago

It would be great if you can change this part of the code to use custom variable from companion or add it as a new function with custom variable so we can choose which one to use.

setMultiViewOverlay: {
      name: 'Layer - Set Input as Multiview Layer',
      options: [
        {
          type: 'textinput',
          label: 'MultiView Input',
          id: 'input',
          default: '',
        },
        {
          type: 'number',
          label: 'Layer',
          id: 'layer',
          default: 1,
          min: 1,
          max: 10,
        },

Changing type number to textinput and removing default 1 min 1 max 10

thedist commented 1 year ago

It's not as simple as just changing a couple lines like you suggest.

To change an option from a number to string would also mean changing the interface, and creating an upgrade script to handle that change as every existing config would have the option as a number.

Additionally, you can already handle layer routing with variables using the Routable Multiview Layer actions: setMultiViewOverlayDestinationInput to set the destination input setMultiViewOverlayDestinationLayer to set the destination layer setMultiViewOverlaySourceInput to set the input to be routed to that selected input/layer All of those should support using variables.

pajtimzeka commented 1 year ago

Thank you for ur response, yes i tried the option that u mentioned above and it works but it requires 3 actions. But i guess i will have to use that Regards