Plugin Cafe Homepage
Forum Home Forum Home > Plugin Cafe > SDK Help
  New Posts New Posts
  FAQ FAQ  Forum Search   Register Register  Login Login

Can AliasTrans instances be reused?

 Post Reply Post Reply
Author
Message
CMPXCHG8B View Drop Down
Member
Member


Joined: 2011 Dec 11
Online Status: Offline
Posts: 95
Post Options Post Options   Quote CMPXCHG8B Quote  Post ReplyReply Direct Link To This Post Topic: Can AliasTrans instances be reused?
    Posted: 2018 Mar 07 at 4:58am

User Information:

Cinema 4D Version:   R17 
Platform:    Mac  ;  
Language(s):     C++  ;   

---------

Is it safe to use a single AliasTrans instance for multiple cloning operations with GetClone() or GetHierarchyClone()?

Or are you expected to free it and create a new instance for each use?

If it can be reused, what happens if you call GetClone() a dozen times with the same AliasTrans instance, then call Translate() afterwards? Is this preferred to calling Translate() after each call to GetClone()?

-CMPX


Edited by CMPXCHG8B - 2018 Mar 07 at 4:59am
Back to Top
Andreas Block View Drop Down
Forum Moderator
Forum Moderator
Avatar

Joined: 2014 Oct 01
Location: Hannover
Online Status: Offline
Posts: 1847
Post Options Post Options   Quote Andreas Block Quote  Post ReplyReply Direct Link To This Post Posted: 2018 Mar 08 at 8:59am
Hi,

yes, you can use one AliasTrans for several copy or clone operations with just one call to Translate() in the end.
Maybe the code snipped in the C4DAtom manual also helps.

Cheers,
Andreas
SDK Support Engineer
Back to Top
CMPXCHG8B View Drop Down
Member
Member


Joined: 2011 Dec 11
Online Status: Offline
Posts: 95
Post Options Post Options   Quote CMPXCHG8B Quote  Post ReplyReply Direct Link To This Post Posted: 2018 Mar 09 at 5:31am
Huh, didn't know about that code snippet. Thanks for pointing that out!

-CMPX
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Bulletin Board Software by Web Wiz Forums® version 9.61 [Free Express Edition]
Copyright ©2001-2009 Web Wiz

This page was generated in 0.093 seconds.