c4d.AliasTrans

class c4d.AliasTrans

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

New in version R17.032.

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

trans = c4d.AliasTrans()
if not trans or not trans.Init(doc):
    return False

clone = op.GetClone(c4d.COPYFLAGS_NONE, trans)
if not clone:
    return False

trans.Translate(True)

Overview

Initialization

AliasTrans.Init()

Initializes the alias translator in the specified document doc.

Link Translation

AliasTrans.Translate()

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

Members

Initialization

AliasTrans.Init(self, 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.