BaseTake Class Reference

#include <c4d_basetake.h>

Inheritance diagram for BaseTake:

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)
 
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)
 
virtual BaseList2DGetClone (COPYFLAGS flags, AliasTrans *trans)
 
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 ()
 

Navigation

BaseTakeGetNext ()
 
BaseTakeGetPred ()
 
BaseTakeGetUp ()
 
BaseTakeGetDown ()
 
BaseTakeGetDownLast ()
 

Miscellaneous

Bool IsMain ()
 
Bool SearchHierarchy (BaseTake *op)
 
void Reset ()
 
Bool CompactTake (BaseDocument *doc)
 
Bool RestoreTake (BaseDocument *doc)
 
static BaseTakeAlloc ()
 
static void Free (BaseTake *&p)
 

Override

Bool GetOverrides (GeTempDynArray< GeListNode > &selection)
 
Bool GetOverrideGroups (GeTempDynArray< GeListNode > &selection)
 
BaseOverrideFindOrAddOverrideParam (TakeData *takeData, BaseList2D *node, const DescID &descID, const GeData &overrideValue, const GeData &backupValue=GeData(), Bool deleteAnim=false)
 
void DeleteOverride (TakeData *takeData, BaseList2D *node, const DescID &descID)
 
BaseOverrideFindOverride (TakeData *takeData, BaseList2D *node)
 
BaseOverrideFindOverrideInHierarchy (TakeData *takeData, BaseList2D *node, const DescID &descID, BaseTake *&resultTake)
 
BaseOverrideGroupAddOverrideGroup ()
 
BaseOverrideGroupGetFirstOverrideGroup ()
 

Camera

BaseObjectGetCamera (TakeData *takeData)
 
BaseObjectGetEffectiveCamera (TakeData *takeData, BaseTake *&resultTake)
 
void SetCamera (TakeData *takeData, BaseObject *camera)
 

RenderData

RenderDataGetRenderData (TakeData *takeData)
 
RenderDataGetEffectiveRenderData (TakeData *takeData, BaseTake *&resultTake)
 
void SetRenderData (TakeData *takeData, RenderData *rData)
 

Additional Inherited Members

- Protected Member Functions inherited from BaseList2D
void SetID (Int32 id)
 
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)
 
virtual Bool CopyToX (PrivateChunk *dest, COPYFLAGS flags, AliasTrans *trans)
 
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 Take of the Take System. It stores BaseOverride objects that define how a specific entity is changed in a Take.

Note
To retrieve the Take System for a document simply call BaseDocument::GetTakeData().
See also
The Take System Overview articles in the C++ SDK documentation.
Since
17.008

Member Typedef Documentation

◆ SUPER

typedef BaseList2D SUPER

Member Function Documentation

◆ IsInstanceOf()

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

Reimplemented from BaseList2D.

◆ GetNext()

BaseTake* GetNext ( )

Gets the next Take in the list. Convenience version of GeListNode::GetNext() returning a BaseTake*.

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

◆ GetPred()

BaseTake* GetPred ( )

Gets the previous Take in the list. Convenience version of GeListNode::GetPred() returning a BaseTake*.

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

◆ GetUp()

BaseTake* GetUp ( )

Gets the parent Take of the list node. Convenience version of GeListNode::GetUp() returning a BaseTake*.

Returns
The parent Take, or nullptr if there is none. Cineware SDK owns the pointed BaseTake.

◆ GetDown()

BaseTake* GetDown ( )

Gets the first child Take of the list node. Convenience version of GeListNode::GetDown() returning a BaseTake*.

Returns
The first child Take, or nullptr if there is none. Cineware SDK owns the pointed BaseTake.

◆ GetDownLast()

BaseTake* GetDownLast ( )

Gets the last child Take of the list node. Convenience version of GeListNode::GetDownLast() returning a BaseTake*.

Returns
The last child Take, or nullptr if there is none. Cineware SDK owns the pointed BaseTake.

◆ IsMain()

Bool IsMain ( )

Checks if the Take is the Main Take.

Returns
true if the Take is the Main Take, otherwise false.

◆ SearchHierarchy()

Bool SearchHierarchy ( BaseTake op)

Checks if the Take is a child of op.

Parameters
[in]opThe Take to search within his hierarchy. The caller owns the pointed BaseTake.
Returns
true if the Take is child of op, otherwise false.

◆ GetOverrides()

Bool GetOverrides ( GeTempDynArray< GeListNode > &  selection)

Retrieves all Override nodes owned by the Take.

Parameters
[out]selectionThe Array to be filled.
Returns
true if successful, otherwise false.

◆ GetOverrideGroups()

Bool GetOverrideGroups ( GeTempDynArray< GeListNode > &  selection)

Retrieves all Override Groups nodes owned by the Take.

Parameters
[out]selectionThe Array to be filled.
Returns
true if successful, otherwise false.

◆ FindOrAddOverrideParam()

BaseOverride* FindOrAddOverrideParam ( TakeData takeData,
BaseList2D node,
const DescID descID,
const GeData overrideValue,
const GeData backupValue = GeData(),
Bool  deleteAnim = false 
)

Searches if parameter with descID is Overridden. If not adds a new Override with passed value for the Take.
If the BaseOverride node does not exist the function automatically allocates and inserts it, plus takes care to backup data properly in parent or Main Take.

Note
An undo step is added automatically if the call is added from the main (GUI) thread and global undo is allowed (see TakeData::GetUndoState/TakeData::SetUndoState).
Parameters
[in]takeDataThe Take System context. The caller owns the pointed TakeData.
[in]nodeThe scene node to override. The caller owns the pointed BaseList2D.
[in]descIDThe parameter DescID to override.
[in]overrideValueThe initial value to set in the overrides for the Take.
[in]backupValueOptionally provide the backup value for the Main/parent Take. Mandatory to set this for parameters not from the GUI.
[in]deleteAnimIf true and original parameter in the scene is animated the animation will be removed in the resulting Override.
Returns
The found or newly created BaseOverride node, or nullptr if any error.

◆ DeleteOverride()

void DeleteOverride ( TakeData takeData,
BaseList2D node,
const DescID descID 
)

Deletes a single parameter override for node with descID. If the Override results empty (no more overridden parameters) then it will be deleted too.

Note
An undo step is added automatically if the call is added from the main (GUI) thread and global undo is allowed (see TakeData::GetUndoState/TakeData::SetUndoState).
Parameters
[in]takeDataThe Take System context. The caller owns the pointed TakeData.
[in]nodeThe scene node to delete the parameter for. The caller owns the pointed BaseList2D.
[in]descIDThe parameter DescID to be deleted.

◆ FindOverride()

BaseOverride* FindOverride ( TakeData takeData,
BaseList2D node 
)

Searches if node is overridden in the Take.

Parameters
[in]takeDataThe Take System context. The caller owns the pointed TakeData.
[in]nodeThe node to search the BaseOverride for. The caller owns the pointed BaseList2D.
Returns
The BaseOverride if found, otherwise nullptr.

◆ FindOverrideInHierarchy()

BaseOverride* FindOverrideInHierarchy ( TakeData takeData,
BaseList2D node,
const DescID descID,
BaseTake *&  resultTake 
)

Searches if node parameter with descID is overridden in the Take or in a parent.

Parameters
[in]takeDataThe Take System context. The caller owns the pointed TakeData.
[in]nodeThe node to search the BaseOverride for. The caller owns the pointed BaseList2D.
[in]descIDThe parameter DescID to search for.
[out]resultTakeFilled with The Take that owns the Override. Can be equal to *this or nullptr if the Override is not found. The caller owns the pointed BaseTake.
Returns
The BaseOverride if found, otherwise nullptr.

◆ AddOverrideGroup()

BaseOverrideGroup* AddOverrideGroup ( )

Adds a new Override Group to the Take.

Note
An undo step is added automatically if the call is added from the main (GUI) thread and global undo is allowed (see TakeData::GetUndoState/TakeData::SetUndoState).
Returns
The added Override Group, or nullptr if any error.

◆ GetFirstOverrideGroup()

BaseOverrideGroup* GetFirstOverrideGroup ( )

Gets the first Override Group in the Take.

Returns
The first Override Group, or nullptr if there is none.

◆ GetCamera()

BaseObject* GetCamera ( TakeData takeData)

Gets the camera for the Take.

Note
Can return the default camera.
Parameters
[in]takeDataThe Take System context. The caller owns the pointed TakeData.
Returns
The camera assigned to the Take, or nullptr if the Take uses the camera from a parent Take.

◆ GetEffectiveCamera()

BaseObject* GetEffectiveCamera ( TakeData takeData,
BaseTake *&  resultTake 
)

Gets the camera used by the Take even if it comes from a parent Take.

Note
Can return the default camera.
Parameters
[in]takeDataThe Take System context. The caller owns the pointed TakeData.
[out]resultTakeThe Take the camera comes from. Cineware SDK owns the pointed BaseTake.
Returns
The camera used by the Take.

◆ SetCamera()

void SetCamera ( TakeData takeData,
BaseObject camera 
)

Sets the camera for the Take.

Note
Can be the default camera.
Parameters
[in]takeDataThe Take System context. The caller owns the pointed TakeData.
[in]cameraThe camera to set, or nullptr to reset and use one from a parent Take.

◆ GetRenderData()

RenderData* GetRenderData ( TakeData takeData)

Gets the RenderData for the Take.

Parameters
[in]takeDataThe Take System context. The caller owns the pointed TakeData.
Returns
The RenderData assigned to the Take, or nullptr if the Take uses the RenderData from a parent Take.

◆ GetEffectiveRenderData()

RenderData* GetEffectiveRenderData ( TakeData takeData,
BaseTake *&  resultTake 
)

Gets the RenderData used by the Take even if it comes from a parent Take.

Parameters
[in]takeDataThe Take System context. The caller owns the pointed TakeData.
[out]resultTakeThe Take the RenderData come from. Cineware SDK owns the pointed BaseTake.
Returns
The RenderData used by the Take.

◆ SetRenderData()

void SetRenderData ( TakeData takeData,
RenderData rData 
)

Sets the RenderData for the Take.

Parameters
[in]takeDataThe Take System context. The caller owns the pointed TakeData.
[in]rDataThe RenderData to set, or nullptr to reset and use one from a parent Take. The caller owns the pointed RenderData.

◆ Reset()

void Reset ( )

Resets all sub-structures and Overrides for the Take.

Warning
All data not in the current state of the document are deleted.

◆ CompactTake()

Bool CompactTake ( BaseDocument doc)

Private.

◆ RestoreTake()

Bool RestoreTake ( BaseDocument doc)

Private.

◆ Alloc()

static BaseTake* Alloc ( )
static

Private.

◆ Free()

static void Free ( BaseTake *&  p)
static

Private.