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

    How to tell if a polygon object was changed?

    SDK Help
    0
    2
    242
    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 29/03/2016 at 02:51, xxxxxxxx wrote:

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

      ---------
      Greetings to all.

      I have a tag plugin that reads in some point data from another polygon object, and I'm trying to determine when that polygon object is changed (more specifically, when the topology is modified).

      Originally, I was using GetCache(DIRTYFLAGS_DATA) for this, but that doesn't work if the polygon object has a Weight tag on it (the moment you touch any joints associated with that tag, the dirty data checksum changes).

      I've tried using MSG_POINTS_CHANGED and MSG_POLYGONS_CHANGED, but these don't seem to tell me what object has actually been modified and I get spurious messages from other sources when I know the polygon object in question has **not** been modified.

      I've also tried using MSG_TRANSLATE_POLYGONS and MSG_TRANSLATE_POINTS. I receive neither message if I start modifying the polygon object in the viewport.

      Is there no way to tell when a polygon object has been modified? I don't need to know *how* it was modified, only that it was. My plugin does some computationally expensive calculations that don't need to occur unless the polygon topology changes, so I'd rather not go through that entire process every time the tag is executed if I don't have to.

      -CMPX

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

        On 30/03/2016 at 02:08, xxxxxxxx wrote:

        Hello,

        I wouldn't know any specific way to learn if a polygon object changed its topology. Both the polygon data and the tags assigned to an object are internal data of that polygon object. So when the polygon data is changed the dirty flags change and also when tags are changed the dirty flags change (I assume you don't actually do GetCache(DIRTYFLAGS_DATA) but GetDirty() ).

        So I'm afraid that checking GetDirty() is the best option I know.

        Best wishes,
        Sebastian

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