7 Replies Latest reply on May 8, 2017 7:16 AM by Bruce Bullis

    Panel Notification when Sequence Selection Changes?

    sberic Level 2

      We would like to add some functionality to our extension panel that allows it to reflect the selection state of the TrackItems in the active sequence. While CSInterface has a CSEvent definition, I found this old discussion which seems to indicate that CSEvents have no effect in Premiere. Is there a different way to register for such events?

       

      Or is the only option a polling one (whether the polling be done on the ExtendScript [APP] side or the JavaScript [HTML] side)?

        • 1. Re: Panel Notification when Sequence Selection Changes?
          Bruce Bullis Adobe Employee

          There are no such events, for which to register.

           

          When your panel is in charge, you can get/set the selection in the timeline; but the user would have to do something with your panel to get it involved.

           

          Please, never poll; for now, a 'notice current selection' button in your panel remains the recommended approach.

          • 2. Re: Panel Notification when Sequence Selection Changes?
            sberic Level 2

            Bruce Bullis, is there a technical reason to not provide such an API or approach? Without that kind of API available, it seems nigh-impossible to create extensions that feel like "first-class citizens" in Adobe Premiere...

             

            With respect to polling, would adding a timeout help or is there something deeper here that you're suggesting we avoid performance-wise?

            • 3. Re: Panel Notification when Sequence Selection Changes?
              Bruce Bullis Adobe Employee

              Because of where CEP panels fit into PPro, that sort of messaging wasn't part of the initial plans.

               

              Our API grows in direct response to user and developer requests.

               

              You're not the first to request such messaging; I've added your vote.

               

              I was cleaving to a general "polling == BAD" heuristic; if one panel is doing it, you'll get by. But what if 10 panels were polling?

              • 4. Re: Panel Notification when Sequence Selection Changes?
                sberic Level 2

                Bruce Bullis wrote

                 

                Because of where CEP panels fit into PPro, that sort of messaging wasn't part of the initial plans.

                 

                Our API grows in direct response to user and developer requests.

                 

                You're not the first to request such messaging; I've added your vote.

                That makes sense. Thanks for adding my vote onto the pile! Fingers crossed support for this type of Panel↔Application interaction support will come soon!

                 

                Bruce Bullis wrote

                 

                I was cleaving to a general "polling == BAD" heuristic; if one panel is doing it, you'll get by. But what if 10 panels were polling?

                Gotcha. We may look into polling at a low frequency if we can't figure out a different way to serve the user. As a worst-case fallback, perhaps we could update the panel by responding to the "onfocus" event. Still not necessarily ideal, as the user would need to keep switching focus to get the panel content to reflect changes.

                • 5. Re: Panel Notification when Sequence Selection Changes?
                  Bruce Bullis Adobe Employee

                  That's another argument against polling; rather than trying to gather information upon a focus change, your panel becomes much more predictable, once users learn to rely on your 'Update' button...

                  • 6. Re: Panel Notification when Sequence Selection Changes?
                    sberic Level 2

                    Bruce Bullis wrote

                     

                    That's another argument against polling; rather than trying to gather information upon a focus change, your panel becomes much more predictable, once users learn to rely on your 'Update' button...

                    Wait, what? How is that another argument against polling? Polling would, with some slight delay, perhaps, automatically keep things in sync. Let's say a user has an Extension Panel with some extra meta-information about the Timeline. They find the information useful as they edit. They undock the window and put it in a second monitor (or keep it visible in a panel next to the main Timeline one). Now imagine the workflow they have to endure if they want to make use of that information as they edit:

                     

                    1. Adjust in the timeline.
                    2. Click the Update button in the panel.
                    3. Adjust in the timeline.
                    4. Click the Update button in the panel.
                    5. Adjust in the timeline.

                     

                    OnFocus would potentially be better but I think I may have gleaned some of your concern: it is possible to adjust in the timeline using Shortcut Keys while the Extension still has focus! (Please correct me here if I'm wrong.) In this case, the user would have to switch back-and-forth between the timeline and extension panel to trigger the update (also not good). An update button or Keyboard Keys that have "Registered Interest" would be better. This still results, however, an incredibly painful workflow.

                    • 7. Re: Panel Notification when Sequence Selection Changes?
                      Bruce Bullis Adobe Employee

                      > Wait, what? How is that another argument against polling?

                      Because if you let the user tell the panel when they want the panel to do something, you don't waste everybody's CPU cycles getting updates the users doesn't care if your panel gets or not.

                       

                      I see why you'd want to register interest, instead of relying on the user to make your panel aware of that change.

                       

                      Update buttons remain the best approach to making panels aware of changes made in PPro.