Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling procedures #3149

Open
2 tasks done
gbdlin opened this issue Nov 17, 2024 · 0 comments
Open
2 tasks done

Calling procedures #3149

gbdlin opened this issue Nov 17, 2024 · 0 comments
Labels
area/internal Related to an internal action or function of Companion. Enhancement New feature or request Needs beer! This needs discussion while drinking beer

Comments

@gbdlin
Copy link

gbdlin commented Nov 17, 2024

Is this a feature relevant to companion itself, and not a module?

  • I believe this to be a feature for companion, not a module

Is there an existing issue for this?

  • I have searched the existing issues

Describe the feature

Currently the only way to reuse sets of actions is to call one button from another button. As this approach works pretty well, it has some major drawbacks: it can be easily broken (by rearranging pages or buttons that rely on each other), it is hard to trace and doesn't allow parametrized inputs.

Introducing procedures that are just set of actions that will be triggered one by one just like on buttons would fix those issues. Each procedure should accept a configurable amount of parameters that would be passed from button, trigger or another procedure and those parameters would be present as variables in the procedure itself.

It is worth noting that implementation should account for 2 instances of the same procedure being called at once and make sure parameters are locally scope and each call sees their own values.

This issue can possibly benefit people waiting for #3138, #3085, #2370, #2138 (by exposing procedures over HTTP API), #1924, #1676 and can be a step towards #2387. Also loosely relates to #1909 as the concept of passing parameters seems similar. It may also help with #1849.

Usecases

Example: with ATEM switchers user may want to set a specific output as a flying key on a specific position on the screen and then trigger a specific transition, maybe changing also the background. Now, if there are multiple inputs that need this treatment, the only way is to separate the same actions onto yet another button (possibly hidden on an unused page) and trigger this button from other buttons and have only the actions that differ on each directly pressed button.

Procedures will allow to streamline this process as well as parametrize the input, so now only action on buttons would be triggering a specific procedure with a different parameter. Changing the position of the flying key would also be easier as it can be another parameter on the same procedure.

@Julusian Julusian added Enhancement New feature or request area/internal Related to an internal action or function of Companion. Needs beer! This needs discussion while drinking beer labels Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/internal Related to an internal action or function of Companion. Enhancement New feature or request Needs beer! This needs discussion while drinking beer
Projects
None yet
Development

No branches or pull requests

2 participants