The type codes you can use to specify function return types or argument types are defined by the ParamType2 enumeration in \include\paramtype.h. Several of the type codes map to the same underlying C++ type, for example there are five float types. In most cases, the alternate codes imply different UI scaling Dimensions that are honored by systems like MAXScript. For example, using TYPE_ANGLE will cause MAXScript to convert back and forth between radians internally and degrees to the user, so you should use the most specific type code.
As you can see from the list below, all the values are pointer-sized or smaller, so they fit in a single pointer-sized union in an FPValue. This means any object larger than a pointer is normally passed by reference. To support passing and returning by-value, a variant set of types is provided that take local copies of the object; they have an _BV suffix in the type code name. This local copy is freed in the destructor of FPValue, so FPValues of these types effectively have the semantics of pass-by-value. Typically, you would use these by-value types for returning values that have been created locally in the called function, Point3s, strings, etc. All Tab<> types take a local copy of the table. All the reftarg types (Mtl*, INode*, Texmap*) are passed only as pointers, no attempt is made to keep local references in the FPValue or FPParam instances.
Built in data types (enum ParamType2)
The following are only for published function parameter types, not pblock2 parameter types.
The following are tables of the above data types (in the same order as base types).
The following are only for published function parameter types, not pblock2 parameter types.
TYPE_ENUM_TAB, TYPE_VOID_TAB, TYPE_INTERVAL_TAB, TYPE_ANGAXIS_TAB, TYPE_QUAT_TAB, TYPE_RAY_TAB, TYPE_POINT2_TAB, TYPE_BITARRAY_TAB, TYPE_CLASS_TAB, TYPE_MESH_TAB, TYPE_OBJECT_TAB, TYPE_CONTROL_TAB, TYPE_POINT_TAB, TYPE_TSTR_TAB, TYPE_IOBJECT_TAB, TYPE_INTERFACE_TAB, TYPE_HWND_TAB, TYPE_NAME_TAB, TYPE_COLOR_TAB, TYPE_FPVALUE_TAB, TYPE_VALUE_TAB, TYPE_DWORD_TAB, TYPE_bool_TAB
The following pass by-ref types, implies & parameters, int& & float& are passed via .ptr fields, only for FnPub use. These are defined as TYPE_xxx + TYPE_BY_REF.
TYPE_FLOAT_BR, TYPE_INT_BR, TYPE_BOOL_BR, TYPE_ANGLE_BR, TYPE_PCNT_FRAC_BR, TYPE_WORLD_BR, TYPE_COLOR_CHANNEL_BR, TYPE_TIMEVALUE_BR, TYPE_RADIOBTN_INDEX_BR, TYPE_INDEX_BR, TYPE_RGBA_BR, TYPE_BITMAP_BR, TYPE_POINT3_BR, TYPE_HSV_BR, TYPE_REFTARG_BR, TYPE_MATRIX3_BR, TYPE_ENUM_BR, TYPE_INTERVAL_BR, TYPE_ANGAXIS_BR, TYPE_QUAT_BR, TYPE_RAY_BR, TYPE_POINT2_BR, TYPE_BITARRAY_BR, TYPE_MESH_BR, TYPE_POINT_BR, TYPE_TSTR_BR, TYPE_COLOR_BR, TYPE_FPVALUE_BR, TYPE_DWORD_BR, TYPE_bool_BR
The following pass by-ref Tab<> types, implies & parameters, int& & float& are passed via .ptr fields, only for FnPub use. These are defined as TYPE_xxx + TYPE_TAB + TYPE_BY_REF.
TYPE_FLOAT_TAB_BR, TYPE_INT_TAB_BR, TYPE_RGBA_TAB_BR, TYPE_POINT3_TAB_BR, TYPE_BOOL_TAB_BR, TYPE_ANGLE_TAB_BR, TYPE_PCNT_FRAC_TAB_BR, TYPE_WORLD_TAB_BR, TYPE_STRING_TAB_BR, TYPE_FILENAME_TAB_BR, TYPE_HSV_TAB_BR, TYPE_COLOR_CHANNEL_TAB_BR, TYPE_TIMEVALUE_TAB_BR, TYPE_RADIOBTN_INDEX_TAB_BR, TYPE_MTL_TAB_BR, TYPE_TEXMAP_TAB_BR, TYPE_BITMAP_TAB_BR, TYPE_INODE_TAB_BR, TYPE_REFTARG_TAB_BR, TYPE_INDEX_TAB_BR, TYPE_MATRIX3_TAB_BR, TYPE_TSTR_TAB_BR, TYPE_ENUM_TAB_BR, TYPE_INTERVAL_TAB_BR, TYPE_ANGAXIS_TAB_BR, TYPE_QUAT_TAB_BR, TYPE_RAY_TAB_BR, TYPE_POINT2_TAB_BR, TYPE_BITARRAY_TAB_BR, TYPE_CLASS_TAB_BR, TYPE_MESH_TAB_BR, TYPE_OBJECT_TAB_BR, TYPE_CONTROL_TAB_BR, TYPE_POINT_TAB_BR, TYPE_IOBJECT_TAB_BR, TYPE_INTERFACE_TAB_BR, TYPE_HWND_TAB_BR, TYPE_NAME_TAB_BR, TYPE_COLOR_TAB_BR, TYPE_FPVALUE_TAB_BR, TYPE_VALUE_TAB_BR, TYPE_DWORD_TAB_BR, TYPE_bool_TAB_BR
The following pass by-value types, implies dereferencing the (meaningful) pointer-based values, only for FnPub use. These are defined as TYPE_xxx + TYPE_BY_VAL.
TYPE_RGBA_BV, TYPE_POINT3_BV, TYPE_HSV_BV, TYPE_INTERVAL_BV, TYPE_BITMAP_BV, TYPE_MATRIX3_BV, TYPE_ANGAXIS_BV, TYPE_QUAT_BV, TYPE_RAY_BV, TYPE_POINT2_BV, TYPE_BITARRAY_BV, TYPE_MESH_BV, TYPE_POINT_BV, TYPE_TSTR_BV, TYPE_COLOR_BV, TYPE_FPVALUE_BV, TYPE_CLASS_BV
The following pass by-value Tab<> types, implies dereferencing the (meaningful) pointer-based values, only for FnPub use. These are defined as TYPE_xxx + TYPE_TAB + TYPE_BY+VAL.
TYPE_FLOAT_TAB_BV, TYPE_INT_TAB_BV, TYPE_RGBA_TAB_BV, TYPE_POINT3_TAB_BV, TYPE_BOOL_TAB_BV, TYPE_ANGLE_TAB_BV, TYPE_PCNT_FRAC_TAB_BV, TYPE_WORLD_TAB_BV, TYPE_STRING_TAB_BV, TYPE_FILENAME_TAB_BV, TYPE_HSV_TAB_BV, TYPE_COLOR_CHANNEL_TAB_BV, TYPE_TIMEVALUE_TAB_BV, TYPE_RADIOBTN_INDEX_TAB_BV, TYPE_MTL_TAB_BV, TYPE_TEXMAP_TAB_BV, TYPE_BITMAP_TAB_BV, TYPE_INODE_TAB_BV, TYPE_REFTARG_TAB_BV, TYPE_INDEX_TAB_BV, TYPE_MATRIX3_TAB_BV, TYPE_PBLOCK2_TAB_BV, TYPE_VOID_TAB_BV, TYPE_TSTR_TAB_BV, TYPE_ENUM_TAB_BV, TYPE_INTERVAL_TAB_BV, TYPE_ANGAXIS_TAB_BV, TYPE_QUAT_TAB_BV, TYPE_RAY_TAB_BV, TYPE_POINT2_TAB_BV, TYPE_BITARRAY_TAB_BV, TYPE_CLASS_TAB_BV, TYPE_MESH_TAB_BV, TYPE_OBJECT_TAB_BV, TYPE_CONTROL_TAB_BV, TYPE_POINT_TAB_BV, TYPE_IOBJECT_TAB_BV, TYPE_INTERFACE_TAB_BV, TYPE_HWND_TAB_BV, TYPE_NAME_TAB_BV, TYPE_COLOR_TAB_BV, TYPE_FPVALUE_TAB_BV, TYPE_VALUE_TAB_BV, TYPE_DWORD_TAB_BV, TYPE_bool_TAB_BV
The following pass by-pointer types for int & float types, implies * parameters, int* & float* are passed via .ptr fields, only for FnPub use. These are defined as TYPE_xxx + TYPE_BY_PTR.
TYPE_FLOAT_BP, TYPE_INT_BP, TYPE_BOOL_BP, TYPE_ANGLE_BP, TYPE_PCNT_FRAC_BP, TYPE_WORLD_BP, TYPE_COLOR_CHANNEL_BP, TYPE_TIMEVALUE_BP, TYPE_RADIOBTN_INDEX_BP, TYPE_INDEX_BP, TYPE_ENUM_BP, TYPE_DWORD_BP, TYPE_bool_BP
There are no specific by-pointer Tab<> types, all Tab<> types are by-pointer by default.