LayerObject Class Reference

#include <c4d_layerobject.h>

Inheritance diagram for LayerObject:

Public Types

typedef BaseList4D SUPER
 
- Public Types inherited from BaseList4D
typedef BaseList2D SUPER
 
- Public Types inherited from BaseList2D
typedef GeListNode SUPER
 
- Public Types inherited from GeListNode
typedef PrivateChunk SUPER
 

Public Member Functions

virtual Bool IsInstanceOf (cineware::Int32 id) const
 
- Public Member Functions inherited from BaseList4D
BaseList4DGetUp ()
 
BaseList4DGetDown ()
 
BaseList4DGetDownLast ()
 
void InsertBefore (BaseList4D *bl)
 
void InsertAfter (BaseList4D *bl)
 
void InsertUnder (BaseList4D *bl)
 
void InsertUnderLast (BaseList4D *bl)
 
virtual void Remove ()
 
- Public Member Functions inherited from BaseList2D
 BaseList2D ()
 
virtual ~BaseList2D ()
 
BaseList2DGetNext ()
 
BaseList2DGetPred ()
 
NodeDataGetNodeData ()
 
void SetNodeData (NodeData *data)
 
void SetBit (Int32 mask)
 
Bool GetBit (Int32 mask)
 
void DelBit (Int32 mask)
 
void ToggleBit (Int32 mask)
 
Int32 GetAllBits ()
 
void SetAllBits (Int32 bits)
 
BaseContainer GetData ()
 
BaseContainerGetDataInstance ()
 
BaseContainerGetDataInstanceRef ()
 
const StringGetName ()
 
void SetName (const String &new_name)
 
const GeMarkerGetMarker () const
 
void SetMarker (const GeMarker &m)
 
Bool AddUniqueID (Int32 appid, const Char *const mem, Int bytes)
 
Bool FindUniqueID (Int32 appid, const Char *&mem, Int &bytes) const
 
Int32 GetUniqueIDCount () const
 
Bool GetUniqueIDIndex (Int32 idx, Int32 &id, const Char *&mem, Int &bytes) const
 
BaseShaderGetFirstShader ()
 
Bool InsertShader (BaseShader *shader, BaseShader *pred=nullptr)
 
Bool InsertShaderLast (BaseShader *shader)
 
RootCTrackGetCTrackRoot ()
 
CTrackGetFirstCTrack ()
 
CTrackFindCTrack (const DescID &id)
 
Bool AppendCTrack (CTrack *t)
 
void InsertTrackSorted (CTrack *track)
 
virtual Int32 GetType () const
 
virtual Int32 GetDiskType () const
 
LayerObjectGetLayerObject ()
 
void SetLayerObject (LayerObject *layer)
 
const LayerDataGetLayerData (BaseDocument *doc, Bool rawdata=false)
 
Bool SetLayerData (BaseDocument *doc, const LayerData &data)
 
DynamicDescriptionGetDynamicDescription ()
 
virtual Bool IsBaseList ()
 
Bool SetDescIDState (const DescID &id, DESCIDSTATE descidstate)
 
DESCIDSTATE GetDescIDState (const DescID &id, Bool tolerant) const
 
RootPluginNodeGetOverrideRoot ()
 
BaseOverrideGetFirstOverride ()
 
virtual Bool TranslateDescID (const DescID &id, DescID &res_id, GeListNode *&res_at)
 
- Public Member Functions inherited from GeListNode
 GeListNode ()
 
 ~GeListNode ()
 
virtual Bool GetNBit (Int32 bit) const
 
virtual Bool ChangeNBit (NBIT bit, NBITCONTROL bitmode)
 
BaseDocumentGetDocument ()
 
virtual Int32 GetInfo ()
 
GeListNodeGetPred ()
 
GeListNodeGetNext ()
 
GeListNodeGetUp ()
 
GeListNodeGetDown ()
 
GeListNodeGetDownLast ()
 
void InsertBefore (GeListNode *op)
 
void InsertAfter (GeListNode *op)
 
void Remove ()
 
void InsertUnder (GeListNode *op)
 
void InsertUnderLast (GeListNode *op)
 
RootList2DGetListHead ()
 
Int32 GetNodeID (Int32 index=0) const
 
- Public Member Functions inherited from PrivateChunk
 PrivateChunk ()
 
Bool ReadChunk (HyperFile *hf, Bool keepin=false, Bool noheader=false)
 
virtual Bool IsListHead ()
 
Bool ReadObject (HyperFile *hf, Bool readheader)
 
Bool WriteObject (HyperFile *hf, Int32 type)
 
Bool CopyTo (PrivateChunk *dest, COPYFLAGS flags, AliasTrans *trans)
 
Bool GetParameter (Int32 id, GeData &data)
 
Bool SetParameter (Int32 id, const GeData &data)
 
Bool GetParameter (const DescID &id, GeData &data)
 
Bool SetParameter (const DescID &id, const GeData &data)
 
virtual Int32 GetChunkLevel ()
 
- Public Member Functions inherited from GeTempPublicNode2D< PrivateChunk >
PrivateChunkGetNext () const
 
PrivateChunkGetPrev () const
 
void InsertBefore (PrivateChunk *n)
 
void InsertAfter (PrivateChunk *n)
 
void Remove ()
 

Private Member Functions

virtual Bool CopyToX (PrivateChunk *dest, COPYFLAGS flags, AliasTrans *trans)
 
virtual Bool HandleSubChunk (HyperFile *hf, Int32 id, Int32 level)
 
virtual Bool Write (HyperFile *hf)
 
virtual Bool GetDParameter (const DescID &id, GeData &data)
 
virtual Bool SetDParameter (const DescID &id, const GeData &data)
 

Private Attributes

LayerData m_data
 

Friends

class RootLayer
 
class BaseDocument
 

Constructor/Destructor

 LayerObject ()
 
virtual ~LayerObject ()
 

Alloc/Free

static LayerObjectAlloc ()
 
static void Free (LayerObject *&v)
 

Navigation

LayerObjectGetNext ()
 
LayerObjectGetPred ()
 
LayerObjectGetUp ()
 
LayerObjectGetDown ()
 
LayerObjectGetDownLast ()
 

Clone

virtual BaseList2DGetClone (COPYFLAGS flags, AliasTrans *trn)
 

Execute

virtual Bool Execute ()
 

Additional Inherited Members

- Protected Member Functions inherited from BaseList4D
 BaseList4D ()
 
 ~BaseList4D ()
 
- Protected Member Functions inherited from BaseList2D
void SetID (Int32 id)
 
virtual Int32 GetInstanceType () const
 
- Protected Attributes inherited from BaseList2D
Int32 m_id
 
RootShader mp_rootshader
 
RootShader mp_rootshader_hidden
 
RootShader root_shader_repository
 
Int32 l_bitfeld
 
RootCTrack mp_rootctrack
 
RootPluginNode root_override
 
NotifyListnotify_events
 
DescIdStorekeyframestore
 
DescIdStorepropstore
 
BaseContainer m_bc
 
NodeDatam_data
 
- Protected Attributes inherited from GeListNode
GeAliasGoal m_xgoal
 
UInt32 m_bits [4]
 
RootList2Dt_rootlist_parent
 
RootList2Dm_children
 
BaseDocumentparent_doc
 
void * unknownData
 
Int unknownDataSize
 
Int32 unknownDataLevel
 
Int32 pluginID
 

Detailed Description

Represents a layer in Cinema 4D.

Note
Has to be created with Alloc() and destroyed with Free().

Member Typedef Documentation

◆ SUPER

typedef BaseList4D SUPER

Constructor & Destructor Documentation

◆ LayerObject()

Default constructor.

◆ ~LayerObject()

virtual ~LayerObject ( )
virtual

Default destructor.

Member Function Documentation

◆ IsInstanceOf()

virtual Bool IsInstanceOf ( cineware::Int32  id) const
virtual

Reimplemented from BaseList4D.

◆ CopyToX()

virtual Bool CopyToX ( PrivateChunk dest,
COPYFLAGS  flags,
AliasTrans trans 
)
privatevirtual

Reimplemented from BaseList2D.

◆ HandleSubChunk()

virtual Bool HandleSubChunk ( HyperFile hf,
Int32  id,
Int32  level 
)
privatevirtual

Private.

Reimplemented from BaseList4D.

◆ Write()

virtual Bool Write ( HyperFile hf)
privatevirtual

Private.

Reimplemented from BaseList4D.

◆ GetDParameter()

virtual Bool GetDParameter ( const DescID id,
GeData data 
)
privatevirtual

Reimplemented from BaseList2D.

◆ SetDParameter()

virtual Bool SetDParameter ( const DescID id,
const GeData data 
)
privatevirtual

Reimplemented from BaseList2D.

◆ Alloc()

static LayerObject* Alloc ( )
static

Allocates a layer. Destroy the allocated layer with Free().

Returns
The allocated layer, or nullptr if the allocation failed.

◆ Free()

static void Free ( LayerObject *&  v)
static

Destructs layer allocated with Alloc().

Parameters
[in,out]vThe layer to destruct. If the pointer is nullptr nothing happens. The pointer is assigned nullptr afterwards.

◆ GetNext()

LayerObject* GetNext ( )

Gets the next layer in the list.

Returns
The next layer, or nullptr if there is none. Cineware SDK owns the pointed layer.

◆ GetPred()

LayerObject* GetPred ( )

Gets the previous layer in the list.

Returns
The previous layer, or nullptr if there is none. Cineware SDK owns the pointed layer.

◆ GetUp()

LayerObject* GetUp ( )

Gets the parent layer of the list node.

Returns
The previous layer, or nullptr if there is none. Cineware SDK owns the pointed layer.

◆ GetDown()

LayerObject* GetDown ( )

Gets the first child layer of the list node.

Returns
The previous layer, or nullptr if there is none. Cineware SDK owns the pointed layer.

◆ GetDownLast()

LayerObject* GetDownLast ( )

Gets the last child layer of the list node.

Returns
The previous layer, or nullptr if there is none. Cineware SDK owns the pointed layer.

◆ GetClone()

virtual BaseList2D* GetClone ( COPYFLAGS  flags,
AliasTrans trn 
)
virtual

Gets a clone/copy of the layer.

Parameters
[in]flagsFlags for the clone.
[in]trnAn alias translator for the operation. Can be nullptr. The caller owns the pointed layer.
Returns
The cloned layer. The caller owns the pointed layer.

Reimplemented from BaseList2D.

◆ Execute()

virtual Bool Execute ( )
virtual

Overload this method for self defined layers.

Note
If an AlienLayerObject class is derived from LayerObject it will get a call in AlienLayerObject::Execute() for every created layer in CreateSceneFromC4D().
Returns
true if successful, otherwise false.

Friends And Related Function Documentation

◆ RootLayer

friend class RootLayer
friend

◆ BaseDocument

friend class BaseDocument
friend

Member Data Documentation

◆ m_data

LayerData m_data
private