#include <c4d_baselist.h>
An alias translator class.
The alias translator takes care about reconnecting
BaseLink
links when cloning, copying, reading or writing objects.
Normally
Cinema 4D
will provide an alias translator when needed, for example in
NodeData::CopyTo()
. However, to copy objects manually use:
私有成员函数 |
|
AliasTrans () | |
~AliasTrans () |
Alloc/Free |
|
static AliasTrans * | Alloc () |
static void | Free ( AliasTrans *&link) |
Init and Translate |
|
Bool | Init ( BaseDocument *doc) |
void | Translate ( Bool connect_oldgoals) |
|
|
|
static |
Allocates an alias translator. Destroy the allocated alias translator with Free() 。使用 AutoAlloc to automate the allocation and destruction based on scope.
|
static |
Destructs alias translators allocated with Alloc() 。使用 AutoAlloc to automate the allocation and destruction based on scope.
[in,out] | link | The alias translator to destruct. If the pointer is nullptr nothing happens. The pointer is assigned nullptr afterwards. |
Bool Init | ( | BaseDocument * | doc | ) |
Initializes the alias translator in the specified document doc .
[in] | doc | The document. The caller owns the pointed object. |
void Translate | ( | Bool | connect_oldgoals | ) |
Translates the links in all objects that the translator has come across.
[in] | connect_oldgoals |
Connect old goals.
For example: Take a cube with an instance linked to this cube, select both and duplicate them in one action. The new cube is linked to the new instance if connect_oldgoals is true . If it is false the new instance is linked to the old cube. |