Class FPFunctionDef

3DS Max Plug-In SDK

Class FPFunctionDef

See Also: Class FPInterface, Class FPInterfaceDesc, Class FPActionDef, Class FPParamDef, Template Class Tab, Function Publishing System, List of Param Type Choices , List of ParamType2 Choices.

class FPFunctionDef

Description:

This class is available in release 4.0 and later only.

This class stores data about a single function of an FPInterface. A table of pointers to these objects is a data member of Class FPInterfaceDesc.

Data Members:

public:

FunctionID ID;

The interface-local ID (unique to the interface only) used to identify the function in calls.

TSTR internal_name;

The fixed internal name for the function.

StringResID description;

The description string resource.

USHORT flags;

The internal flag bits. One of more of the following values:

FP_ACTION

Indicates this is an action function.

FP_HAS_UI

Indicates the action has UI specified.

FP_ICONRES

Indicates icon via resource ID.

FP_ICONFILE

Indicates icon via bmp file + index.

FP_HAS_SHORTCUT

Indicates has default keyboard shortcut.

FP_HAS_KEYARGS

Indicates function has some optional keyword args defined.

FP_VAR_ARGS

Indicates a variable number of args, pass args directly in a FPParams instance.

FP_NO_REDRAW

Do not flag need for viewport redraw when function is invoked, MAXScript defaults to flag redraw.

ParamType2 result_type;

The type of value returned by the function.

EnumID enumID;

The ID of symbolic enumeration in owning interface if any.

FPActionDef* action_def;

The extra metadata if function in an Action interface.

Tab<FPParamDef*> params;

The descriptors for parameters to this function.

Methods:

public:

Prototype:

FPFunctionDef();

Remarks:

Constructor.  The data members are initialized as follows:

flags = 0; description = 0; action_def = NULL; enumID = FP_NO_ENUM;