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

    Polygons and GetDirty()

    SDK Help
    0
    2
    189
    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 18/11/2015 at 01:46, xxxxxxxx wrote:

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

      ---------
      Is it possible to somehow differentiate when:

      1. A polygon object has been changed or edited through the viewport (the actual object itself has been modified)

      2. That same object has been affected by a deformer, but not actually modified in a destructive manner?

      I would have thought that GetDirty() was the way to go, but I can't seem to make the distinction between the two using it. If I call GetDirty(DIRTYFLAGS_DATA) on the polygon object itself, I get a different checksum whenever that polygon is changed OR a deformer acts upon it. Apparently I can't call GetDirty(DIRTYFLAGS_DATA) on the object returned by GetDeformCache() because it seems like the checksum is reset every time the caches are rebuilt (so the checksum could be the same even though a deformer has modified the object). GetDirty(DIRTYFLAGS_CACHE) seems to return a different checksum whenever something causes the rebuild of caches,  but I'm not sure if this occurs every time a deformer fires off or not.

      How can I tell which has happened?

      -CMPX

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

        On 18/11/2015 at 05:27, xxxxxxxx wrote:

        Remember that GetDirty() returns a state value that affects how C4D processes things like objects in order to, say, rebuild the cache when the object is affected by a deformer or creates parametric geometry and so on. Therefore, GetDirty() isn't going to be useful for such a differentiation - it simply denotes the need to rebuild when something changes.

        There are a set of messages, MSG_TRANSLATE_xxx, that should only occur when the points, polygons are modified using the modeling tools (triggered by Modeling::Commit()).  That would cover 1) and anything else 2) could be handled separately possibly.

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