TakeData Class Reference

#include <c4d_takedata.h>

Protected Member Functions

 TakeData ()
 
 ~TakeData ()
 

Protected Attributes

BaseDocument_doc
 

Friends

class BaseDocument
 

Miscellaneous

Bool Set (BaseDocument *doc)
 
BaseDocumentGetDocument ()
 
BaseTakeGetMainTake ()
 

Override Enabling

OVERRIDEENABLING GetOverrideEnabling ()
 
Bool CheckOverrideEnabling (OVERRIDEENABLING mask)
 

Take

BaseTakeGetCurrentTake ()
 
Bool SetCurrentTake (BaseTake *take)
 
BaseTakeAddTake (const String &name, BaseTake *parent, BaseTake *cloneFrom=nullptr)
 
void DeleteTake (BaseTake *take)
 
void InsertTake (BaseTake *takeToMove, BaseTake *destTake, Int32 insertMode)
 
BaseOverrideFindOverride (BaseTake *take, BaseList2D *op)
 
BaseOverrideAddOverride (const OverrideDataSet &param)
 
void DeleteOverride (const OverrideDataSet &param)
 
BaseOverrideFindOverrideCounterPart (BaseOverride *overrideNode, const DescID &descId, BaseTake *&resultTake)
 
BaseOverrideFindOverrideInHierarchy (BaseTake *take, BaseList2D *op, const DescID &descId, BaseTake *&resultTake)
 

Detailed Description

Stores the Take System related data of a BaseDocument.

See also
The Take System Overview articles in the C++ SDK documentation.
Since
17.008

Constructor & Destructor Documentation

◆ TakeData()

TakeData ( )
protected

◆ ~TakeData()

~TakeData ( )
protected

Member Function Documentation

◆ Set()

Bool Set ( BaseDocument doc)

Sets the internal document link for the TakeData. Private.

Parameters
[in]docThe document to attach to the TakeData. The caller owns the pointed BaseDocument.
Returns
true if successful, otherwise false.

◆ GetDocument()

BaseDocument* GetDocument ( )

Retrieves the document for the TakeData.

Returns
The document, or nullptr if TakeData is not initialized. Cineware SDK owns the pointed BaseDocument.

◆ GetMainTake()

BaseTake* GetMainTake ( )

Retrieves the Main Take.

Note
Main Take is always the first under the header.
Returns
The Main Take. Must be !nullptr.

◆ GetOverrideEnabling()

OVERRIDEENABLING GetOverrideEnabling ( )

Retrieves the ability for the Take System to override a specific kind of node based on global switch.

Returns
The Take System override enabling: OVERRIDEENABLING

◆ CheckOverrideEnabling()

Bool CheckOverrideEnabling ( OVERRIDEENABLING  mask)

Checks for a specific OVERRIDEENABLING.

Parameters
[in]maskThe Take System override enabling mask: OVERRIDEENABLING
Returns
true if the OVERRIDEENABLING is set otherwise false.

◆ GetCurrentTake()

BaseTake* GetCurrentTake ( )

Retrieves a pointer to the current Take.

Returns
The current Take, or nullptr if any error. Cineware SDK owns the pointed BaseTake.

◆ SetCurrentTake()

Bool SetCurrentTake ( BaseTake take)

Sets the current Take.

Parameters
[in]takeThe Take to set. If nullptr is passed the Main Take will be set. The caller owns the pointed BaseTake.
Returns
true if successful, otherwise false.

◆ AddTake()

BaseTake* AddTake ( const String name,
BaseTake parent,
BaseTake cloneFrom = nullptr 
)

Creates and inserts a new 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).
Warning
Selections have to be handled manually.
Parameters
[in]nameThe name of the Take to add. If an empty string is passed default Take name will be used.
[in]parentOptionally pass a parent Take otherwise new Take will be added at the end of the list under the Main Take. The caller owns the pointed BaseTake.
[in]cloneFromUNUSED, NOT SUPPORTED YET. (Optionally pass a Take the new Take will be cloned from. The caller owns the pointed BaseTake.)
Returns
The new Take. Must be !nullptr.

◆ DeleteTake()

void DeleteTake ( BaseTake take)

Deletes a Take and all connected overrides. If Take is the current the Main Take will be set as current.

Parameters
[in]takeThe Take to delete. The caller owns the pointed BaseTake.

◆ InsertTake()

void InsertTake ( BaseTake takeToMove,
BaseTake destTake,
Int32  insertMode 
)

Moves a Take in the hierarchy in a safe way.
The Take system has several hierarchy dependencies.
If a Take is moved while it is current or while it is a child of the Current Take then this would need to manually take care of all data sorting and handling.
This function do all this work for you.

Parameters
[in]takeToMoveThe Take to move. The caller owns the pointed BaseTake.
[in]destTakeThe parent destination Take. If nullptr the Main Take will be used. The caller owns the pointed BaseTake.
[in]insertModeThe insertion mode. Can be INSERT_BEFORE or INSERT_AFTER or INSERT_UNDER.

◆ FindOverride()

BaseOverride* FindOverride ( BaseTake take,
BaseList2D op 
)

Private.

◆ AddOverride()

BaseOverride* AddOverride ( const OverrideDataSet param)

Private.

◆ DeleteOverride()

void DeleteOverride ( const OverrideDataSet param)

Private.

◆ FindOverrideCounterPart()

BaseOverride* FindOverrideCounterPart ( BaseOverride overrideNode,
const DescID descId,
BaseTake *&  resultTake 
)

Private.

◆ FindOverrideInHierarchy()

BaseOverride* FindOverrideInHierarchy ( BaseTake take,
BaseList2D op,
const DescID descId,
BaseTake *&  resultTake 
)

Private.

Friends And Related Function Documentation

◆ BaseDocument

friend class BaseDocument
friend

Member Data Documentation

◆ _doc

BaseDocument* _doc
protected