Subversion Repositories filter_foundry

Rev

Rev 503 | Rev 515 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 503 Rev 511
Line 151... Line 151...
151
        int pad = 4 - (x % 4);
151
        int pad = 4 - (x % 4);
152
        if (pad == 0) pad = 4;
152
        if (pad == 0) pad = 4;
153
        return x + pad;
153
        return x + pad;
154
}
154
}
155
 
155
 
156
size_t fixpipl(PIPropertyList *pipl, size_t origsize, char* title, long *event_id) {
156
size_t fixpipl(PIPropertyList *pipl, size_t origsize, char* title, char* category, long *event_id) {
157
        PIProperty *prop;
157
        PIProperty *prop;
158
        char *p;
158
        char *p;
159
        struct hstm_data {
159
        struct hstm_data {
160
                /* this structure must be 14+1 bytes long, to match PiPL structure */
160
                /* this structure must be 14+1 bytes long, to match PiPL structure */
161
                long version; /* = 0 */
161
                long version; /* = 0 */
Line 209... Line 209...
209
 
209
 
210
        prop->vendorID = kPhotoshopSignature;
210
        prop->vendorID = kPhotoshopSignature;
211
        prop->propertyKey = PICategoryProperty;
211
        prop->propertyKey = PICategoryProperty;
212
        prop->propertyID = 0;
212
        prop->propertyID = 0;
213
 
213
 
214
        prop->propertyLength = (SPInt32)roundToNext4(strlen(gdata->parm.szCategory) + 1);
214
        prop->propertyLength = (SPInt32)roundToNext4(strlen(category) + 1);
215
        memset(prop->propertyData, 0x00, prop->propertyLength); // fill padding with 00h bytes (cosmetics)
215
        memset(prop->propertyData, 0x00, prop->propertyLength); // fill padding with 00h bytes (cosmetics)
216
        myc2pstrcpy((StringPtr)prop->propertyData, gdata->parm.szCategory);
216
        myc2pstrcpy((StringPtr)prop->propertyData, category);
217
 
217
 
218
        p += offsetof(PIProperty, propertyData) + prop->propertyLength;
218
        p += offsetof(PIProperty, propertyData) + prop->propertyLength;
219
        prop = (PIProperty*)p;
219
        prop = (PIProperty*)p;
220
 
220
 
221
        /* add HasTerminology property key */
221
        /* add HasTerminology property key */
222
 
222
 
223
        hstm = (struct hstm_data*)prop->propertyData;
223
        hstm = (struct hstm_data*)prop->propertyData;
224
 
224
 
225
        sprintf(szScope, "%s %s",
225
        sprintf(szScope, "%s %s", category, title);
226
            gdata->parm.szCategory,
-
 
227
            title);
-
 
228
 
226
 
229
        #ifdef ENABLE_APPLESCRIPT
227
        #ifdef ENABLE_APPLESCRIPT
230
        // If the uniqueString/scope is set, the plugin will only communicate with Photoshop.
228
        // If the uniqueString/scope is set, the plugin will only communicate with Photoshop.
231
        // Otherwise it can be accessed with AppleScript, but the AETE keys need to be unique then.
229
        // Otherwise it can be accessed with AppleScript, but the AETE keys need to be unique then.
232
        // This is achieved with getAeteKey().
230
        // This is achieved with getAeteKey().