Uniquely identify objects by id



  • On 08/08/2013 at 13:32, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   R14 
    Platform:      Mac OSX  ; 
    Language(s) :     C++  ;

    ---------
    Imagine an animation track and a sequence of objects, where there are as many objects as there are frames (one object is "assigned" to one frame). I have a sliding window that processes the objects that are relevant: say I am at frame 300, I am interested in 10 objects, numbered 290 to 300; when I am at frame 301, I am interested in 10 objects, numbered 291 to 301 etc. When I moved to frame 301 I would like to throw away object 290 and add object 301, while keeping the rest intact, including the results of the calculations done on each object.

    For this window I would like to keep something like an object hashmap, keyed on object's unique ids.

    Are the object unique ids available in Cinema 4d?

    Thanks.

    --8



  • On 08/08/2013 at 13:42, xxxxxxxx wrote:

    Hi eight, with nine posts 😉
    yes there i such.
    I use:

    BaseObject* foo = ...
    LULONG guid = foo->GetGUID();
    

    So far I have successfully used this as a unique identifier, persistent between C4D sessions.



  • On 08/08/2013 at 17:10, xxxxxxxx wrote:

    Ah, nice!

    Thanks a lot @ingvarai

    --8


Log in to reply