Class FPInterface

3DS Max Plug-In SDK

Class FPInterface (and Class FPMixinInterface)

See Also: Class BaseInterface, Class ClassDesc, Class FPInterfaceDesc, Class Interface_ID, Class ActionTable, List of FPStatus Values, Function Publishing System.

class FPInterface : public BaseInterface

Description:

This class is available in release 4.0 and later only.

The Function Publishing system makes use of this class. Functions are published in one or more Interfaces by a plug-in. Each interface is represented by an instance of a class derived from this base class.

Note that the Function Publishing class hierarchy is as follows:

FPInterface: This is the base class for all interfaces, the prime client type for using interfaces.

FPInterfaceDesc: This is the class which contains interface metadata.

FPStaticInterface: This is the class to use as the base class for defining static or core virtual interface classes.

FPMixinInterface: This is for use as the base class for defining object-based mixin interface classes, in this case you also use FPInterfaceDesc for mixin interface descriptors.

Methods:

public:

Prototype:

virtual FPInterfaceDesc* GetDesc() = 0;

Remarks:

Returns a pointer to the class which contains the interface = 4) BSPSPopupOnMouseOver(event);;">metadata.

Prototype:

virtual FPStatus Invoke(FunctionID fid, TimeValue t=0, FPParams* params=NULL);

Remarks:

 

Parameters:

FunctionID fid

The function ID of the function to invoke.

TimeValue t=0

The timevalue at which to invoke the function.

FPParams* params=NULL

The FPParams to pass.

Return Value:

The FPStatus. See the List of FPStatus Values for details

Prototype:

virtual inline FPStatus Invoke(FunctionID fid, FPParams* params);

Remarks:

This method will invoke the specified function.

Parameters:

FunctionID fid

The function ID of the function to invoke.

FPParams* params

The FPParams to pass.

Return Value:

The FPStatus. See the List of FPStatus Values for details

Prototype:

virtual FPStatus Invoke(FunctionID fid, TimeValue t, FPValue& result, FPParams* params=NULL);

Remarks:

This method will invoke the specified function.

Parameters:

FunctionID fid

The function ID of the function to invoke.

TimeValue t

The timevalue at which to invoke the function.

FPValue& result

A reference to the resulting FPValue.

FPParams* params=NULL

The FPParams to pass.

Return Value:

The FPStatus. See the List of FPStatus Values for details

Prototype:

virtual inline FPStatus Invoke(FunctionID fid, FPValue& result, FPParams* params=NULL);

Remarks:

This method will invoke the specified function.

Parameters:

FunctionID fid

The function ID of the function to invoke.

FPValue& result

A reference to the resulting FPValue.

FPParams* params=NULL

The FPParams to pass.

Return Value:

The FPStatus. See the List of FPStatus Values for details

Prototype:

virtual FunctionID FindFn(TCHAR* name);

Remarks:

This method returns a function ID based on the name of the function specified.

Parameters:

TCHAR* name

The name of the function to retrieve the Function ID for.

Prototype:

virtual BOOL IsEnabled(FunctionID actionID);

Remarks:

This method allows you to check whether a specific action function is enabled, in which case the method will return TRUE. If the action function is not enabled FALSE will be returned.

Parameters:

FunctionID actionID

The function ID of the action you wish to check the enabled state for.

Prototype:

virtual BOOL IsChecked(FunctionID actionID);

Remarks:

This method allows you to check whether a specific action function is checked, in which case the method will return TRUE. If the action function is not checked FALSE will be returned.

Parameters:

FunctionID actionID

The function ID of the action you wish to check the checked state for.

Prototype:

virtual BOOL IsVisible(FunctionID actionID);

Remarks:

This method allows you to check whether a specific action function is visible, in which case the method will return TRUE. If the action function is not visible FALSE will be returned.

Parameters:

FunctionID actionID

The function ID of the action you wish to check the visibility state for.

Prototype:

virtual FunctionID GetIsEnabled(FunctionID actionID);

Remarks:

This method will return the isEnabled ID for the specified action function.

Parameters:

FunctionID actionID

The function ID of the action you wish to get the isEnabled ID for.

Prototype:

virtual FunctionID GetIsChecked(FunctionID actionID);

Remarks:

This method will return the isChecked ID for the specified action function.

Parameters:

FunctionID actionID

The function ID of the action you wish to get the isChecked ID for.

Prototype:

virtual FunctionID GetIsVisible(FunctionID actionID);

Remarks:

This method will return the isVisible ID for the specified action function.

Parameters:

FunctionID actionID

The function ID of the action you wish to get the isVisible ID for.

Prototype:

virtual bool Acquire(FPInterfaceCallback* fpicb=NULL);

Remarks:

This method is called when MAXScript makes a reference to this object. Call this method with a non-NULL FPInterfaceCallback so the interface can signal deletion (usually a mixin).

Parameters:

FPInterfaceCallback* fpicb=NULL

A pointer to an FPInterfaceCallback class.

Return Value:

This method should return TRUE if it needs Release() called.

Default Implementation:

{ return false; }

Prototype:

virtual void Release(FPInterfaceCallback* fpicb=NULL);

Remarks:

This method is called when MAXScript deletes a reference to this object.

Parameters:

FPInterfaceCallback* fpicb=NULL

A pointer to an FPInterfaceCallback class.

Default Implementation:

{ }

Prototype:

virtual ActionTable* GetActionTable();

Remarks:

This method returns a pointer to the ActionTable.

Default Implementation:

{ return NULL; }

Prototype:

virtual void EnableActions(BOOL onOff);

Remarks:

This method allows you to enable or disable the entire set of actions in the interface You might want to use this method if the actions are only to be active during certain periods in the running of 3ds max. Usually, this control is achieved via ActionTable contexts.

Parameters:

BOOL onOff

TRUE to enable actions, FALSE to disable them.

Default Implementation:

{ }