bitfocus / companion-module-renewedvision-propresenter

Renewed Vision Pro Presenter
MIT License
31 stars 19 forks source link

Feature Request: Slide Labels as variables #77

Open Marshy2006 opened 3 years ago

Marshy2006 commented 3 years ago

Would it be possible to add slide labels of a specific slide as variables?

https://github.com/jeffmikels/ProPresenter-API/blob/master/Pro7.md#request-presentation-set-of-slides Looks like it is possible from the propresenter api standpoint but im not sure if this is possible from a companion variable standpoint. I think the user would need to specify the presentation and slide path. Can this be done with companion variables?

Thanks

greyshirtguy commented 3 years ago

hmm probably...slide labels are included in that response... What's the use case for this? Hoping to understand, as it would have to be updated manually

Marshy2006 commented 3 years ago

The use case is for the operator of the stream deck to be able to see what propresenter slide they are activating without having to reprogram the name for each slide every Sunday.

greyshirtguy commented 3 years ago

Right, I think I am slowly catching on! You intend for buttons to have slide and/or group labels on them so operator can read the button on the streamdeck and know which slide it will trigger? If that is right - do you intend to have actions for previous and next as well as specific slide? I'm just trying to picture all the details....

Side note: We might hit a roadblock anyway where this is possible but maybe not preactical.- as it's very "expensive" for Pro7 to generate the results of "presentationRequest" action (it causes Pro7 to even pause/stutter).

But you would need to do that request every time a slide is triggered to maintain the labels for previous and next.... Even if you only maintained a dyn var for specifc slides, you would still have to call the request on regular intervals to maintain the label from that specific slide (otherwise user could edit and dynamic var would not know about the change)

Marshy2006 commented 3 years ago

You are correct. I did not originally intend to have previous and next and I personally can't think of a helpful use case for it.

It looks like "slideLabels" data is included in the "presentationCurrent" command as well as "presentationRequest". Am I correct in saying that "presentationCurrent" is already used for the variables: "$(propresenter:total_slides) $(propresenter:remaining_slides) $(propresenter:presentation_name)"? Could the slide label variable take the data from presentationCurrent and only update when a specified presentation is active on propresenter? I think this would reduce having to call presentationRequest regularly?

greyshirtguy commented 3 years ago

I'm struggling to imagine how the slide label var would useful for a specific slide... Let's say there was a new var: "SelectedSlideLabel".... You would have to specify the presentation path and slide # in settings....and it would be hard set to that slide - until you re-visit settings and update it...
But if you are going to the trouble to update presentation path and slide # - why not just update the button label manually?

Maybe I'm missing the point - perhaps a concrete example with mock-up screen shots would help to understand?

You are corrrect in summising that presentationRequest is sent to update those three variables...... However, as I mentioned before it's an "expensive" request that causes ProPresenter to stutter/paause while processing it! I got a lot complaints from people when it was called each time a slide was changed - so I made an option in setting to disable it (and sacrifice those variable working!) image

Marshy2006 commented 3 years ago

These are all very good points.

"But if you are going to the trouble to update presentation path and slide # - why not just update the button label manually?" - With my companion set up, I am aiming for no changes to the configuration from week to week to avoid having to train volunteers how to use another piece of software. The plan was to only set up presentation path and slide once and then leave it for the weeks to come. If we want to change a slide in the "notices" presentation, all we had to do is replace an old slide in propresenter and it would automatically update the name in companion.

Side: Personally, I have not had any problems with presentation request causing propresenter to stutter. If this new feature was to be implemented, there would have to be a lot of information that has to be declared in settings. I think this would overall clutter up the module and be hard to use for some.

I have done a quick custom build for proof of concept and it seems to work how I originally planned it to so it is up to you if you want to add the feature or not.

Thanks for your help, please let me know if this doesn't make sense.

jmcc94 commented 3 years ago

This would be a useful feature to take advantage of...+1

greyshirtguy commented 3 years ago

Can you fork and make pull request - happy to review

Marshy2006 commented 3 years ago

I have made a pull request:

https://github.com/bitfocus/companion-module-renewedvision-propresenter/pull/80

greyshirtguy commented 3 years ago

I'm stuggling to understand how you would use this?

According to code

var slideLabel = objPresentation.presentationSlideGroups[slideindex].groupSlides[0].slideLabel

You want to get the slide label from the first slide of the specified group (which you call slide index) within the specific presentation (by preset presentationPath)

This seems odd to me?

Can you make a video demo using this? Can you write instructions for how to use it?

In meantime, I'm going to pause lookin at this and instead give 100% attention to some new features that a lot of people have been asking for and will soon be possible (triggering Looks and triggering Macros)...

Please be patient with me (these new features are high on a lot of people's wish-list). - I'll come back to your feature after that - and try and wrap my head around it!

greyshirtguy commented 3 years ago

In the meantime, if you are finding your changes useful, and you are in a hurry to use them - you can, of-course, make your own app with your changes use that!

greyshirtguy commented 2 years ago

@Marshy2006 whatever became of this? I see you closed the pull request. Are you still using your custom build to get that slide label from the first slide in a group specified by "slide index"?

I finally figured out why you coded like that... If you drag in images/media as new slides - it creates a new Group with a single slide... So assuming your presenation is made only of images/media dragged in and dropped as "new slides" then each one would be a in it's own single-slide-group and your code makes sense!

Your code works/makes sense for presentations where all slides are in separate groups (each group made of a single slide) It would not work correctly for other presentations - eg where all the slides are in a single group or some groups have multiple slides (eg if you drag in multiple images at once - they will be added to a single group)

It can work fine if we make it generic to cover all possible cases.....(any number of groups with any number of slides in each group) eg: "Slide Label Presentation Path" "Slide Label Group Index" "Slide Label Slide Index"

For your presentation all slides are in their own groups (and each group only has one slide)....so the correct way to index a slide in that presentation is: "Slide Label Presentation Path" = "etc:etc" "Slide Label Group Index" = a zero based index of the group (which looks a lot like the index of the slide since each group has a single slide) "Slide Label Slide Index" = 0 (first slide in the group above)

Does this make sense to you? Do you still want this feature added to the module?

I have finshed making a lot of changes to the module and I am now trying to catch up on all issues!

greyshirtguy commented 2 years ago

Just had another thought on this and am making this comment as note for my future self (so I dont forget). Having a single pair of config items only allows a single slide to be indentified and it's label retrieved and applied to a module var. An improvement would be a method to input any number of paths to slides and have vars updated with the labels from them all.

Perhaps a single config text field where (advanced) users can enter several complete paths (p.p.p...p:s) separated by commas?