Open Search
    AliasTrans Class Reference

    #include <c4d_baselink.h>

    Public Member Functions

    Bool Init ()
     
    void Zap (Bool connect_oldgoals)
     
    void SetAliasGoal (const GeAliasID &id, GeAliasGoal *goal)
     

    Private Member Functions

    void XSetGoalFromID (const GeAliasID &id, GeAliasGoal *goal)
     
    void XSetAliasFromID (const GeAliasID &id, BaseLink *link, GeAliasGoal *old_goal)
     
    void SetGoalFromID (const GeAliasID &id, GeAliasGoal *goal)
     
    void SetAliasFromID (const GeAliasID &id, BaseLink *link, GeAliasGoal *old_goal)
     

    Private Attributes

    GeAliasXTrans * xtrans
     

    Friends

    class GeAliasGoal
     
    class BaseLink
     

    Constructor/Destructor

     AliasTrans ()
     
     ~AliasTrans ()
     

    Detailed Description

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

    if (!trn.Init())
    return nullptr; // Out of memory
    BaseMaterial* clone = (BaseMaterial*)mat->GetClone(COPYFLAGS_NONE, &trn);
    if (!clone)
    return nullptr; // Out of memory

    Constructor & Destructor Documentation

    ◆ AliasTrans()

    Default constructor.

    ◆ ~AliasTrans()

    ~AliasTrans ( )

    Default destructor.

    Member Function Documentation

    ◆ XSetGoalFromID()

    void XSetGoalFromID ( const GeAliasID id,
    GeAliasGoal goal 
    )
    private

    ◆ XSetAliasFromID()

    void XSetAliasFromID ( const GeAliasID id,
    BaseLink link,
    GeAliasGoal old_goal 
    )
    private

    ◆ SetGoalFromID()

    void SetGoalFromID ( const GeAliasID id,
    GeAliasGoal goal 
    )
    private

    ◆ SetAliasFromID()

    void SetAliasFromID ( const GeAliasID id,
    BaseLink link,
    GeAliasGoal old_goal 
    )
    private

    ◆ Init()

    Bool Init ( )

    Initializes the alias translator.

    Returns
    true if the alias translator was initialized, otherwise false.

    ◆ Zap()

    void Zap ( Bool  connect_oldgoals)

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

    Parameters
    [in]connect_oldgoalsPass 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.

    ◆ SetAliasGoal()

    void SetAliasGoal ( const GeAliasID id,
    GeAliasGoal goal 
    )

    Private.

    Friends And Related Function Documentation

    ◆ GeAliasGoal

    friend class GeAliasGoal
    friend

    ◆ BaseLink

    friend class BaseLink
    friend

    Member Data Documentation

    ◆ xtrans

    GeAliasXTrans* xtrans
    private
    cineware::AliasTrans::AliasTrans
    AliasTrans()
    Default constructor.