Public Types | Public Member Functions

ILayerControl Class Reference

Search for all occurrences

Detailed Description

ILayerControl provides API access to layer control functionality.

The interface is returned by calling GetILayerControlInterface.

#include <ILayerControl.h>

Inheritance diagram for ILayerControl:
Inheritance graph
[legend]

List of all members.

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 Member Functions

BEGIN_FUNCTION_MAP  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)
END_FUNCTION_MAP FPInterfaceDesc GetDesc ()
virtual int  GetLayerCount ()=0
  Return the total number of layers on this layer control.
virtual void  SetLayerActive (int index)=0
  Set the layer specified by the index to be active.
virtual int  GetLayerActive ()=0
  Returns which layer is active.
virtual void  DeleteLayer (int index)=0
  Delete the specified layer.
virtual void  CopyLayer (int index)=0
  Copy the specified layer so that it may be pasted.
virtual void  PasteLayer (int index)=0
  Paste the copied layer to the specified index.
virtual void  SetLayerName (int index, MSTR name)=0
  Set the name of the specified layer.
virtual MSTR  GetLayerName (int index)=0
  Get the name of the specified layer.
virtual float  GetLayerWeight (int index, TimeValue t)=0
  Get the layer weight for the specified layer at the specified time.
virtual void  SetLayerWeight (int index, TimeValue t, float weight)=0
  Set the layer weight for the specified layer at the speicifed time.
virtual bool  GetLayerMute (int index)=0
  Get whether or not a particular layer is muted or not.
virtual void  SetLayerMute (int index, bool mute)=0
  Set whether or not a particular layer is muted or not.
virtual Control GetSubCtrl (int in_index) const =0
  Get a subcontroller from its index.
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.
virtual void  DisableLayer ()=0
  Disables and remove the layer controller, and replace it with the first, base layer.
virtual bool  GetLayerLocked (int index)=0
  Get whether or not the layer is locked.
virtual void  SetLayerLocked (int index, bool locked)=0
  Set whether or not a particular layer is locked.

Member Enumeration Documentation

anonymous enum

Member Function Documentation

BEGIN_FUNCTION_MAP 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   
)
END_FUNCTION_MAP FPInterfaceDesc* GetDesc ( ) [virtual]
Remarks:
Returns a pointer to the class which contains the interface metadata.

Implements FPInterface.

virtual int GetLayerCount ( ) [pure virtual]

Return the total number of layers on this layer control.

Returns:
The total number of layers.
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] index The layer to set active.
virtual int GetLayerActive ( ) [pure virtual]

Returns which layer is active.

Returns:
The active layer.
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] index The layer to delete.
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] index The layer to cut.
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] index Where the pasted layer will go.
virtual void SetLayerName ( int  index,
MSTR  name 
) [pure virtual]

Set the name of the specified layer.

Parameters:
[in] index Which layer to rename.
[in] name The new name of the layer. Remember layer names are unique so if a layer exists with this name, nothing happens.
virtual MSTR GetLayerName ( int  index ) [pure virtual]

Get the name of the specified layer.

Parameters:
[in] index Which layer's name to get.
Returns:
Returns the layer's name. If the index is invalid, returns an empty string.
virtual float GetLayerWeight ( int  index,
TimeValue  t 
) [pure virtual]

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

Parameters:
[in] index Where to get the layer weight.
[in] t At what time to get the layer weight.
Returns:
Returns the layer weight.
virtual void SetLayerWeight ( int  index,
TimeValue  t,
float  weight 
) [pure virtual]

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

Parameters:
[in] index Where to set the layer weight.
[in] t At what time to set the layer weight.
[in] weight The weight to set.
virtual bool GetLayerMute ( int  index ) [pure virtual]

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

Parameters:
[in] index Which layer to see if it's muted.
Returns:
Whether or not the layer is muted or not.
virtual void SetLayerMute ( int  index,
bool  mute 
) [pure virtual]

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

Parameters:
[in] index Which layer to mute or not.
[in] mute The mute value for the specified layer.
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_index Index of the list controller subcontroller
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] index Where to collapse. The index must be greater than zero since we can't collapse the first layer.
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.

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] index Which layer to see if it's locked.
Returns:
Whether or not the layer is locked or not.
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] locked the locked value for the specified layer. If true the layer is locked if false it is unlocked.
[in] index Which layer output to lock or unlock.

ILayerControl ILayerControl ILayerControl ILayerControl ILayerControl ILayerControl ILayerControl ILayerControl ILayerControl ILayerControl
ILayerControl ILayerControl ILayerControl ILayerControl ILayerControl ILayerControl ILayerControl ILayerControl ILayerControl ILayerControl