3ds Max C++ API Reference
ILayerControl Class Referenceabstract

ILayerControl provides API access to layer control functionality. More...

#include <ILayerControl.h>

+ Inheritance diagram for ILayerControl:

Public Types

enum  {
  getNumLayers , setLayerActive , getLayerActive , copyLayer ,
  pasteLayer , deleteLayer , count , setLayerActive_prop ,
  getLayerActive_prop , getLayerName , setLayerName , getSubCtrl ,
  getLayerWeight , setLayerWeight , getLayerMute , setLayerMute ,
  collapseLayer , disableLayer , getLayerLocked , setLayerLocked
}
 
- Public Types inherited from BaseInterface
enum  LifetimeType { noRelease , immediateRelease , wantsRelease , serverControlled }
 

Public Member Functions

 FN_0 (getNumLayers, TYPE_INT, GetLayerCount)
 
 VFN_1 (setLayerActive, SetLayerActive, TYPE_INDEX)
 
 FN_0 (getLayerActive, TYPE_INDEX, GetLayerActive)
 
 VFN_1 (copyLayer, CopyLayer, TYPE_INDEX)
 
 VFN_1 (pasteLayer, PasteLayer, TYPE_INDEX)
 
 VFN_1 (deleteLayer, DeleteLayer, TYPE_INDEX)
 
 FN_1 (getLayerName, TYPE_TSTR_BV, GetLayerName, TYPE_INDEX)
 
 VFN_2 (setLayerName, SetLayerName, TYPE_INDEX, TYPE_STRING)
 
 RO_PROP_FN (count, GetLayerCount, TYPE_INT)
 
 PROP_FNS (getLayerActive_prop, GetLayerActive, setLayerActive_prop, SetLayerActive, TYPE_INDEX)
 
 FN_1 (getSubCtrl, TYPE_CONTROL, GetSubCtrl, TYPE_INDEX)
 
 FN_2 (getLayerWeight, TYPE_FLOAT, GetLayerWeight, TYPE_INDEX, TYPE_TIMEVALUE)
 
 VFN_3 (setLayerWeight, SetLayerWeight, TYPE_INDEX, TYPE_TIMEVALUE, TYPE_FLOAT)
 
 FN_1 (getLayerMute, TYPE_bool, GetLayerMute, TYPE_INDEX)
 
 VFN_2 (setLayerMute, SetLayerMute, TYPE_INDEX, TYPE_bool)
 
 VFN_1 (collapseLayer, CollapseLayer, TYPE_INDEX)
 
 VFN_0 (disableLayer, DisableLayer)
 
 FN_1 (getLayerLocked, TYPE_bool, GetLayerLocked, TYPE_INDEX)
 
 VFN_2 (setLayerLocked, SetLayerLocked, TYPE_INDEX, TYPE_bool)
 
FPInterfaceDescGetDesc ()
 
virtual int GetLayerCount ()=0
 Return the total number of layers on this layer control. More...
 
virtual void SetLayerActive (int index)=0
 Set the layer specified by the index to be active. More...
 
virtual int GetLayerActive ()=0
 Returns which layer is active. More...
 
virtual void DeleteLayer (int index)=0
 Delete the specified layer. More...
 
virtual void CopyLayer (int index)=0
 Copy the specified layer so that it may be pasted. More...
 
virtual void PasteLayer (int index)=0
 Paste the copied layer to the specified index. More...
 
virtual void SetLayerName (int index, MSTR name)=0
 Set the name of the specified layer. More...
 
virtual MSTR GetLayerName (int index)=0
 Get the name of the specified layer. More...
 
virtual float GetLayerWeight (int index, TimeValue t)=0
 Get the layer weight for the specified layer at the specified time. More...
 
virtual void SetLayerWeight (int index, TimeValue t, float weight)=0
 Set the layer weight for the specified layer at the specified time. More...
 
virtual bool GetLayerMute (int index)=0
 Get whether or not a particular layer is muted or not. More...
 
virtual void SetLayerMute (int index, bool mute)=0
 Set whether or not a particular layer is muted or not. More...
 
virtual ControlGetSubCtrl (int in_index) const =0
 Get a subcontroller from its index. More...
 
virtual void CollapseLayer (int index)=0
 Collapse the layer at the specified index so that it gets deleted and it's keys and values are baked down to the previous layer. More...
 
virtual void DisableLayer ()=0
 Disables and remove the layer controller, and replace it with the first, base layer. More...
 
virtual bool GetLayerLocked (int index)=0
 Get whether or not the layer is locked. More...
 
virtual void SetLayerLocked (int index, bool locked)=0
 Set whether or not a particular layer is locked. More...
 
- Public Member Functions inherited from FPMixinInterface
 FPMixinInterface ()
 
virtual LifetimeType LifetimeControl ()
 
virtual CoreExport bool RegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
virtual void UnRegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
CoreExport ~FPMixinInterface ()
 
virtual BaseInterfaceGetInterface (Interface_ID id)
 
virtual FPInterfaceDescGetDescByID (Interface_ID id)
 
virtual Interface_ID GetID ()
 
- Public Member Functions inherited from FPInterface
virtual CoreExport FPStatus Invoke (FunctionID fid, TimeValue t=0, FPParams *params=NULL)
 
virtual FPStatus Invoke (FunctionID fid, FPParams *params)
 
virtual CoreExport FPStatus Invoke (FunctionID fid, TimeValue t, FPValue &result, FPParams *params=NULL)
 
virtual FPStatus Invoke (FunctionID fid, FPValue &result, FPParams *params=NULL)
 
virtual CoreExport FunctionID FindFn (const MCHAR *name)
 
virtual CoreExport BOOL IsEnabled (FunctionID actionID)
 
virtual CoreExport BOOL IsChecked (FunctionID actionID)
 
virtual CoreExport BOOL IsVisible (FunctionID actionID)
 
virtual CoreExport FunctionID GetIsEnabled (FunctionID actionID)
 
virtual CoreExport FunctionID GetIsChecked (FunctionID actionID)
 
virtual CoreExport FunctionID GetIsVisible (FunctionID actionID)
 
virtual ActionTableGetActionTable ()
 
virtual void EnableActions (BOOL onOff)
 
- Public Member Functions inherited from BaseInterface
virtual UtilExport ~BaseInterface ()
 Destructor. More...
 
virtual BaseInterfaceAcquireInterface ()
 
virtual void ReleaseInterface ()
 
virtual void DeleteInterface ()
 
virtual BaseInterfaceCloneInterface (void *remapDir=nullptr)
 
- Public Member Functions inherited from InterfaceServer
virtual UtilExport ~InterfaceServer ()
 Destructor. More...
 
template<class InterfaceType >
InterfaceType * GetTypedInterface ()
 

Additional Inherited Members

- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary. More...
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary. More...
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. More...
 
- Static Public Attributes inherited from FPInterface
static CoreExport FPInterfaceDesc nullInterface
 
- Protected Member Functions inherited from FPMixinInterface
 FPMixinInterface (const FPMixinInterface &rhs)
 
FPMixinInterfaceoperator= (const FPMixinInterface &rhs)
 
- Protected Member Functions inherited from FPInterface
virtual FPStatus _dispatch_fn (FunctionID fid, TimeValue t, FPValue &result, FPParams *p)
 
- Protected Attributes inherited from FPMixinInterface
Tab< InterfaceNotifyCallback * > * interfaceNotifyCBs
 

Detailed Description

ILayerControl provides API access to layer control functionality.

The interface is returned by calling GetILayerControlInterface.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
getNumLayers 
setLayerActive 
getLayerActive 
copyLayer 
pasteLayer 
deleteLayer 
count 
setLayerActive_prop 
getLayerActive_prop 
getLayerName 
setLayerName 
getSubCtrl 
getLayerWeight 
setLayerWeight 
getLayerMute 
setLayerMute 
collapseLayer 
disableLayer 
getLayerLocked 
setLayerLocked 
@ setLayerMute
Definition: ILayerControl.h:360
@ getLayerActive_prop
Definition: ILayerControl.h:359
@ getLayerLocked
Definition: ILayerControl.h:361
@ getLayerMute
Definition: ILayerControl.h:360
@ copyLayer
Definition: ILayerControl.h:358
@ getLayerWeight
Definition: ILayerControl.h:360
@ setLayerActive_prop
Definition: ILayerControl.h:359
@ collapseLayer
Definition: ILayerControl.h:360
@ setLayerLocked
Definition: ILayerControl.h:361
@ count
Definition: ILayerControl.h:359
@ getLayerName
Definition: ILayerControl.h:359
@ disableLayer
Definition: ILayerControl.h:361
@ getNumLayers
Definition: ILayerControl.h:358
@ deleteLayer
Definition: ILayerControl.h:359
@ getSubCtrl
Definition: ILayerControl.h:360
@ setLayerWeight
Definition: ILayerControl.h:360
@ getLayerActive
Definition: ILayerControl.h:358
@ setLayerActive
Definition: ILayerControl.h:358
@ pasteLayer
Definition: ILayerControl.h:358
@ setLayerName
Definition: ILayerControl.h:359

Member Function Documentation

◆ FN_0() [1/2]

FN_0 ( getNumLayers  ,
TYPE_INT  ,
GetLayerCount   
)

◆ VFN_1() [1/5]

VFN_1 ( setLayerActive  ,
SetLayerActive  ,
TYPE_INDEX   
)

◆ FN_0() [2/2]

FN_0 ( getLayerActive  ,
TYPE_INDEX  ,
GetLayerActive   
)

◆ VFN_1() [2/5]

VFN_1 ( copyLayer  ,
CopyLayer  ,
TYPE_INDEX   
)

◆ VFN_1() [3/5]

VFN_1 ( pasteLayer  ,
PasteLayer  ,
TYPE_INDEX   
)

◆ VFN_1() [4/5]

VFN_1 ( deleteLayer  ,
DeleteLayer  ,
TYPE_INDEX   
)

◆ FN_1() [1/4]

FN_1 ( getLayerName  ,
TYPE_TSTR_BV  ,
GetLayerName  ,
TYPE_INDEX   
)

◆ VFN_2() [1/3]

VFN_2 ( setLayerName  ,
SetLayerName  ,
TYPE_INDEX  ,
TYPE_STRING   
)

◆ RO_PROP_FN()

RO_PROP_FN ( count  ,
GetLayerCount  ,
TYPE_INT   
)

◆ PROP_FNS()

◆ FN_1() [2/4]

FN_1 ( getSubCtrl  ,
TYPE_CONTROL  ,
GetSubCtrl  ,
TYPE_INDEX   
)

◆ FN_2()

◆ VFN_3()

◆ FN_1() [3/4]

FN_1 ( getLayerMute  ,
TYPE_bool  ,
GetLayerMute  ,
TYPE_INDEX   
)

◆ VFN_2() [2/3]

VFN_2 ( setLayerMute  ,
SetLayerMute  ,
TYPE_INDEX  ,
TYPE_bool   
)

◆ VFN_1() [5/5]

VFN_1 ( collapseLayer  ,
CollapseLayer  ,
TYPE_INDEX   
)

◆ VFN_0()

VFN_0 ( disableLayer  ,
DisableLayer   
)

◆ FN_1() [4/4]

◆ VFN_2() [3/3]

VFN_2 ( setLayerLocked  ,
SetLayerLocked  ,
TYPE_INDEX  ,
TYPE_bool   
)

◆ GetDesc()

FPInterfaceDesc* GetDesc ( )
virtual
Remarks
Returns a pointer to the class which contains the interface metadata.

Implements FPInterface.

◆ GetLayerCount()

virtual int GetLayerCount ( )
pure virtual

Return the total number of layers on this layer control.

Returns
The total number of layers.

◆ SetLayerActive()

virtual void SetLayerActive ( int  index)
pure virtual

Set the layer specified by the index to be active.

Note that this also sets this layer to be active on other layers on the same node that this layer is on, since layers on a node are synchronized.

Parameters
[in]indexThe layer to set active.

◆ GetLayerActive()

virtual int GetLayerActive ( )
pure virtual

Returns which layer is active.

Returns
The active layer.

◆ DeleteLayer()

virtual void DeleteLayer ( int  index)
pure virtual

Delete the specified layer.

Note since layers are synchronized on a node, other layers on the same node will also get deleted.

Parameters
[in]indexThe layer to delete.

◆ CopyLayer()

virtual void CopyLayer ( int  index)
pure virtual

Copy the specified layer so that it may be pasted.

Note since layers are synchronized on a node, other layers on the same node will also get cut.

Parameters
[in]indexThe layer to cut.

◆ PasteLayer()

virtual void PasteLayer ( int  index)
pure virtual

Paste the copied layer to the specified index.

Note since layers are synchronized on a node, other layers on the same node will also get pasted. If no layer is copied, then nothing happens.

Parameters
[in]indexWhere the pasted layer will go.

◆ SetLayerName()

virtual void SetLayerName ( int  index,
MSTR  name 
)
pure virtual

Set the name of the specified layer.

Parameters
[in]indexWhich layer to rename.
[in]nameThe new name of the layer. Remember layer names are unique so if a layer exists with this name, nothing happens.

◆ GetLayerName()

virtual MSTR GetLayerName ( int  index)
pure virtual

Get the name of the specified layer.

Parameters
[in]indexWhich layer's name to get.
Returns
Returns the layer's name. If the index is invalid, returns an empty string.

◆ GetLayerWeight()

virtual float GetLayerWeight ( int  index,
TimeValue  t 
)
pure virtual

Get the layer weight for the specified layer at the specified time.

Parameters
[in]indexWhere to get the layer weight.
[in]tAt what time to get the layer weight.
Returns
Returns the layer weight.

◆ SetLayerWeight()

virtual void SetLayerWeight ( int  index,
TimeValue  t,
float  weight 
)
pure virtual

Set the layer weight for the specified layer at the specified time.

Parameters
[in]indexWhere to set the layer weight.
[in]tAt what time to set the layer weight.
[in]weightThe weight to set.

◆ GetLayerMute()

virtual bool GetLayerMute ( int  index)
pure virtual

Get whether or not a particular layer is muted or not.

Parameters
[in]indexWhich layer to see if it's muted.
Returns
Whether or not the layer is muted or not.

◆ SetLayerMute()

virtual void SetLayerMute ( int  index,
bool  mute 
)
pure virtual

Set whether or not a particular layer is muted or not.

Parameters
[in]indexWhich layer to mute or not.
[in]muteThe mute value for the specified layer.

◆ GetSubCtrl()

virtual Control* GetSubCtrl ( int  in_index) const
pure virtual

Get a subcontroller from its index.

Returns
- a pointer to a Control, or NULL if the index is invalid.
Parameters
[in]in_indexIndex of the list controller subcontroller

◆ CollapseLayer()

virtual void CollapseLayer ( int  index)
pure virtual

Collapse the layer at the specified index so that it gets deleted and it's keys and values are baked down to the previous layer.


Parameters
[in]indexWhere to collapse. The index must be greater than zero since we can't collapse the first layer.

◆ DisableLayer()

virtual void DisableLayer ( )
pure virtual

Disables and remove the layer controller, and replace it with the first, base layer.

Note that doing this may delete the layer control also, thus making this interface invalid. Nothing will happen if the layer controller has more than one layer.

◆ GetLayerLocked()

virtual bool GetLayerLocked ( int  index)
pure virtual

Get whether or not the layer is locked.

A locked layer cannot be animated nor collapsed, or pasted over and an object with a locked layer cannot get disabled.

Parameters
[in]indexWhich layer to see if it's locked.
Returns
Whether or not the layer is locked or not.

◆ SetLayerLocked()

virtual void SetLayerLocked ( int  index,
bool  locked 
)
pure virtual

Set whether or not a particular layer is locked.

A locked layer cannot be animated nor collapsed, or pasted over and an object with a locked layer cannot get disabled.

Parameters
[in]lockedthe locked value for the specified layer. If true the layer is locked if false it is unlocked.
[in]indexWhich layer output to lock or unlock.