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
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
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
Copy link to clipboard
Copied
Well, it was pseudo-code to being with