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
    • Recent
    • Tags
    • Users
    • Login

    IsDirty and GetDirty

    Scheduled Pinned Locked Moved PYTHON Development
    2 Posts 0 Posters 212 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 04/07/2014 at 02:57, xxxxxxxx wrote:

      I like to check using a plugin or a script, whether the object has changed.
      IsDirty is not giving me any information, so I use GetDirty and check whether that value has changed.
      That is ok when in Model mode, but when in Polygon mode, the value returned by GetDirty is not changed when I move a polygon?
      DIRTY_MATRIX and the others are all returning the same value.

      How to check whether a polygon has moved, scaled or rotated?

      import c4d
      from c4d import gui
        
      def main() :
          obj = doc.SearchObject("Cube")
          print "--- IsDirty ---"
          print "Get DIRTY_MATRIX", obj.GetDirty(c4d.DIRTY_MATRIX) 
          print "Get DIRTY_SELECT: ", obj.GetDirty(c4d.DIRTY_SELECT)
          print "Get DIRTY_CACHE: ", obj.GetDirty(c4d.DIRTY_CACHE)
          print "Get DIRTY_CHILDREN: ", obj.GetDirty(c4d.DIRTY_CHILDREN)   
          
      if __name__=='__main__':
          main()
        
      
      
      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        On 04/07/2014 at 04:54, xxxxxxxx wrote:

        IsDirty() should be used for Generator plugins only.
        You know there is another one, DIRTYFLAGS_DATA, right? This one is changed
        when the polygons or points changed of an object.

        Best,
        -Niklas

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