c4d.modules.takesystem.TakeData

class c4d.modules.takesystem.TakeData

Methods Signatures

TakeData.GetDocument(self)

Retrieves the document for the TakeData.

TakeData.GetMainTake(self)

Retrieves the Main Take.

TakeData.GetTakeMode(self)

Retrieves the Take System global mode. Can be TAKE_MODE_MANUAL or TAKE_MODE_AUTO.

TakeData.GetOverrideEnabling(self)

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

TakeData.CheckOverrideEnabling(self, mask)

Checks for a specific OVERRIDEENABLING.

TakeData.GetTakeSelection(self, children)

Retrieves the selected Takes.

TakeData.GetCurrentTake(self)

Retrieves the current Take.

TakeData.SetCurrentTake(self, take)

Sets the current Take.

TakeData.TakeToDocument(self, take)

Isolates a Take in a new document. The new document is allocated and filled by the function.

TakeData.SaveTakesWithAssets(self, selected)

Executes a “Save Project With Assets” for Takes in the document, each saved file representing a Take.

TakeData.AddTake(self, name, parent, ...)

Creates and inserts a new Take.

TakeData.DeleteTake(self, take)

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

TakeData.InsertTake(self, takeToMove, ...)

Moves a Take in the hierarchy in a safe way.

TakeData.FindOverrideCounterPart(self, overrideNode, descID)

Finds the backup node that fits with an Override (for example the backup node in the Main Take).

TakeData.GetUndoState(self)

Gets the state of automatic Take undo.

TakeData.SetUndoState(self, state)

Activates or deactivates the state of automatic Take undo.

TakeData.ResetSystem(self)

Resets completely the Take System. Usually not needed.

Methods Documentation

TakeData.GetDocument(self)

Retrieves the document for the TakeData.

Return type

c4d.documents.BaseDocument

Returns

The document, or None if the TakeData is not initialized.

TakeData.GetMainTake(self)

Retrieves the Main Take.

Note

Main Take is always the first under the header.

Return type

c4d.modules.takesystem.BaseTake

Returns

The Main Take.

TakeData.GetTakeMode(self)

Retrieves the Take System global mode. Can be TAKE_MODE_MANUAL or TAKE_MODE_AUTO.

Note

This mode affects how the user has to interact with GUI to override parameters.

Return type

int

Returns

The Take System mode:

TAKE_MODE_MANUAL

Manual override: the user has to explicitly override every single parameter.

TAKE_MODE_AUTO

Auto override: the system overrides any edited parameter (similar to Auto Key).

TakeData.GetOverrideEnabling(self)

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

Return type

int

Returns

The Take System override enabling:

OVERRIDEENABLING_NONE

None.

OVERRIDEENABLING_OBJECT

Object override enabled.

OVERRIDEENABLING_TAG

Tag override enabled.

OVERRIDEENABLING_MATERIAL

Material override enabled.

OVERRIDEENABLING_SHADER

Shader override enabled.

OVERRIDEENABLING_LAYER

Layer override enabled.

OVERRIDEENABLING_OTHER

Other types override enabled.

OVERRIDEENABLING_GLOBAL

Main switch types override enabled.

OVERRIDEENABLING_ENABLING

Object enabling and visibility override enabled.

OVERRIDEENABLING_TRANSFOM

Transformation override enabled.

OVERRIDEENABLING_CAMERA

Active camera override enabled.

OVERRIDEENABLING_RS

Active render settings override enabled.

OVERRIDEENABLING_PARAM

Generic parameter override enabled.

TakeData.CheckOverrideEnabling(self, mask)

Checks for a specific OVERRIDEENABLING.

Parameters

mask (int) –

The Take System override enabling mask:

OVERRIDEENABLING_NONE

None.

OVERRIDEENABLING_OBJECT

Object override enabled.

OVERRIDEENABLING_TAG

Tag override enabled.

OVERRIDEENABLING_MATERIAL

Material override enabled.

OVERRIDEENABLING_SHADER

Shader override enabled.

OVERRIDEENABLING_LAYER

Layer override enabled.

OVERRIDEENABLING_OTHER

Other types override enabled.

OVERRIDEENABLING_GLOBAL

Main switch types override enabled.

OVERRIDEENABLING_ENABLING

Object enabling and visibility override enabled.

OVERRIDEENABLING_TRANSFOM

Transformation override enabled.

OVERRIDEENABLING_CAMERA

Active camera override enabled.

OVERRIDEENABLING_RS

Active render settings override enabled.

OVERRIDEENABLING_PARAM

Generic parameter override enabled.

Return type

bool

Returns

True if the OVERRIDEENABLING is set, otherwise False.

TakeData.GetTakeSelection(self, children)

Retrieves the selected Takes.

Parameters

mask (bool) – If True also selected Take children are collected.

Return type

list of BaseTake

Returns

The selected Takes.

TakeData.GetCurrentTake(self)

Retrieves the current Take.

Return type

c4d.modules.takesystem.BaseTake

Returns

The current Take.

TakeData.SetCurrentTake(self, take)

Sets the current 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

take (c4d.modules.takesystem.BaseTake) – The Take to set.

Return type

bool

Returns

True if successful, otherwise False.

TakeData.TakeToDocument(self, take)

Isolates a Take in a new document. The new document is allocated and filled by the function.

Note

The caller has to insert the document if necessary.

Parameters

take (c4d.modules.takesystem.BaseTake) – The Take to isolate.

Return type

c4d.documents.BaseDocument

Returns

The allocated document.

TakeData.SaveTakesWithAssets(self, selected)

Executes a “Save Project With Assets” for Takes in the document, each saved file representing a Take.

Parameters

selected (bool) – If True only selected Takes are exported, otherwise all.

Return type

bool

Returns

True if successful, otherwise False.

TakeData.AddTake(self, name, parent, cloneFrom)

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
  • name (str) – The name of the Take to add. If an empty string is passed the default Take name will be used.

  • parent (c4d.modules.takesystem.BaseTake) – Optionally pass a parent Take, otherwise the new Take will be added at the end of the list under the Main Take.

  • cloneFrom (c4d.modules.takesystem.BaseTake) – Optionally pass a Take the new Take will be cloned from.

Return type

c4d.modules.takesystem.BaseTake

Returns

The added Take.

TakeData.DeleteTake(self, take)

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

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

take (c4d.modules.takesystem.BaseTake) – The Take to delete.

TakeData.InsertTake(self, takeToMove, destTake, 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.

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
  • takeToMove (c4d.modules.takesystem.BaseTake) – The Take to move.

  • destTake (c4d.modules.takesystem.BaseTake) – The parent destination Take. If None the Main Take is used. In this case c4d.NOTOK can be used as the insert mode to add the take as the last child of the main take

  • insertMode (int) –

    The insertion mode:

    INSERT_BEFORE

    Insert before.

    INSERT_AFTER

    Insert after.

    INSERT_UNDER

    Insert under.

    INSERT_REPLACE

    Replace the object.

TakeData.FindOverrideCounterPart(self, overrideNode, descID)

Finds the backup node that fits with an Override (for example the backup node in the Main Take).

Parameters
Return type

Tuple[c4d.modules.takesystem.BaseOverride>, c4d.modules.takesystem.BaseTake>]

Returns

The counterpart node and the Take that owns it.

TakeData.GetUndoState(self)

Gets the state of automatic Take undo.

Note

It is useful to deactivate undo when working on document clones in several situation like import/export operations where undo is not important.

Return type

bool

Returns

True if the automatic undo is active, otherwise False.

TakeData.SetUndoState(self, state)

Activates or deactivates the state of automatic Take undo.

Note

It is useful to deactivate undo when working on document clones in several situation like import/export operations where undo is not important.

Parameters

state (bool) – True if the automatic undo has to be used, otherwise False.

TakeData.ResetSystem(self)

Resets completely the Take System. Usually not needed.

Warning

All data not in the current state of the document is deleted.