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

Get current CEP version in runtime

Participant ,
Dec 27, 2018 Dec 27, 2018

Copy link to clipboard

Copied

I want to support CS6 in my panel, but I am pretty sure some of the functionality will not be available.

Is it possible to obtain current CEP version in runtime, so I could have some features CEP8 only, some CEP9 only?

TOPICS
Actions and scripting

Views

1.4K

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

correct answers 1 Correct answer

Jan 08, 2019 Jan 08, 2019

I only see the host version available. Can you do a if (typeof event.data == "object") or "undefined" to determine if what you want is available? Other than that a table of CEP version to app + app.version should do the trick. Something you would have to build is the only option I see.

Votes

Translate

Translate
Adobe
Jan 08, 2019 Jan 08, 2019

Copy link to clipboard

Copied

I only see the host version available. Can you do a if (typeof event.data == "object") or "undefined" to determine if what you want is available? Other than that a table of CEP version to app + app.version should do the trick. Something you would have to build is the only option I see.

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
Participant ,
Jan 09, 2019 Jan 09, 2019

Copy link to clipboard

Copied

To give a more concrete example. as far as I know, CEP9 now exposes access to brushes programmatically.

I would want to add a button to my panel UI to change brush, for example. But it should only be available on CEP9, not on CEP8.

I am not sure how can I test with typeof or checking of undefined, while I am in my html/js part, not in jsx part of the extension.

Say I would expose some of this information via events – fire an event if functionality is available. I still need to somehow test in jsx that feature is present.

The simplest solution I can think of – as you mentioned, a table that sets some features for CEP8, and others for CEP9. But to make it work, I need to somehow get which environment host supports at the moment.

My extension works 2015.5 to 2019, people running in 2015.5 should not see some of the features.

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
Jan 09, 2019 Jan 09, 2019

Copy link to clipboard

Copied

LATEST

As far as I know, "brushes programmatically" is not a CEP function but a Photoshop function which the appVersion or app.version would tell you.

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