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

How can a plugin know the host version ?

Explorer ,
Jan 15, 2010 Jan 15, 2010

Copy link to clipboard

Copied

Hello,

My format plugin needs to know which host version is calling it (CS2, CS3, ...) to adapt automatically (ex: CS2 does not support creating images with multi-layers). How can I get the host version from the plugin ?

Up to now, I have been using  HostSupports32BitCoordinates to distinguish between before and after CS1 but I need more precision (actually, I need to distinguish hosts between before and after CS3).

Thank you!

Gilbert

TOPICS
SDK

Views

1.1K

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
Contributor ,
Jan 18, 2010 Jan 18, 2010

Copy link to clipboard

Copied

Use Getter plugin to get the code that retreives this (or any similar type of ) information.

Briefly:

PutProperty(classProperty,keyHostVersion)

PutEnumerated(classApplication,typeOrdinal,enumTarget);

PSActionControl->Get()

and then look for keyHostVersion and inside it for keyVersionMajor and keyVersionMinor

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
Explorer ,
Jan 18, 2010 Jan 18, 2010

Copy link to clipboard

Copied

Thank you for the pointer. I had some compilation problems trying to use the solution you propose with my format plugin but I got what I wanted with:

// Get the Property Suite from the parameter block

PropertyProcs *propSuite = formatParamBlock->propertyProcs;

if (propSuite){

     int32 version=0;

     propSuite->getPropertyProc(

'8BIM', propVersion, 0, (intptr_t *)&version, nil);

     gPhotoshopVerMaj = version >> 16;

     gPhotoshopVerMin = version && 0x0000ffff;

}

Gilbert

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
Contributor ,
Jan 21, 2010 Jan 21, 2010

Copy link to clipboard

Copied

LATEST

Well, it was pseudo-code to being with


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