📄 plugapi.h
字号:
/*******************************************************************
*
* DESCRIPTION: DLL Plugin API
*
* AUTHOR: Dan Silva
*
* HISTORY: 11/30/94 Started coding
*
*******************************************************************/
#include "maxtypes.h"
#ifndef PLUGAPI_H_DEFINED
#define PLUGAPI_H_DEFINED
// 3DSMAX Version number to be compared against that returned by DLL's
// LibVersion function to detect obsolete DLLs.
//#define VERSION_3DSMAX 100 // changed 4/ 9/96 -- DB
//#define VERSION_3DSMAX 110 // changed 7/17/96 -- DS
//#define VERSION_3DSMAX 111 // changed 9/24/96 -- DS
//#define VERSION_3DSMAX 120 // changed 9/30/96 -- DB
//#define VERSION_3DSMAX 200 // changed 10/30/96 -- DS
// MAX release number X 1000
//#define MAX_RELEASE 2000 // DDS 9/30/97
//#define MAX_RELEASE 2500 // JMK 2/25/98
//#define MAX_RELEASE 3000 // DDS 9/3/98
#define MAX_RELEASE 3100 // CCJ 10/21/99
// This is the max API number. When a change in the API requires DLL's
// to be recompiled, increment this number and set MAX_SDK_REV to 0
// THis will make all DLL's with the former MAX_API_NUM unloadable.
//#define MAX_API_NUM 4 // DDS 9/30/97
//#define MAX_API_NUM 5 // DDS 10/06/97
//#define MAX_API_NUM 6 // DDS 9/3/98
#define MAX_API_NUM 7 // CCJ 5/14/99
// This denotes the revision of the SDK for a given API. Increment this
// when the SDK functionality changes in some significant way (for instance
// a new GetProperty() query response is added), but the headers have
// not been changed.
#define MAX_SDK_REV 0 // DDS 9/20/97
// This value should be returned by the LibVersion() method for DLL's:
#define VERSION_3DSMAX ((MAX_RELEASE<<16)+(MAX_API_NUM<<8)+MAX_SDK_REV)
#ifdef DESIGN_VER
#define VERSION_DMAX ((MAX_RELEASE<<16)+(MAX_API_NUM<<8)+MAX_SDK_REV)
#endif
typedef enum {kAPP_NONE, kAPP_MAX, kAPP_VIZ} APPLICATION_ID;
//This method returns the ApplicationID, either VIZ or MAX. If a plugin
//is designed to work only in one product, then you could use this method
//in your IsPublic() call to switch between exposing the plug-in or not.
CoreExport APPLICATION_ID GetAppID();
// Macros for extracting parts of VERSION_3DSMAX
#define GET_MAX_RELEASE(x) (((x)>>16)&0xffff)
#define GET_MAX_API_NUM(x) (((x)>>8)&0xff)
#define GET_MAX_SDK_REV(x) ((x)&0xff)
#define GET_MAX_SDK_NUMREV(x) ((x)&0xffff)
// Internal super classes, that plug-in developers need not know about
#define GEN_MODAPP_CLASS_ID 0x00000b
#define MODAPP_CLASS_ID 0x00000c
#define OBREF_MODAPP_CLASS_ID 0x00000d
#define BASENODE_CLASS_ID 0x000001
#define GEN_DERIVOB_CLASS_ID 0x000002
#define DERIVOB_CLASS_ID 0x000003
#define WSM_DERIVOB_CLASS_ID 0x000004
#define PARAMETER_BLOCK_CLASS_ID 0x000008
#define PARAMETER_BLOCK2_CLASS_ID 0x000082 // <JBW> ParamBlocks Ed. 2
#define EASE_LIST_CLASS_ID 0x000009
#define AXIS_DISPLAY_CLASS_ID 0x00000e
#define MULT_LIST_CLASS_ID 0x00000f
#define NOTETRACK_CLASS_ID 0x0000ff
#define TREE_VIEW_CLASS_ID 0xffffff00
#define SCENE_CLASS_ID 0xfffffd00
#define THE_GRIDREF_CLASS_ID 0xfffffe00
#define VIEWREF_CLASS_ID 0xffffff01
#define BITMAPDAD_CLASS_ID 0xffffff02 // for drag/drop of bitmaps
#define PARTICLE_SYS_CLASS_ID 0xffffff03 // NOTE: this is for internal use only. Particle systems return GEOMOBJECT_CLASS_ID -- use IsParticleObject() to determine if an object is a particle system.
#define XREF_CLASS_ID 0xffffff04 // Object XRefs
#define AGGMAN_CLASS_ID 0xffffff05 // Object aggregation, VIZ
#define MAXSCRIPT_WRAPPER_CLASS_ID 0xffffff06 // JBW, 5/14/99, MAX object wrappers within MAXScript
//-------------------------------------------
// Deformable object psuedo-super-class
#define DEFORM_OBJ_CLASS_ID 0x000005
//-------------------------------------------
// Mappable object psuedo-super-class
#define MAPPABLE_OBJ_CLASS_ID 0x000006
//-------------------------------------------
// Shape psuedo-super-class
#define GENERIC_SHAPE_CLASS_ID 0x0000ab
//-------------------------------------------
// Super-classes that are plugable.
#define GEOMOBJECT_CLASS_ID 0x000010
#define CAMERA_CLASS_ID 0x000020
#define LIGHT_CLASS_ID 0x000030
#define SHAPE_CLASS_ID 0x000040
#define HELPER_CLASS_ID 0x000050
#define SYSTEM_CLASS_ID 0x000060
#define REF_MAKER_CLASS_ID 0x000100
#define REF_TARGET_CLASS_ID 0x000200
#define OSM_CLASS_ID 0x000810
#define WSM_CLASS_ID 0x000820
#define WSM_OBJECT_CLASS_ID 0x000830
#define SCENE_IMPORT_CLASS_ID 0x000A10
#define SCENE_EXPORT_CLASS_ID 0x000A20
#define BMM_STORAGE_CLASS_ID 0x000B10
#define BMM_FILTER_CLASS_ID 0x000B20
#define BMM_IO_CLASS_ID 0x000B30
#define BMM_DITHER_CLASS_ID 0x000B40
#define BMM_COLORCUT_CLASS_ID 0x000B50
#define USERDATATYPE_CLASS_ID 0x000B60
#define MATERIAL_CLASS_ID 0x000C00 // Materials
#define TEXMAP_CLASS_ID 0x000C10 // Texture maps
#define UVGEN_CLASS_ID 0x0000C20 // UV Generator
#define XYZGEN_CLASS_ID 0x0000C30 // XYZ Generator
#define TEXOUTPUT_CLASS_ID 0x0000C40 // Texture output filter
#define SOUNDOBJ_CLASS_ID 0x000D00
#define FLT_CLASS_ID 0x000E00
#define RENDERER_CLASS_ID 0x000F00
#define BEZFONT_LOADER_CLASS_ID 0x001000
#define ATMOSPHERIC_CLASS_ID 0x001010
#define UTILITY_CLASS_ID 0x001020 // Utility plug-ins
#define TRACKVIEW_UTILITY_CLASS_ID 0x001030
#define FRONTEND_CONTROL_CLASS_ID 0x001040
#define MOT_CAP_DEV_CLASS_ID 0x001060
#define MOT_CAP_DEVBINDING_CLASS_ID 0x001050
#define OSNAP_CLASS_ID 0x001070
#define TEXMAP_CONTAINER_CLASS_ID 0x001080 // Texture map container
#define RENDER_EFFECT_CLASS_ID 0x001090 // Render post-effects
#define FILTER_KERNEL_CLASS_ID 0x0010a0 // AA Filter kernel
#define SHADER_CLASS_ID 0x0010b0 // plugable shading into stdmtl
#define COLPICK_CLASS_ID 0x0010c0 // color picker
#define SHADOW_TYPE_CLASS_ID 0x0010d0 // shadow generators
//-- GUPSTART
#define GUP_CLASS_ID 0x0010e0 // Global Utility Plug-In
//-- GUPEND
#define LAYER_CLASS_ID 0x0010f0
#define SCHEMATICVIEW_UTILITY_CLASS_ID 0x001100
#define SAMPLER_CLASS_ID 0x001110
#define ASSOC_CLASS_ID 0x001120
#define GLOBAL_ASSOC_CLASS_ID 0x001130
// Super-class ID's of various controls
#define CTRL_SHORT_CLASS_ID 0x9001
#define CTRL_INTEGER_CLASS_ID 0x9002
#define CTRL_FLOAT_CLASS_ID 0x9003
#define CTRL_POINT2_CLASS_ID 0x9004
#define CTRL_POINT3_CLASS_ID 0x9005
#define CTRL_POS_CLASS_ID 0x9006
#define CTRL_QUAT_CLASS_ID 0x9007
#define CTRL_MATRIX3_CLASS_ID 0x9008
#define CTRL_COLOR_CLASS_ID 0x9009 // float color
#define CTRL_COLOR24_CLASS_ID 0x900A // 24 bit color
#define CTRL_POSITION_CLASS_ID 0x900B
#define CTRL_ROTATION_CLASS_ID 0x900C
#define CTRL_SCALE_CLASS_ID 0x900D
#define CTRL_MORPH_CLASS_ID 0x900E
#define CTRL_USERTYPE_CLASS_ID 0x900F // User defined type
#define CTRL_MASTERPOINT_CLASS_ID 0x9010
#define MASTERBLOCK_SUPER_CLASS_ID 0x9011
#define PATH_CONTROL_CLASS_ID 0x2011
#define EULER_CONTROL_CLASS_ID 0x2012
#define EXPR_POS_CONTROL_CLASS_ID 0x2013
#define EXPR_P3_CONTROL_CLASS_ID 0x2014
#define EXPR_FLOAT_CONTROL_CLASS_ID 0x2015
#define EXPR_SCALE_CONTROL_CLASS_ID 0x2016
#define EXPR_ROT_CONTROL_CLASS_ID 0x2017
#define LOCAL_EULER_CONTROL_CLASS_ID 0x2018
#define FLOATNOISE_CONTROL_CLASS_ID 0x87a6df24
#define POSITIONNOISE_CONTROL_CLASS_ID 0x87a6df25
#define POINT3NOISE_CONTROL_CLASS_ID 0x87a6df26
#define ROTATIONNOISE_CONTROL_CLASS_ID 0x87a6df27
#define SCALENOISE_CONTROL_CLASS_ID 0x87a6df28
#define SURF_CONTROL_CLASSID Class_ID(0xe8334011,0xaeb330c8)
#define LINKCTRL_CLASSID Class_ID(0x873fe764,0xaabe8601)
// Class ID's of built-in classes. The value is the first ULONG of the
// 8 byte Class ID: the second ULONG is 0 for all built-in classes.
// NOTE: Only built-in classes should have the second ULONG == 0.
//--------------------- subclasses of GEOMOBJECT_CLASS_ID:
// Built into CORE
#define TRIOBJ_CLASS_ID 0x0009
#define EDITTRIOBJ_CLASS_ID 0xe44f10b3 // base triangle mesh
#define POLYOBJ_CLASS_ID 0x5d21369a // polygon mesh
#define PATCHOBJ_CLASS_ID 0x1030
#define NURBSOBJ_CLASS_ID 0x4135
// Primitives
#define BOXOBJ_CLASS_ID 0x0010
#define SPHERE_CLASS_ID 0x0011
#define CYLINDER_CLASS_ID 0x0012
#define CONE_CLASS_ID 0xa86c23dd
#define TORUS_CLASS_ID 0x0020
#define TUBE_CLASS_ID 0x7B21
#define HEDRA_CLASS_ID 0xf21c5e23
#define BOOLOBJ_CLASS_ID 0x387BB2BB
// Above used in obselete Boolean -- henceforth use following:
#define NEWBOOL_CLASS_ID Class_ID(0x51db4f2f,0x1c596b1a)
// Class ID for XRef object
#define XREFOBJ_CLASS_ID 0x92aab38c
// Class ID for XRef object
#define XREFOBJ_CLASS_ID 0x92aab38c
//Subclasses of object snaps.
#define GRID_OSNAP_CLASS_ID Class_ID(0x62f565d6, 0x110a1f97)
// The teapot is unique in that it uses both DWORDs in its class IDs
// Note that this is what 3rd party plug-ins SHOULD do.
#define TEAPOT_CLASS_ID1 0xACAD13D3
#define TEAPOT_CLASS_ID2 0xACAD26D9
#define PATCHGRID_CLASS_ID 0x1070
// Particles
#define RAIN_CLASS_ID 0x9bd61aa0
#define SNOW_CLASS_ID 0x9bd61aa1
// Space Warp Objects
#define WAVEOBJ_CLASS_ID 0x0013
// The basic lofter class
#define LOFTOBJ_CLASS_ID 0x1035
#define LOFT_DEFCURVE_CLASS_ID 0x1036
// Our implementation of the lofter
#define LOFT_GENERIC_CLASS_ID 0x10B0
#define TARGET_CLASS_ID 0x1020 // should this be a helper?
#define MORPHOBJ_CLASS_ID 0x1021
// Subclasses of SHAPE_CLASS_ID
#define SPLINESHAPE_CLASS_ID 0x00000a
#define LINEARSHAPE_CLASS_ID 0x0000aa
#define SPLINE3D_CLASS_ID 0x1040
#define NGON_CLASS_ID 0x1050
#define DONUT_CLASS_ID 0x1060
#define STAR_CLASS_ID 0x1995
#define RECTANGLE_CLASS_ID 0x1065
#define HELIX_CLASS_ID 0x1994
#define ELLIPSE_CLASS_ID 0x1097
#define CIRCLE_CLASS_ID 0x1999
#define TEXT_CLASS_ID 0x1993
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -