◆
~TakeData()
成员函数文档编制
◆
Set()
Sets the internal document link for the
TakeData
.
Private
.
-
参数
-
-
返回
-
true
if successful, otherwise
false
.
◆
GetDocument()
Retrieves the document for the
TakeData
.
-
返回
-
The document, or
nullptr
if
TakeData
is not initialized.
Cinema 4D
owns the pointed
BaseDocument
.
◆
GetMainTake()
Retrieves the Main Take.
-
注意
-
Main Take is always the first under the header.
-
返回
-
The Main Take. Must be !
nullptr
.
◆
GetTakeMode()
Retrieves the Take System global mode, can be
TAKE_MODE::MANUAL
or
TAKE_MODE::AUTO
.
-
注意
-
This mode affects how the user has to interact with GUI to override parameters.
-
返回
-
The Take System mode:
TAKE_MODE
◆
GetOverrideEnabling()
Retrieves the ability for the Take System to override a specific kind of node based on global switch.
-
返回
-
The Take System override enabling:
OVERRIDEENABLING
◆
CheckOverrideEnabling()
Checks for a specific
OVERRIDEENABLING
.
-
参数
-
-
返回
-
true
若
OVERRIDEENABLING
is set otherwise
false
.
◆
GetTakeSelection()
Retrieves all the selected Takes.
-
参数
-
[in]
|
selection
|
An
AtomArray
to be filled with the selected Takes.
|
[in]
|
children
|
若
true
also selected Take children are collected.
|
◆
GetCurrentTake()
Retrieves a pointer to the current Take.
-
返回
-
The current Take, or
nullptr
if any error.
Cinema 4D
owns the pointed
BaseTake
.
◆
SetCurrentTake()
Sets the current Take.
-
注意
-
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
).
-
参数
-
[in]
|
take
|
The Take to set. If
nullptr
is passed the Main Take will be set. The caller owns the pointed
BaseTake
.
|
-
返回
-
true
if successful, otherwise
false
.
◆
TakeToDocument()
Isolates a Take in a new document.The new document will be allocated and filled by the function.
-
注意
-
The caller has to insert the document if necessary.
-
参数
-
[in]
|
take
|
The Take to isolate. The caller owns the pointed
BaseTake
.
|
-
返回
-
The allocated
BaseDocument
.
◆
SaveTakesWithAssets()
Bool
SaveTakesWithAssets
|
(
|
Bool
|
selected
|
)
|
|
Executes a "Save Project With Assets" for Takes in document with each saved file representing a Take.
-
参数
-
[in]
|
selected
|
若
true
only selected Takes are exported otherwise all.
|
-
返回
-
true
if successful, otherwise
false
.
◆
AddTake()
Creates and inserts a new Take.
-
注意
-
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
).
-
警告
-
Selections have to be handled manually.
-
参数
-
[in]
|
name
|
The name of the Take to add. If an empty string is passed default Take name will be used.
|
[in]
|
parent
|
Optionally 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]
|
cloneFrom
|
Optionally pass a Take the new Take will be cloned from. The caller owns the pointed
BaseTake
.
|
-
返回
-
The new Take. Must be !
nullptr
.
◆
DeleteTake()
Deletes a Take and all connected overrides. If Take is the current the Main Take will be set as current.
-
注意
-
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
).
-
参数
-
[in]
|
take
|
The Take to delete. The caller owns the pointed
BaseTake
.
|
◆
InsertTake()
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.
-
注意
-
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
).
-
参数
-
[in]
|
takeToMove
|
The Take to move. The caller owns the pointed
BaseTake
.
|
[in]
|
destTake
|
The parent destination Take. If
nullptr
the Main Take will be used. In this case NOTOK can be used as the insert mode to add the take as the last child of the main take. The caller owns the pointed
BaseTake
.
|
[in]
|
insertMode
|
The insertion mode. Can be
INSERT_BEFORE
or
INSERT_AFTER
or
INSERT_UNDER
.
|
◆
FindOverrideCounterPart()
Finds the backup node that fits with an Override (for example the backup node in the Main Take).
-
参数
-
[in]
|
overrideNode
|
The original Override node. The caller owns the pointed
BaseOverride
.
|
[in]
|
descID
|
The description ID to check.
|
[out]
|
resultTake
|
The Take that owns the returned node, or
nullptr
if no counterpart found.
Cinema 4D
owns the pointed
BaseOverride
.
|
-
返回
-
The counterpart node, or
nullptr
if any error.
◆
SendNodeToRepository()
Private
.
◆
GetNodeFromRepository()
Private
.
◆
GetUndoState()
Gets the state of automatic Take undo.
-
注意
-
It is useful to deactivate undo when working on document clones in several situation like import/export operations where undo is not important.
-
返回
-
true
if the automatic undo is active, otherwise
false
.
◆
SetUndoState()
void SetUndoState
|
(
|
Bool
|
state
|
)
|
|
Activates or deactivates the state of automatic Take undo.
-
注意
-
It is useful to deactivate undo when working on document clones in several situation like import/export operations where undo is not important.
-
参数
-
[in]
|
state
|
true
if the automatic undo has to be used, otherwise
false
.
|
◆
ResetSystem()
Resets completely the Take System. Usually not needed.
-
警告
-
All data not in the current state of the document are deleted.