Additional ParamType2 Codes for Function Publishing and MAXScript
 
 
 

ParamType2 Codes

TYPE_FPVALUE    // FPValue*, variant value
TYPE_VALUE     // MAXScript Value*

TYPE_FPVALUE can be used to pass a variant data type, containing one of the types of data that FPValue can hold. This allows a function to be defined that can accept many types of values for a TYPE_FPVALUE parameter, the function can determine the type from the 'type' field in the FPValue passed. MAXScript supports TYPE_PFVALUE parameters and return values and will convert back-and-forth between the MAXScript types that correspond to the various FPValue types. TYPE_FPVALUE also supports TYPE_FPVAUE_BV and TYPE_FPVALUE_BR variants. MAXScript arrays will attempt to convert themselves into TYPE_XXX_TAB FPValues if the array elements are all of the same type, for example all integers generate a TYPE_INT_TAB, all scene nodes generate a TYPE_INODE_TAB, etc. If the array contains mixed value types or types not in the following list, a TYPE_FPVALUE_TAB will be generated, containing an FPValue* variant value for each element in the array. Supported homogeneous types are:

TYPE_INT_TAB
TYPE_FLOAT_TAB
TYPE_TIMEVALUE_TAB
TYPE_STRING_TAB
TYPE_NAME_TAB
TYPE_POINT3_TAB
TYPE_POINT2_TAB
TYPE_INODE_TAB
TYPE_REFTARG_TAB (allother  ReferenceTarget*s, modifiers, mtls, ctlrs, etc.)

TYPE_VALUE is basically a fallback to be used in situations where MAXScript values of types not covered by FPValue types need to be passed into a published function. The called function is responsible for using the MAXScript SDK to convert to and from the Value* in TYPE_VALUE values.