c4d.AliasTrans

New in version R17.032.

The alias translator takes care about reconnecting BaseLink links when cloning, copying, reading or writing objects.

Normally Cinema 4D provides an alias translator when needed, for example in NodeData.CopyTo() . However, to copy objects manually use:

trans = c4d.AliasTrans()
if trans is None or trans.Init(doc) is False:
return False
clone = op.GetClone(c4d.COPYFLAGS_0, trans);
if clone is None:
return False
trans.Translate(True)
					

Definition

class c4d. AliasTrans

Members

AliasTrans. Init ( doc )

Initializes the alias translator in the specified document doc .

Parameters: doc ( c4d.documents.BaseDocument ) – The document.
Return type: bool
Returns: True if the alias translator was initialized, otherwise False .
AliasTrans. Translate ( connect_oldgoals )

Translates the links in all objects that the translator has come across.

Parameters: connect_oldgoals ( bool ) – True to 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.

Table Of Contents