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

    object identity (id) changes

    Scheduled Pinned Locked Moved PYTHON Development
    2 Posts 0 Posters 476 Views
    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 Offline
      Helper
      last edited by

      On 10/02/2018 at 04:33, xxxxxxxx wrote:

      Hi,
      according to the Python manual:

      Return the ``identity'' of an object. This is an integer (or long integer) which is guaranteed to be unique and constant for this object during its lifetime. Two objects with non-overlapping lifetimes may have the same id() value. (Implementation note: this is the address of the object.)

      When I query the id of an object, I get a variety of numbers, as well as a variety of memory allocations, that loop regularly.

      https://www.dropbox.com/s/ndbbqh0hra8l7hf/id varying 01A.c4d?dl=0

      my intention is to generate a unique name for an object so that it's consistent for the lifetime of that object

      Cheers
      Thanassis

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

        On 10/02/2018 at 05:09, xxxxxxxx wrote:

        as usual, I searched a bit more and found the solution.
        I followed another thread and found GetGUID()

        Here's the result. Each cube has a unique GUID

        https://www.dropbox.com/s/hlzm08usn2awbm1/GetGUID%2002A.c4d?dl=0

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