Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Uniquely identify objects by id

    SDK Help
    0
    3
    287
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

      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

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        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.

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

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

          Ah, nice!

          Thanks a lot @ingvarai

          --8

          1 Reply Last reply Reply Quote 0
          • First post
            Last post