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 from Hierarchy has changed

    SDK Help
    0
    2
    282
    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 20/03/2016 at 09:31, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   R17 
      Platform:   Windows  ;   
      Language(s) :

      ---------
      Hello.

      I have to great a messenger that catches the changes done by the user in any object in the hierarchy.
      So, in case of an EVMSG_DOCUMENTRECALCULATED event, I scan the hierarchy and for each object, I use the GetDirty method to check if that object has changed. Since GetDirty returns a checksum number, it appears that I need to compare it with a previous checksum number. So, It seems that I have to create a map with objects as keys and dirty numbers as values and with a change in any object, I have to scan all the hierarchy and ask each object for their dirty bits. Is there any alternative approach to check if an object has changes ? (matrix, cache, etc)

      Can I get directly the dirty objects without having to scan the hierarchy ?

      Thank you for your time.

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

        On 21/03/2016 at 03:19, xxxxxxxx wrote:

        Hello,

        there is no function that would return a list of changed objects. You have to create such a function yourself – by scanning the hierarchy. But you can use GetHDirty on the given BaseDocument to check if anything relevant changed and if a hierarchy scan is needed or not.

        Best wishes,
        Sebastian

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