Public Member Functions | Static Public Attributes

ILayer Class Reference

This reference page is linked to from the following overview topics: Layers, Recovering an ILayer or ILayerProperties from an INode, Iterating over Layers by Name, Iterating over Layers by Index.


Search for all occurrences

Detailed Description

See also:
Class ReferenceTarget, Class ILayerManager, Class LayerProperty, Class INode.

Description:
This class is available in release 3.0 and later only.

This class is an interface to the Layers functionality provided by 3D Studio VIZ. Basically, Layers govern (override) some properties of the nodes which are on the layer. For example, a Layer could be used to freeze all the nodes on it without having to set this property of each node individually.

Some of the methods below are not functional in 3ds Max. Such cases are noted in the remarks for the method.
Data Members:
static const SClass_ID kLayerSuperClassID;

The super class ID of the layer interface class.

#include <ilayer.h>

Inheritance diagram for ILayer:
Inheritance graph
[legend]

List of all members.

Public Member Functions

SClass_ID  SuperClassID ()
  Retrieves a constant representing the type of the plugin.
virtual bool  AddToLayer (INode *rtarg)=0
virtual bool  DeleteFromLayer (INode *rtarg)=0
virtual void  SetName (const MSTR &name)=0
virtual MSTR  GetName () const =0
virtual void  SetWireColor (DWORD newcol)=0
virtual DWORD  GetWireColor () const =0
virtual void  Hide (bool onOff)=0
virtual bool  IsHidden () const =0
virtual void  Freeze (bool onOff)=0
virtual bool  IsFrozen () const =0
virtual void  SetRenderable (bool onOff)=0
virtual bool  Renderable () const =0
virtual void  SetPrimaryVisibility (bool onOff)=0
virtual bool  GetPrimaryVisibility () const =0
virtual void  SetSecondaryVisibility (bool onOff)=0
virtual bool  GetSecondaryVisibility () const =0
virtual void  XRayMtl (bool onOff)=0
virtual bool  HasXRayMtl () const =0
virtual void  IgnoreExtents (bool onOff)=0
virtual bool  GetIgnoreExtents () const =0
virtual void  BoxMode (bool onOff)=0
virtual bool  GetBoxMode () const =0
virtual void  AllEdges (bool onOff)=0
virtual bool  GetAllEdges () const =0
virtual void  VertTicks (bool onOff)=0
virtual bool  GetVertTicks () const =0
virtual void  BackCull (bool onOff)=0
virtual bool  GetBackCull () const =0
virtual void  SetCVertMode (bool onOff)=0
virtual bool  GetCVertMode () const =0
virtual void  SetShadeCVerts (bool onOff)=0
virtual bool  GetShadeCVerts () const =0
virtual void  SetCastShadows (bool onOff)=0
virtual bool  CastShadows () const =0
virtual void  SetRcvShadows (bool onOff)=0
virtual bool  RcvShadows () const =0
virtual void  SetApplyAtmospherics (bool onOff)=0
virtual bool  ApplyAtmospherics () const =0
virtual void  SetMotBlur (int kind)=0
virtual int  MotBlur () const =0
virtual int  GetRenderFlags () const =0
virtual void  SetRenderFlags (int flags)=0
virtual int  GetDisplayFlags () const =0
virtual int  AddProperty (LayerProperty &lprop)=0
virtual int  SetProperty (LayerProperty &lprop)=0
virtual int  GetProperty (LayerProperty &lprop) const =0
virtual bool  Used (void) const =0
virtual bool  GetFlag (int mask) const =0
virtual bool  GetFlag2 (int mask) const =0
virtual void  UpdateSelectionSet (void)=0
virtual int  GetRenderFlags (int oldlimits) const =0
virtual void  SetInheritVisibility (bool onOff)=0
virtual bool  GetInheritVisibility () const =0
virtual void  Trajectory (bool onOff, bool temp=false)=0
virtual bool  GetTrajectory () const =0
virtual void  SetDisplayByLayer (BOOL onOff, INode *)=0
virtual void  SetRenderByLayer (BOOL onOff, INode *)=0
virtual void  SetMotionByLayer (BOOL onOff, INode *)=0
virtual BOOL  GetDisplayByLayer (INode *) const =0
virtual BOOL  GetRenderByLayer (INode *) const =0
virtual BOOL  GetMotionByLayer (INode *) const =0
virtual void  SelectObjects (void)=0
virtual void  SetVisibility (TimeValue t, float vis)=0
virtual float  GetVisibility (TimeValue t, Interval *valid=NULL) const =0
virtual float  GetVisibility (TimeValue t, View &view, Interval *valid=NULL) const =0
virtual float  GetImageBlurMultiplier (TimeValue t) const =0
virtual void  SetImageBlurMultiplier (TimeValue t, float m)=0
virtual bool  GetMotBlurOnOff (TimeValue t) const =0
virtual void  SetMotBlurOnOff (TimeValue t, bool m)=0
virtual bool  IsHiddenByVisControl ()=0
virtual float  GetLocalVisibility (TimeValue t, Interval *valid) const =0
virtual void  SetShowFrozenWithMtl (bool onOff)=0
virtual int  ShowFrozenWithMtl () const =0
virtual void  SetRenderOccluded (bool onOff)=0
virtual int  GetRenderOccluded () const =0
virtual bool  HasObjects () const =0

Static Public Attributes

static const SClass_ID  kLayerSuperClassID

Member Function Documentation

SClass_ID SuperClassID ( ) [inline, virtual]

Retrieves a constant representing the type of the plugin.

Returns:
A super class id that uniquely identifies the type (category) of the plugin. Note that several plugin classes can be of the same type, thus return the same super class id. Plugins are uniquely identified by their class ids. List of Super Class IDs.
See also:
SClass_ID

Reimplemented from ReferenceTarget.

{ return kLayerSuperClassID; }
virtual bool AddToLayer ( INode rtarg ) [pure virtual]
Remarks:
Adds the specified node to this layer.
Parameters:
INode *rtarg

The node to add.
virtual bool DeleteFromLayer ( INode rtarg ) [pure virtual]
Remarks:
Deletes the specified node from this layer. Note: This method does nothing in 3ds Max.
Parameters:
INode *rtarg

The node to delete from this layer.
virtual void SetName ( const MSTR name ) [pure virtual]
Remarks:
Sets the name of this layer.
Parameters:
const MSTR &name

The name for this layer.
virtual MSTR GetName ( ) const [pure virtual]
Remarks:
Returns the name of this layer. Note: The user of this method must delete the returned string.
virtual void SetWireColor ( DWORD  newcol ) [pure virtual]
Remarks:
Sets the wire frame color.
Parameters:
DWORD newcol

See COLORREF.
virtual DWORD GetWireColor ( ) const [pure virtual]
Remarks:
Returns the wire frame color. See COLORREF.
virtual void Hide ( bool  onOff ) [pure virtual]
Remarks:
Sets the hidden state.
Parameters:
bool onOff

Use true for hidden; false for not hidden.
virtual bool IsHidden ( ) const [pure virtual]
Remarks:
Returns true if hidden; false if not hidden.
virtual void Freeze ( bool  onOff ) [pure virtual]
Remarks:
Sets the frozen state.
Parameters:
bool onOff

Use true for on; false for off.
virtual bool IsFrozen ( ) const [pure virtual]
Remarks:
Returns true if frozen; false if not.
virtual void SetRenderable ( bool  onOff ) [pure virtual]
Remarks:
Sets the renderable state.
Parameters:
bool onOff

Use true for on; false for off.
virtual bool Renderable ( ) const [pure virtual]
Remarks:
Returns true if renderable; false if not.
virtual void SetPrimaryVisibility ( bool  onOff ) [pure virtual]
Remarks:
This method allows you to set or unset the primary visibility flag for the layer.
Parameters:
bool onOff

TRUE to set; FALSE to unset.
virtual bool GetPrimaryVisibility ( ) const [pure virtual]
Remarks:
This method returns TRUE if the primary visibility flag for the layer is set.
virtual void SetSecondaryVisibility ( bool  onOff ) [pure virtual]
Remarks:
This method allows you to set the secondary visibility flag for the layer.
Parameters:
bool onOff

TRUE to set; FALSE to unset.
virtual bool GetSecondaryVisibility ( ) const [pure virtual]
Remarks:
This method returns TRUE if the secondary visibility flag for the layer is set.
virtual void XRayMtl ( bool  onOff ) [pure virtual]
Remarks:
Sets the X-Ray material property.
Parameters:
bool onOff

Use true for on; false for off.
virtual bool HasXRayMtl ( ) const [pure virtual]
Remarks:
Returns true if X-Ray material is set; false if not.
virtual void IgnoreExtents ( bool  onOff ) [pure virtual]
Remarks:
Sets the ignore extents property.
Parameters:
bool onOff

Use true for on; false for off.
virtual bool GetIgnoreExtents ( ) const [pure virtual]
Remarks:
Returns true if ignore extents is on; false if off.
virtual void BoxMode ( bool  onOff ) [pure virtual]
Remarks:
Sets the box mode state.
Parameters:
bool onOff

Use true for on; false for off.
virtual bool GetBoxMode ( ) const [pure virtual]
Remarks:
Returns true if box mode is on; false if off.
virtual void AllEdges ( bool  onOff ) [pure virtual]
Remarks:
Sets the all edges setting.
Parameters:
bool onOff

Use true for on; false for off.
virtual bool GetAllEdges ( ) const [pure virtual]
Remarks:
Returns true if all edges is on; false if off.
virtual void VertTicks ( bool  onOff ) [pure virtual]
Remarks:
Sets the vertex ticks state.
Parameters:
bool onOff

Use true for on; false for off.
virtual bool GetVertTicks ( ) const [pure virtual]
Remarks:
Returns true if vertex ticks is on; false if off.
virtual void BackCull ( bool  onOff ) [pure virtual]
Remarks:
Sets the backface culling state.
Parameters:
bool onOff

Use true for on; false for off.
virtual bool GetBackCull ( ) const [pure virtual]
Remarks:
Returns true if backface culling is on; false if not.
virtual void SetCVertMode ( bool  onOff ) [pure virtual]
Remarks:
Sets the color per vertex display mode.
Parameters:
bool onOff

Use true for on; false for off.
virtual bool GetCVertMode ( ) const [pure virtual]
Remarks:
Returns true if the color vertex display mode is on; otherwise false.
virtual void SetShadeCVerts ( bool  onOff ) [pure virtual]
Remarks:
Sets the shaded color vertex display mode.
Parameters:
bool onOff

Use true for on; false for off.
virtual bool GetShadeCVerts ( ) const [pure virtual]
Remarks:
Returns true if the shaded color vertex mode is on; false if off.
virtual void SetCastShadows ( bool  onOff ) [pure virtual]
Remarks:
Sets the cast shadow state.
Parameters:
bool onOff

Use true for on; false for off.
virtual bool CastShadows ( ) const [pure virtual]
Remarks:
Returns true if cast shadow is on; false if off.
virtual void SetRcvShadows ( bool  onOff ) [pure virtual]
Remarks:
Sets the receives shadow state.
Parameters:
bool onOff

Use true for on; false for off.
virtual bool RcvShadows ( ) const [pure virtual]
Remarks:
Returns true if receives shadow is on; false if off.
virtual void SetApplyAtmospherics ( bool  onOff ) [pure virtual]
virtual bool ApplyAtmospherics ( ) const [pure virtual]
virtual void SetMotBlur ( int  kind ) [pure virtual]
Remarks:
Sets the type of motion blur used by the layer.
Parameters:
int kind

The kind of motion blur. One of the following values:

0: None.

1: Object Motion Blur.

2: Image Motion Blur.
virtual int MotBlur ( ) const [pure virtual]
Remarks:
Returns the type of motion blur used by the layer. One of the following values:

0: None.

1: Object Motion Blur.

2: Image Motion Blur.
virtual int GetRenderFlags ( ) const [pure virtual]
Remarks:
This method is for internal use.
virtual void SetRenderFlags ( int  flags ) [pure virtual]
Remarks:
This method is for internal use.
virtual int GetDisplayFlags ( ) const [pure virtual]
Remarks:
This method is for internal use.
virtual int AddProperty ( LayerProperty lprop ) [pure virtual]
Remarks:
This method is currently unused and reserved for future use.
virtual int SetProperty ( LayerProperty lprop ) [pure virtual]
Remarks:
This method is currently unused and reserved for future use.
virtual int GetProperty ( LayerProperty lprop ) const [pure virtual]
Remarks:
This method is currently unused and reserved for future use.
virtual bool Used ( void  ) const [pure virtual]
Remarks:
Returns true if the layer is used (nodes have been added); otherwise false.
virtual bool GetFlag ( int  mask ) const [pure virtual]
Remarks:
This method is for internal use.
virtual bool GetFlag2 ( int  mask ) const [pure virtual]
Remarks:
This method is for internal use.
virtual void UpdateSelectionSet ( void  ) [pure virtual]
Remarks:
This method is for internal use in VIZ. Note: This method does nothing in 3ds Max.
virtual int GetRenderFlags ( int  oldlimits ) const [pure virtual]
Remarks:
This method returns the render flags associated with the layer.
Parameters:
int oldlimits

The old limits flag.
virtual void SetInheritVisibility ( bool  onOff ) [pure virtual]
Remarks:
This method allows you to set the inherit visibility flag for the layer.
Parameters:
bool onOff

TRUE to set; FALSE to unset.
virtual bool GetInheritVisibility ( ) const [pure virtual]
Remarks:
This method returns TRUE if the inherit visibility flag for the layer is set.
virtual void Trajectory ( bool  onOff,
bool  temp = false 
) [pure virtual]
Remarks:
This method allows you to set the display trajectory flag for the layer.
Parameters:
bool onOff

TRUE to set; FALSE to unset.

bool temp = false

This is used internally.
virtual bool GetTrajectory ( ) const [pure virtual]
Remarks:
This method returns TRUE if the display trajectory flag for the layer is set.
virtual void SetDisplayByLayer ( BOOL  onOff,
INode  
) [pure virtual]
Remarks:
This method allows you to set the display by layer flag on a per-node basis.
Parameters:
bool onOff

TRUE to set; FALSE to unset.

Node *

The pointer to the node.
virtual void SetRenderByLayer ( BOOL  onOff,
INode  
) [pure virtual]
Remarks:
This method allows you to set the render by layer flag on a per-node basis.
Parameters:
bool onOff

TRUE to set; FALSE to unset.

Node *

The pointer to the node.
virtual void SetMotionByLayer ( BOOL  onOff,
INode  
) [pure virtual]
Remarks:
This method allows you to set the motion by layer flag on a per-node basis.
Parameters:
bool onOff

TRUE to set; FALSE to unset.

Node *

The pointer to the node.
virtual BOOL GetDisplayByLayer ( INode ) const [pure virtual]
Remarks:
This method returns the state of the display by layer flag for the specified node.
Parameters:
Node *

The pointer to the node.
Returns:
TRUE if set; FALSE if not set.
virtual BOOL GetRenderByLayer ( INode ) const [pure virtual]
Remarks:
This method returns the state of the render by layer flag for the specified node.
Parameters:
Node *

The pointer to the node.
Returns:
TRUE if set; FALSE if not set.
virtual BOOL GetMotionByLayer ( INode ) const [pure virtual]
Remarks:
This method returns the state of the motion by layer flag for the specified node.
Parameters:
Node *

The pointer to the node.
Returns:
TRUE if set; FALSE if not set.
virtual void SelectObjects ( void  ) [pure virtual]
Remarks:
This method will select the objects of the layer.
virtual void SetVisibility ( TimeValue  t,
float  vis 
) [pure virtual]
virtual float GetVisibility ( TimeValue  t,
Interval valid = NULL 
) const [pure virtual]
virtual float GetVisibility ( TimeValue  t,
View view,
Interval valid = NULL 
) const [pure virtual]
virtual float GetImageBlurMultiplier ( TimeValue  t ) const [pure virtual]
Remarks:
This method allows you to set the image blur multiplier for the layer.
Parameters:
TimeValue t

The timevalue to get the image blur multiplier for.
virtual void SetImageBlurMultiplier ( TimeValue  t,
float  m 
) [pure virtual]
Remarks:
This method allows you to set the image blur multiplier.
Parameters:
TimeValue t

The timevalue to set the image blur multiplier for.

float m

The multiplier to set.
virtual bool GetMotBlurOnOff ( TimeValue  t ) const [pure virtual]
Remarks:
This method returns the state of the motion blur flag at the specified time.
Parameters:
TimeValue t

The time at which to get the flag.
virtual void SetMotBlurOnOff ( TimeValue  t,
bool  m 
) [pure virtual]
Remarks:
This method allows you to set the state of the motion blur flag at the specified time.
Parameters:
TimeValue t

The time at which to set the flag.

bool m

TRUE to turn on; FALSE to turn off.
virtual bool IsHiddenByVisControl ( ) [pure virtual]
virtual float GetLocalVisibility ( TimeValue  t,
Interval valid 
) const [pure virtual]
virtual void SetShowFrozenWithMtl ( bool  onOff ) [pure virtual]
virtual int ShowFrozenWithMtl ( ) const [pure virtual]
virtual void SetRenderOccluded ( bool  onOff ) [pure virtual]
virtual int GetRenderOccluded ( ) const [pure virtual]
virtual bool HasObjects ( ) const [pure virtual]

Member Data Documentation

const SClass_ID kLayerSuperClassID [static]

ILayer ILayer ILayer ILayer ILayer ILayer ILayer ILayer ILayer ILayer
ILayer ILayer ILayer ILayer ILayer ILayer ILayer ILayer ILayer ILayer