Subversion Repositories filter_foundry

Rev

Rev 152 | Rev 176 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. /*
  2.     This file is part of "Filter Foundry", a filter plugin for Adobe Photoshop
  3.     Copyright (C) 2003-2019 Toby Thain, toby@telegraphics.com.au
  4.  
  5.     This program is free software; you can redistribute it and/or modify
  6.     it under the terms of the GNU General Public License as published by
  7.     the Free Software Foundation; either version 2 of the License, or
  8.     (at your option) any later version.
  9.  
  10.     This program is distributed in the hope that it will be useful,
  11.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13.     GNU General Public License for more details.
  14.  
  15.     You should have received a copy of the GNU General Public License
  16.     along with this program; if not, write to the Free Software
  17.     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  18. */
  19.  
  20. // Reverse-Engineering of Filter Factory for Photoshop by Alex Hunter (7/1999)
  21. // Reverse-Engineering of Filter/Transition Factory for Premiere by Daniel Marschall (1/2019)
  22.  
  23. #define PARM_SIZE/*_PHOTOSHOP*/  0x2068 // Photoshop FF and Filter Foundry since 1.7
  24. #define PARM_SIZE_PREMIERE       0x206C // Premiere FF/TF
  25. #define PARM_SIG_MAC             0x1C68 // Mac OS Filter Factory and Filter Foundy <1.7 use 0x1C68 instead of 0x2068 as first member
  26.  
  27. #ifdef Rez
  28.  
  29. type 'PARM' {
  30.         longint = PARM_SIZE; // cbSize;    //size of this structure
  31.         longint FilterFactory,standaloneFilter; // standalone;  //0=original FF, 1=standalone filter
  32.         array[8] { longint; }; // val[8];    //initial values of controls
  33.         longint noParameters,parametersDialog; // popDialog; //true if need to pop a parameter dialog
  34.         longint; // unknown1;
  35.         longint; // unknown2;
  36.         longint; // unknown3;
  37.         array[4] { longint; }; // map_used[4];   //true if map(n) is used
  38.         array[8] { longint; }; // ctl_used[8];   //true if ctl(n) is used
  39.         pstring[251];    //Category name
  40.         // Michael Johannhanwahr's protect flag...
  41.         longint notProtected,isProtected; // iProtected;            // == 1 means protected
  42.         pstring[255];       //Filter title
  43.         pstring[255];   //Copyright info
  44.         pstring[255];      //Filter author(s)
  45.         array[4] { pstring[255]; };      //4 map labels
  46.         array[8] { pstring[255]; };      //8 control labels
  47.         array[4] { cstring[1024]; }; //4 channel formulas
  48. };
  49.  
  50. #else
  51.  
  52. /* N.B. under Windows, the strings are all C strings (!) */
  53.  
  54. // Photoshop's Filter Factory has PARM:16
  55. typedef struct {   //structure of FF PARM resource
  56.         long cbSize;     //size of this structure = 0x2068 (or 0x1C68 for Filter Foundry <1.7)
  57.         long standalone; //0=original FF, 1=standalone filter
  58.         long val[8];     //initial values of controls
  59.         long popDialog;  //1 if need to pop a parameter dialog
  60.         long unknown1;
  61.         long unknown2;
  62.         long unknown3;
  63.         long map_used[4];   //true if map(n) is used
  64.         long ctl_used[8];   //true if ctl(n) is used
  65.         unsigned char category[252];    //Category name
  66.         // Michael Johannhanwahr's protect flag...
  67.         long iProtected;            // == 1 means protected
  68.         unsigned char title[256];       //Filter title
  69.         unsigned char copyright[256];   //Copyright info
  70.         unsigned char author[256];      //Filter author(s)
  71.         unsigned char map[4][256];      //4 map labels
  72.         unsigned char ctl[8][256];      //8 control labels
  73.         char formula[4][1024];          //4 channel formulas; in Photoshop: (r,g,b,a)
  74. } PARM_T/*_PHOTOSHOP*/;
  75.  
  76. // Premiere's Transition/Filter Factory has PARM:16000
  77. typedef struct {   //structure of Premiere FF/TF PARM resource
  78.         long cbSize;    //size of this structure = 0x206C
  79.         long standalone;  //0=original FF, 1=standalone filter
  80.         long singleExpression; //1 if "single expression" is checked (member only available in Premiere)
  81.         long val[8];    //initial values of controls
  82.         long popDialog; //1 if need to pop a parameter dialog
  83.         long unknown1;
  84.         long unknown2;
  85.         long unknown3;
  86.         long map_used[4];   //true if map(n) is used
  87.         long ctl_used[8];   //true if ctl(n) is used
  88.         unsigned char category[252];    //Category name
  89.         // Michael Johannhanwahr's protect flag...
  90.         long iProtected;            // == 1 means protected
  91.         unsigned char title[256];       //Filter title
  92.         unsigned char copyright[256];   //Copyright info
  93.         unsigned char author[256];      //Filter author(s)
  94.         unsigned char map[4][256];      //4 map labels
  95.         unsigned char ctl[8][256];      //8 control labels
  96.         char formula[4][1024];          //4 channel formulas; in Premiere: (b,g,r,a) or (-,-,-,r=g=b=a) in single-expression-mode
  97. } PARM_T_PREMIERE;
  98.  
  99. #endif
  100.