[80] | 1 |
|
---|
| 2 | /*******************************************************************
|
---|
| 3 | *
|
---|
| 4 | * DESCRIPTION: DLL Plugin API
|
---|
| 5 | *
|
---|
| 6 | * AUTHOR: Dan Silva
|
---|
| 7 | *
|
---|
| 8 | * HISTORY: 11/30/94 Started coding
|
---|
| 9 | *
|
---|
| 10 | *******************************************************************/
|
---|
| 11 |
|
---|
| 12 | #include "maxtypes.h"
|
---|
| 13 |
|
---|
| 14 | #ifndef PLUGAPI_H_DEFINED
|
---|
| 15 |
|
---|
| 16 |
|
---|
| 17 | #define PLUGAPI_H_DEFINED
|
---|
| 18 |
|
---|
| 19 | // 3DSMAX Version number to be compared against that returned by DLL's
|
---|
| 20 | // LibVersion function to detect obsolete DLLs.
|
---|
| 21 | //#define VERSION_3DSMAX 0x00006 // changed 4/1/96 -- DB
|
---|
| 22 | #define VERSION_3DSMAX 100 // changed 4/9/96 -- DB
|
---|
| 23 |
|
---|
| 24 | // Internal super classes, that plug-in developers need not know about
|
---|
| 25 | #define GEN_MODAPP_CLASS_ID 0x00000b
|
---|
| 26 | #define MODAPP_CLASS_ID 0x00000c
|
---|
| 27 | #define OBREF_MODAPP_CLASS_ID 0x00000d
|
---|
| 28 | #define BASENODE_CLASS_ID 0x000001
|
---|
| 29 | #define GEN_DERIVOB_CLASS_ID 0x000002
|
---|
| 30 | #define DERIVOB_CLASS_ID 0x000003
|
---|
| 31 | #define WSM_DERIVOB_CLASS_ID 0x000004
|
---|
| 32 | #define PARAMETER_BLOCK_CLASS_ID 0x000008
|
---|
| 33 | #define EASE_LIST_CLASS_ID 0x000009
|
---|
| 34 | #define AXIS_DISPLAY_CLASS_ID 0x00000e
|
---|
| 35 | #define MULT_LIST_CLASS_ID 0x00000f
|
---|
| 36 | #define NOTETRACK_CLASS_ID 0x0000ff
|
---|
| 37 | #define TREE_VIEW_CLASS_ID 0xffffff00
|
---|
| 38 | #define SCENE_CLASS_ID 0xfffffd00
|
---|
| 39 | #define VIEWREF_CLASS_ID 0xffffff01
|
---|
| 40 |
|
---|
| 41 | //-------------------------------------------
|
---|
| 42 | // Deformable object psuedo-super-class
|
---|
| 43 | #define DEFORM_OBJ_CLASS_ID 0x000005
|
---|
| 44 |
|
---|
| 45 | //-------------------------------------------
|
---|
| 46 | // Mappable object psuedo-super-class
|
---|
| 47 | #define MAPPABLE_OBJ_CLASS_ID 0x000006
|
---|
| 48 |
|
---|
| 49 | //-------------------------------------------
|
---|
| 50 | // Shape psuedo-super-class
|
---|
| 51 | #define GENERIC_SHAPE_CLASS_ID 0x0000ab
|
---|
| 52 |
|
---|
| 53 | //-------------------------------------------
|
---|
| 54 | // Super-classes that are plugabble.
|
---|
| 55 | #define GEOMOBJECT_CLASS_ID 0x000010
|
---|
| 56 | #define CAMERA_CLASS_ID 0x000020
|
---|
| 57 | #define LIGHT_CLASS_ID 0x000030
|
---|
| 58 | #define SHAPE_CLASS_ID 0x000040
|
---|
| 59 | #define HELPER_CLASS_ID 0x000050
|
---|
| 60 | #define SYSTEM_CLASS_ID 0x000060
|
---|
| 61 | #define REF_MAKER_CLASS_ID 0x000100
|
---|
| 62 | #define REF_TARGET_CLASS_ID 0x000200
|
---|
| 63 | #define OSM_CLASS_ID 0x000810
|
---|
| 64 | #define WSM_CLASS_ID 0x000820
|
---|
| 65 | #define WSM_OBJECT_CLASS_ID 0x000830
|
---|
| 66 | #define SCENE_IMPORT_CLASS_ID 0x000A10
|
---|
| 67 | #define SCENE_EXPORT_CLASS_ID 0x000A20
|
---|
| 68 | #define BMM_STORAGE_CLASS_ID 0x000B10
|
---|
| 69 | #define BMM_FILTER_CLASS_ID 0x000B20
|
---|
| 70 | #define BMM_IO_CLASS_ID 0x000B30
|
---|
| 71 | #define BMM_DITHER_CLASS_ID 0x000B40
|
---|
| 72 | #define BMM_COLORCUT_CLASS_ID 0x000B50
|
---|
| 73 | #define USERDATATYPE_CLASS_ID 0x000B60
|
---|
| 74 | #define MATERIAL_CLASS_ID 0x000C00 // Materials
|
---|
| 75 | #define TEXMAP_CLASS_ID 0x000C10 // Texture maps
|
---|
| 76 | #define UVGEN_CLASS_ID 0x0000C20 // UV Generator
|
---|
| 77 | #define XYZGEN_CLASS_ID 0x0000C30 // XYZ Generator
|
---|
| 78 | #define TEXOUTPUT_CLASS_ID 0x0000C40 // Texture output filter
|
---|
| 79 | #define SOUNDOBJ_CLASS_ID 0x000D00
|
---|
| 80 | #define FLT_CLASS_ID 0x000E00
|
---|
| 81 | #define RENDERER_CLASS_ID 0x000F00
|
---|
| 82 | #define BEZFONT_LOADER_CLASS_ID 0x001000
|
---|
| 83 | #define ATMOSPHERIC_CLASS_ID 0x001010
|
---|
| 84 | #define UTILITY_CLASS_ID 0x001020 // Utility plug-ins
|
---|
| 85 |
|
---|
| 86 | // Super-class ID's of various controls
|
---|
| 87 | #define CTRL_SHORT_CLASS_ID 0x9001
|
---|
| 88 | #define CTRL_INTEGER_CLASS_ID 0x9002
|
---|
| 89 | #define CTRL_FLOAT_CLASS_ID 0x9003
|
---|
| 90 | #define CTRL_POINT2_CLASS_ID 0x9004
|
---|
| 91 | #define CTRL_POINT3_CLASS_ID 0x9005
|
---|
| 92 | #define CTRL_POS_CLASS_ID 0x9006
|
---|
| 93 | #define CTRL_QUAT_CLASS_ID 0x9007
|
---|
| 94 | #define CTRL_MATRIX3_CLASS_ID 0x9008
|
---|
| 95 | #define CTRL_COLOR_CLASS_ID 0x9009 // float color
|
---|
| 96 | #define CTRL_COLOR24_CLASS_ID 0x900A // 24 bit color
|
---|
| 97 | #define CTRL_POSITION_CLASS_ID 0x900B
|
---|
| 98 | #define CTRL_ROTATION_CLASS_ID 0x900C
|
---|
| 99 | #define CTRL_SCALE_CLASS_ID 0x900D
|
---|
| 100 | #define CTRL_MORPH_CLASS_ID 0x900E
|
---|
| 101 | #define CTRL_USERTYPE_CLASS_ID 0x900F // User defined type
|
---|
| 102 |
|
---|
| 103 | // Class ID's of built-in classes. The value is the first ULONG of the
|
---|
| 104 | // 8 byte Class ID: the second ULONG is 0 for all built-in classes.
|
---|
| 105 | // NOTE: Only built-in classes should have the second ULONG == 0.
|
---|
| 106 |
|
---|
| 107 | //--------------------- subclasses of GEOMOBJECT_CLASS_ID:
|
---|
| 108 |
|
---|
| 109 | // Built into CORE
|
---|
| 110 | #define TRIOBJ_CLASS_ID 0x0009
|
---|
| 111 | #define PATCHOBJ_CLASS_ID 0x1030
|
---|
| 112 | #define NURBSOBJ_CLASS_ID 0x4135
|
---|
| 113 |
|
---|
| 114 | // Primitives
|
---|
| 115 | #define BOXOBJ_CLASS_ID 0x0010
|
---|
| 116 | #define SPHERE_CLASS_ID 0x0011
|
---|
| 117 | #define CYLINDER_CLASS_ID 0x0012
|
---|
| 118 | #define CONE_CLASS_ID 0xa86c23dd
|
---|
| 119 | #define TORUS_CLASS_ID 0x0020
|
---|
| 120 | #define TUBE_CLASS_ID 0x7B21
|
---|
| 121 | #define HEDRA_CLASS_ID 0xf21c5e23
|
---|
| 122 |
|
---|
| 123 | // The teapot is unique in that it uses both DWORDs in its class IDs
|
---|
| 124 | // Note that this is what 3rd party plug-ins SHOULD do.
|
---|
| 125 | #define TEAPOT_CLASS_ID1 0xACAD13D3
|
---|
| 126 | #define TEAPOT_CLASS_ID2 0xACAD26D9
|
---|
| 127 |
|
---|
| 128 | #define PATCHGRID_CLASS_ID 0x1070
|
---|
| 129 |
|
---|
| 130 | // Particles
|
---|
| 131 | #define RAIN_CLASS_ID 0x9bd61aa0
|
---|
| 132 | #define SNOW_CLASS_ID 0x9bd61aa1
|
---|
| 133 |
|
---|
| 134 | // Space Warp Objects
|
---|
| 135 | #define WAVEOBJ_CLASS_ID 0x0013
|
---|
| 136 |
|
---|
| 137 | // The basic lofter class
|
---|
| 138 | #define LOFTOBJ_CLASS_ID 0x1035
|
---|
| 139 | #define LOFT_DEFCURVE_CLASS_ID 0x1036
|
---|
| 140 |
|
---|
| 141 | // Our implementation of the lofter
|
---|
| 142 | #define LOFT_GENERIC_CLASS_ID 0x10B0
|
---|
| 143 |
|
---|
| 144 | #define TARGET_CLASS_ID 0x1020 // should this be a helper?
|
---|
| 145 | #define MORPHOBJ_CLASS_ID 0x1021
|
---|
| 146 |
|
---|
| 147 | // Subclasses of SHAPE_CLASS_ID
|
---|
| 148 | #define SPLINESHAPE_CLASS_ID 0x00000a
|
---|
| 149 | #define LINEARSHAPE_CLASS_ID 0x0000aa
|
---|
| 150 | #define SPLINE3D_CLASS_ID 0x1040
|
---|
| 151 | #define NGON_CLASS_ID 0x1050
|
---|
| 152 | #define DONUT_CLASS_ID 0x1060
|
---|
| 153 | #define STAR_CLASS_ID 0x1995
|
---|
| 154 | #define RECTANGLE_CLASS_ID 0x1065
|
---|
| 155 | #define HELIX_CLASS_ID 0x1994
|
---|
| 156 | #define ELLIPSE_CLASS_ID 0x1097
|
---|
| 157 | #define CIRCLE_CLASS_ID 0x1999
|
---|
| 158 | #define TEXT_CLASS_ID 0x1993
|
---|
| 159 | #define ARC_CLASS_ID 0x1996
|
---|
| 160 |
|
---|
| 161 | // subclasses of CAMERA_CLASS_ID:
|
---|
| 162 | #define SIMPLE_CAM_CLASS_ID 0x1001
|
---|
| 163 | #define LOOKAT_CAM_CLASS_ID 0x1002
|
---|
| 164 |
|
---|
| 165 | // subclasses of LIGHT_CLASS_ID:
|
---|
| 166 | #define OMNI_LIGHT_CLASS_ID 0x1011
|
---|
| 167 | #define SPOT_LIGHT_CLASS_ID 0x1012
|
---|
| 168 | #define DIR_LIGHT_CLASS_ID 0x1013
|
---|
| 169 | #define FSPOT_LIGHT_CLASS_ID 0x1014
|
---|
| 170 |
|
---|
| 171 | // subclasses of HELPER_CLASS_ID
|
---|
| 172 | #define DUMMY_CLASS_ID 0x876234
|
---|
| 173 | #define BONE_CLASS_ID 0x8a63c0
|
---|
| 174 | #define TAPEHELP_CLASS_ID 0x02011
|
---|
| 175 | #define GRIDHELP_CLASS_ID 0x02010
|
---|
| 176 | #define POINTHELP_CLASS_ID 0x02013
|
---|
| 177 |
|
---|
| 178 | //subclasses of UVGEN_CLASS_ID
|
---|
| 179 | #define STDUV_CLASS_ID 0x0000100
|
---|
| 180 |
|
---|
| 181 | //subclasses of XYZGEN_CLASS_ID
|
---|
| 182 | #define STDXYZ_CLASS_ID 0x0000100
|
---|
| 183 |
|
---|
| 184 | //subclasses of TEXOUT_CLASS_ID
|
---|
| 185 | #define STDTEXOUT_CLASS_ID 0x0000100
|
---|
| 186 |
|
---|
| 187 | // subclasses of MATERIAL_CLASS_ID
|
---|
| 188 | #define CMTL_CLASS_ID 0x0000100 // top-bottom material
|
---|
| 189 | #define MULTI_CLASS_ID 0x0000200 // multi material
|
---|
| 190 | #define DOUBLESIDED_CLASS_ID 0x0000210 // double-sided mtl
|
---|
| 191 | #define MIXMAT_CLASS_ID 0x0000250 // blend mtl
|
---|
| 192 |
|
---|
| 193 | // subclasses of TEXMAP_CLASS_ID
|
---|
| 194 | #define CHECKER_CLASS_ID 0x0000200
|
---|
| 195 | #define MARBLE_CLASS_ID 0x0000210
|
---|
| 196 | #define MASK_CLASS_ID 0x0000220 // mask texture
|
---|
| 197 | #define MIX_CLASS_ID 0x0000230
|
---|
| 198 | #define NOISE_CLASS_ID 0x0000234
|
---|
| 199 | #define GRADIENT_CLASS_ID 0x0000270
|
---|
| 200 | #define TINT_CLASS_ID 0x0000224 // Tint texture
|
---|
| 201 | #define BMTEX_CLASS_ID 0x0000240 // Bitmap texture
|
---|
| 202 | #define ACUBIC_CLASS_ID 0x0000250 // Reflect/refract
|
---|
| 203 | #define MIRROR_CLASS_ID 0x0000260 // Flat mirror
|
---|
| 204 | #define COMPOSITE_CLASS_ID 0x0000280 // Composite texture
|
---|
| 205 |
|
---|
| 206 | // subclasses of RENDERER_CLASS_ID
|
---|
| 207 | #define SREND_CLASS_ID 0x000001 // default scan-line renderer
|
---|
| 208 |
|
---|
| 209 | // subclasses of REF_MAKER_CLASS_ID
|
---|
| 210 | #define MTL_LIB_CLASS_ID 0x001111
|
---|
| 211 | #define MTLBASE_LIB_CLASS_ID 0x003333
|
---|
| 212 | #define THE_SCENE_CLASS_ID 0x002222
|
---|
| 213 | #define MEDIT_CLASS_ID 0x000C80
|
---|
| 214 |
|
---|
| 215 | // subclass of all classes
|
---|
| 216 | #define STANDIN_CLASS_ID 0xffffffff // subclass of all super classes
|
---|
| 217 |
|
---|
| 218 | // Default material class
|
---|
| 219 | #define DMTL_CLASS_ID 0x000002
|
---|
| 220 |
|
---|
| 221 | // Default sound object
|
---|
| 222 | #define DEF_SOUNDOBJ_CLASS_ID 0x0000001
|
---|
| 223 |
|
---|
| 224 | // Default atmosphere
|
---|
| 225 | #define FOG_CLASS_ID 0x10000001
|
---|
| 226 |
|
---|
| 227 | //------------------ Modifier sub classes --------
|
---|
| 228 | #define SKEWOSM_CLASS_ID 0x6f3cc2aa
|
---|
| 229 | #define BENDOSM_CLASS_ID 0x00010
|
---|
| 230 | #define TAPEROSM_CLASS_ID 0x00020
|
---|
| 231 | #define TWISTOSM_CLASS_ID 0x00090
|
---|
| 232 |
|
---|
| 233 | #define UVWMAPOSM_CLASS_ID 0xf72b1
|
---|
| 234 | #define SELECTOSM_CLASS_ID 0xf8611
|
---|
| 235 | #define MATERIALOSM_CLASS_ID 0xf8612
|
---|
| 236 | #define SMOOTHOSM_CLASS_ID 0xf8613
|
---|
| 237 | #define NORMALOSM_CLASS_ID 0xf8614
|
---|
| 238 | #define OPTIMIZEOSM_CLASS_ID 0xc4d31
|
---|
| 239 |
|
---|
| 240 | #define EXTRUDEOSM_CLASS_ID 0x000A0
|
---|
| 241 | #define SURFREVOSM_CLASS_ID 0x000B0
|
---|
| 242 |
|
---|
| 243 | #define DISPLACEOSM_CLASS_ID 0xc4d32
|
---|
| 244 | #define DISPLACE_OBJECT_CLASS_ID 0xe5240
|
---|
| 245 | #define DISPLACE_WSM_CLASS_ID 0xe5241
|
---|
| 246 |
|
---|
| 247 | #define SINEWAVE_OBJECT_CLASS_ID 0x00030
|
---|
| 248 | #define SINEWAVE_CLASS_ID 0x00040
|
---|
| 249 | #define SINEWAVE_OMOD_CLASS_ID 0x00045
|
---|
| 250 | #define LINWAVE_OBJECT_CLASS_ID 0x00035
|
---|
| 251 | #define LINWAVE_CLASS_ID 0x00042
|
---|
| 252 | #define LINWAVE_OMOD_CLASS_ID 0x00047
|
---|
| 253 |
|
---|
| 254 | #define GRAVITYOBJECT_CLASS_ID 0xe523c
|
---|
| 255 | #define GRAVITYMOD_CLASS_ID 0xe523d
|
---|
| 256 | #define WINDOBJECT_CLASS_ID 0xe523e
|
---|
| 257 | #define WINDMOD_CLASS_ID 0xe523f
|
---|
| 258 |
|
---|
| 259 | #define DEFLECTOBJECT_CLASS_ID 0xe5242
|
---|
| 260 | #define DEFLECTMOD_CLASS_ID 0xe5243
|
---|
| 261 |
|
---|
| 262 | #define BOMB_OBJECT_CLASS_ID 0xf2e32
|
---|
| 263 | #define BOMB_CLASS_ID 0xf2e42
|
---|
| 264 |
|
---|
| 265 |
|
---|
| 266 | //------------------ Controller sub classes --------
|
---|
| 267 | #define LININTERP_FLOAT_CLASS_ID 0x2001
|
---|
| 268 | #define LININTERP_POSITION_CLASS_ID 0x2002
|
---|
| 269 | #define LININTERP_ROTATION_CLASS_ID 0x2003
|
---|
| 270 | #define LININTERP_SCALE_CLASS_ID 0x2004
|
---|
| 271 | #define PRS_CONTROL_CLASS_ID 0x2005
|
---|
| 272 | #define LOOKAT_CONTROL_CLASS_ID 0x2006
|
---|
| 273 |
|
---|
| 274 | #define HYBRIDINTERP_FLOAT_CLASS_ID 0x2007
|
---|
| 275 | #define HYBRIDINTERP_POSITION_CLASS_ID 0x2008
|
---|
| 276 | #define HYBRIDINTERP_ROTATION_CLASS_ID 0x2009
|
---|
| 277 | #define HYBRIDINTERP_POINT3_CLASS_ID 0x200A
|
---|
| 278 | #define HYBRIDINTERP_SCALE_CLASS_ID 0x2010
|
---|
| 279 | #define HYBRIDINTERP_COLOR_CLASS_ID 0x2011
|
---|
| 280 |
|
---|
| 281 | #define TCBINTERP_FLOAT_CLASS_ID 0x442311
|
---|
| 282 | #define TCBINTERP_POSITION_CLASS_ID 0x442312
|
---|
| 283 | #define TCBINTERP_ROTATION_CLASS_ID 0x442313
|
---|
| 284 | #define TCBINTERP_POINT3_CLASS_ID 0x442314
|
---|
| 285 | #define TCBINTERP_SCALE_CLASS_ID 0x442315
|
---|
| 286 |
|
---|
| 287 |
|
---|
| 288 | //--------------------------------------------------
|
---|
| 289 |
|
---|
| 290 |
|
---|
| 291 | class ISave;
|
---|
| 292 | class ILoad;
|
---|
| 293 | class Interface;
|
---|
| 294 |
|
---|
| 295 | // System keepsa list of the DLL's found on startup.
|
---|
| 296 | // This is the interface to a single class
|
---|
| 297 | class ClassDesc {
|
---|
| 298 | public:
|
---|
| 299 | virtual int IsPublic()=0; // Show this in create branch?
|
---|
| 300 | virtual void * Create(BOOL loading=FALSE)=0; // return a pointer to an instance of the class.
|
---|
| 301 | virtual int BeginCreate(Interface *i) {return 0;}
|
---|
| 302 | virtual int EndCreate(Interface *i) {return 0;};
|
---|
| 303 | virtual const TCHAR* ClassName()=0;
|
---|
| 304 | virtual SClass_ID SuperClassID()=0;
|
---|
| 305 | virtual Class_ID ClassID()=0;
|
---|
| 306 | virtual const TCHAR* Category()=0; // primitive/spline/loft/ etc
|
---|
| 307 | virtual BOOL OkToCreate(Interface *i) { return TRUE; } // return FALSE to disable create button
|
---|
| 308 | virtual BOOL HasClassParams() {return FALSE;}
|
---|
| 309 | virtual void EditClassParams(HWND hParent) {}
|
---|
| 310 | virtual void ResetClassParams(BOOL fileReset=FALSE) {}
|
---|
| 311 | // Class IO
|
---|
| 312 | virtual BOOL NeedsToSave() { return FALSE; }
|
---|
| 313 | virtual IOResult Save(ISave *isave) { return IO_OK; }
|
---|
| 314 | virtual IOResult Load(ILoad *iload) { return IO_OK; }
|
---|
| 315 |
|
---|
| 316 | };
|
---|
| 317 |
|
---|
| 318 | // Create instance of the specified class
|
---|
| 319 | CoreExport void *CreateInstance(SClass_ID superID, Class_ID classID);
|
---|
| 320 |
|
---|
| 321 | #endif
|
---|