Functions

Core Interface Management

A "core" interface is usually a singleton manager object that can be used by client code without explicitly creating an instance of a plug-in. More...

Functions

CoreExport void  RegisterCOREInterface (FPInterface *fpi)
  Registers a "core" interface with 3ds Max.
CoreExport FPInterface GetCOREInterface (Interface_ID id)
  Retrieves a "core" interface based on a unique id.
CoreExport int  NumCOREInterfaces ()
  Returns the count of "core" interfaces registered with 3ds Max.
CoreExport FPInterface GetCOREInterfaceAt (int i)
  Retrieves a "core" interface based on an index value Note that the order of "core" interfaces is not guaranteed.
CoreExport void  UnregisterCOREInterface (FPInterface *fpi)
  Unregisters a "core" interface previously registered with 3ds Max.

Detailed Description

A "core" interface is usually a singleton manager object that can be used by client code without explicitly creating an instance of a plug-in.

"Core" interfaces are usually exposed to Maxscript and are derived from class FPInterfaceDesc or class FPStaticInterface and use the FP_CORE flag.


Function Documentation

CoreExport void RegisterCOREInterface ( FPInterface fpi )

Registers a "core" interface with 3ds Max.

Plug-ins can register their own "core" interfaces identified by a unique Interface_ID value. In order to register a "core" interface with 3ds Max, it's enough to declare an instance of a FPInterfaceDesc, i.e. plug-ins do not need to call RegisterCOREInterface(FPInterface* fpi). For more details see class FPInterfaceDesc.

Parameters:
fpi - pointer to the "core" interface object or its descriptor
CoreExport FPInterface* GetCOREInterface ( Interface_ID  id )

Retrieves a "core" interface based on a unique id.

Parameters:
id - Unique interface id
Returns:
- Pointer to the corresponding "core" interface
CoreExport int NumCOREInterfaces ( )

Returns the count of "core" interfaces registered with 3ds Max.

CoreExport FPInterface* GetCOREInterfaceAt ( int  i )

Retrieves a "core" interface based on an index value Note that the order of "core" interfaces is not guaranteed.

This means that the index of a "core" interface may not be given by NumCOREInterfaces()-1 right after the interface has been registered.

Parameters:
i - index of the interface to retrieve. This is a zero based index.
Returns:
- Pointer to the corresponding "core" interface
CoreExport void UnregisterCOREInterface ( FPInterface fpi )

Unregisters a "core" interface previously registered with 3ds Max.

Note that "Core" interfaces derived from class FPInterface or a subclass of it are automatically unregistered when the C++ object that implements them is destroyed.

Parameters:
fpi - Pointer to the interface to unregister