• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Blocking/Authorizing Callback available via Photoshop SDK?

New Here ,
Sep 07, 2020 Sep 07, 2020

Copy link to clipboard

Copied

I see the Photoshop SDK has events such as eventOpen, eventSave, etc in the Photoshop SDK. I can sign up for these events from my plugin to be notified when such actions (open, save, respectively) are performed. But these are *notifications*, not *blocking/authorizing callbacks*.

 

By "blocking/authorizing callbacks", I mean Photoshop invoking my (previously registered) callback with the following conditions:
(i) Photoshop invokes my callback *before* it actually performs the relevant action (eg Open, Save),
(ii) My callback blocks the handling of the event, and
(iii) I can return a "fail" from within my callback, which will cause Photoshop to error out on the action. E.g., Photoshop will fail the Save action, with maybe an error-message that I provide from my callback.

 

Does Photoshop provide such callbacks? If so, where in the SDK code can I find them?

 

Thanks.

TOPICS
Actions and scripting , SDK , Windows

Views

190

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
LEGEND ,
Sep 07, 2020 Sep 07, 2020

Copy link to clipboard

Copied

For what it's worth, this isn't the usual meaning of "blocking" in cooperative programming. It would normally mean "capable of stopping execution while waiting for an event". For instance, a save plug-in that waited if a network resource was unavailable would be blocking. Your term is closer to "authorizing". May help you in your searches. I haven't used the Photoshop SDK but in the Acrobat SDK you could create a custom filesystem implementation that prefliltered all operations.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 07, 2020 Sep 07, 2020

Copy link to clipboard

Copied

LATEST

Thanks for your response. Yeah I can see "blocking" alone might be confusing, and "authorizing" might be more accurate; accordingly edited the post.

 

And yes, like you said, Acrobat SDK does provide for such callbacks, via the HFTReplaceEntry API. I don't see this API or any equivalent in the Photoshop SDK.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines