TakeData
¶
New in version R17.032.
Stores the Take System related data of a
document
.
Note
To retrieve the Take System for a document simply call
BaseDocument.GetTakeData()
.
This type cannot be instantiated.
c4d.modules.takesystem.
TakeData
¶
TakeData.
GetDocument
(
)
¶
Retrieves the document for the
TakeData
.
Return type: | c4d.documents.BaseDocument |
---|---|
Returns: |
The document, or
None
if the
TakeData
is not initialized.
|
TakeData.
GetMainTake
(
)
¶
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
(
)
¶
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:
|
TakeData.
GetOverrideEnabling
(
)
¶
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:
|
TakeData.
CheckOverrideEnabling
(
mask
)
¶
Checks for a specific OVERRIDEENABLING .
Parameters: |
mask
(
int
) –
The Take System override enabling mask:
|
||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Return type: | bool | ||||||||||||||||||||||||||
Returns: | True if the OVERRIDEENABLING is set, otherwise False . |
TakeData.
GetTakeSelection
(
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
(
)
¶
Retrieves the current Take.
Return type: | c4d.modules.takesystem.BaseTake |
---|---|
Returns: | The current Take. |
TakeData.
SetCurrentTake
(
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
(
)
¶
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
(
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
(
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: |
|
---|---|
Return type: | |
Returns: |
The added Take. |
TakeData.
DeleteTake
(
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
(
takeToMove
,
destTake
,
insertMode
)
¶
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: |
|
---|
TakeData.
FindOverrideCounterPart
(
overrideNode
,
descID
)
¶
Finds the backup node that fits with an Override (for example the backup node in the Main Take).
Parameters: |
|
---|---|
Return type: |
tuple(
|
Returns: |
The counterpart node and the Take that owns it. |
TakeData.
GetUndoState
(
)
¶
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
(
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
(
)
¶
Resets completely the Take System. Usually not needed.
Warning
All data not in the current state of the document is deleted.