BaseTag Class Reference

#include <c4d_basetag.h>

Inheritance diagram for BaseTag:

Public Types

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 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)
 
LayerObjectGetLayerObject ()
 
void SetLayerObject (LayerObject *layer)
 
const LayerDataGetLayerData (BaseDocument *doc, Bool rawdata=false)
 
Bool SetLayerData (BaseDocument *doc, const LayerData &data)
 
DynamicDescriptionGetDynamicDescription ()
 
virtual Bool IsBaseList ()
 
virtual void Remove ()
 
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 ()
 

Protected Member Functions

virtual Int32 GetInstanceType () const
 
- Protected Member Functions inherited from BaseList2D
void SetID (Int32 id)
 

Protected Attributes

BaseObjectparent_op
 
- 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
 

Friends

class RootTag
 
class BaseObject
 
class PointObjectData
 
class PolygonObjectData
 
class PolygonObject
 

Constructor/Destructor

 BaseTag (Int32 id=NOTOK, Int32 pD=NOTOK)
 
virtual ~BaseTag ()
 

Alloc/Free

static BaseTagAlloc (Int32 type)
 
static void Free (BaseTag *&bl)
 

Navigation

BaseTagGetNext ()
 
BaseTagGetPred ()
 

Type

virtual Int32 GetType () const
 
virtual Int32 GetDiskType () const
 

Clone/Copy

virtual BaseList2DGetClone (COPYFLAGS flags, AliasTrans *trans)
 
virtual Bool CopyDataV (BaseTag *dest, COPYFLAGS flags, AliasTrans *trans)
 

Get/Set Parameter

virtual Bool GetDParameter (const DescID &id, GeData &data)
 
virtual Bool SetDParameter (const DescID &id, const GeData &data)
 

Miscellaneous

BaseObjectGetObject ()
 

Private

virtual Bool CopyToX (PrivateChunk *dst, COPYFLAGS flags, AliasTrans *trans)
 
virtual Bool HandleSubChunk (HyperFile *hf, Int32 id, Int32 level)
 
Bool Write (HyperFile *hf)
 

Detailed Description

A variety of properties can be added to objects using tags. For example, adding smoothing (Phong tag) or preventing an object from being edited accidentally (Protection tag).

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

Member Typedef Documentation

◆ SUPER

typedef BaseList2D SUPER

Constructor & Destructor Documentation

◆ BaseTag()

BaseTag ( Int32  id = NOTOK,
Int32  pD = NOTOK 
)

Default constructor. Private.

◆ ~BaseTag()

virtual ~BaseTag ( )
virtual

Default destructor.

Member Function Documentation

◆ IsInstanceOf()

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

◆ GetInstanceType()

virtual Int32 GetInstanceType ( ) const
protectedvirtual

Reimplemented from BaseList2D.

◆ Alloc()

static BaseTag* Alloc ( Int32  type)
static

Allocates a base tag. Destroy the allocated base tag with Free().

Parameters
[in]typeThe tag type.
Returns
The allocated base tag, or nullptr if the allocation failed.

◆ Free()

static void Free ( BaseTag *&  bl)
static

Destructs base tags allocated with Alloc().

Parameters
[in,out]blThe base tag to destruct. If the pointer is nullptr nothing happens. The pointer is assigned nullptr afterwards.

◆ GetNext()

BaseTag* GetNext ( )

Gets the next tag in the list.

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

◆ GetPred()

BaseTag* GetPred ( )

Gets the previous tag in the list.

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

◆ GetType()

virtual Int32 GetType ( ) const
virtual

Gets the type of the tag.

Warning
This must be used to make sure that the derived tag really is of the right type before casting it and accessing its members.
Note
Plugin tags return their unique plugin IDs.
Returns
The tag type, for example Tprotection.

Reimplemented from BaseList2D.

◆ GetDiskType()

virtual Int32 GetDiskType ( ) const
virtual

Gets the tag's unique disk type.

Note
Normally this is the same as GetType(), but there are exceptions.
Returns
The tag's unique disk type.

Reimplemented from BaseList2D.

◆ GetClone()

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

Gets a clone/copy of the tag.

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

Reimplemented from BaseList2D.

◆ CopyDataV()

virtual Bool CopyDataV ( BaseTag dest,
COPYFLAGS  flags,
AliasTrans trans 
)
virtual

Copies all values from the tag to dest.

Warning
The tags must be of the same type!
Parameters
[in]destThe destination tag. The caller owns the pointed tag.
[in]flagsFlags for the copy.
[in]transAn alias translator for the operation. Can be nullptr. The caller owns the pointed alias translator.
Returns
true if the tag values were copied to dest, otherwise false.

◆ GetDParameter()

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

Gets a parameter of the tag.

Parameters
[in]idThe ID of the parameter.
[in]dataAssigned the parameter data.
Returns
true if the parameter was retrieved, otherwise false.

Reimplemented from BaseList2D.

Reimplemented in TextureTag, UVWTag, and DisplayTag.

◆ SetDParameter()

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

Sets a parameter of the tag.

Parameters
[in]idThe ID of the parameter.
[in]dataThe parameter data to set.
Returns
true if the parameter was set, otherwise false.

Reimplemented from BaseList2D.

Reimplemented in TextureTag, UVWTag, and DisplayTag.

◆ GetObject()

BaseObject* GetObject ( )

Gets the object that the tag is attached to.

Returns
The host object, or nullptr if the tag is not associated with an object. Cineware SDK owns the pointed object.

◆ CopyToX()

virtual Bool CopyToX ( PrivateChunk dst,
COPYFLAGS  flags,
AliasTrans trans 
)
virtual

◆ HandleSubChunk()

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

◆ Write()

Bool Write ( HyperFile hf)
virtual

Friends And Related Function Documentation

◆ RootTag

friend class RootTag
friend

◆ BaseObject

friend class BaseObject
friend

◆ PointObjectData

friend class PointObjectData
friend

◆ PolygonObjectData

friend class PolygonObjectData
friend

◆ PolygonObject

friend class PolygonObject
friend

Member Data Documentation

◆ parent_op

BaseObject* parent_op
protected