Need UXP Show / Hide Events in Premiere Pro For Panel Reload

An active project we’re working on needs the UXP Plugin state to refresh each time the user closes and opens the panel, however by default UXP state persists.

Entrypoint Setup() events seem like the logical place to override this behavior, but create() and show() work once, not on each panel show event, destroy() only triggers when the app is closing, and hide() never triggers at all:

  uxp.entrypoints.setup({
    plugin: {
      // Only Once
      create: () => {console.log("Plugin: Create")},
      // Never gets called even if all panels
      destroy: () => {console.log("Plugin: Destroy")},
    },
    panels: {
      "bolt.uxp.plugin.main": {
        // Only shown once
        show: function () {console.log("Panel: Shown")},
        // Never Fires
        hide: function () {console.log("Panel: Hide")},
        // Only shown once
        create: function () {console.log("Panel: Create")},
        // Only shown when app is closed
        destroy: function () {console.log("Panel: Destroy")},
      },
    },
  });

(more info here Entrypoints callbacks: mostly still not working? - #7 by DavideBarranca )

Photoshop has a workaround with this with the uxpcommand event listener:

  document.addEventListener("uxpcommand", (event) => {
    console.log({ event });
    if (event.commandId === "uxpshowpanel") {
      console.log("uxpcommand : show");
    } else if (event.commandId === "uxphidepanel") {
      console.log("uxpcommand : hide");
    } 
  });

(more info: https://developer.adobe.com/photoshop/uxp/2022/guides/how-to/#uxp-specific-snippets)

However this event is not fired in Premiere.

We need some sort of event in Premiere UXP, either the hide() / show() entrypoint events or the uxpcommand hide/show events in order to determine when panels are shown / hidden for refreshing state and various other use cases.

Thank you!

Nice documentation, as always.

We’re tracking this as DVAPR-4264367.

2 Likes