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 doesn't update its cache bit

    SDK Help
    0
    4
    1.1k
    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 21/05/2018 at 06:04, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   R18 
      Platform:      
      Language(s) :

      ---------
      Hello.

      I have a plane which has a bend deformer as child.
      The deformer's strength parameter is animated.
      The problem is that whenever I move the timeline track bar forward and backward, the plane is deformed in the viewport, but I don't receive a cache update for it.
      Only the deformer's cache is updated.
      Shouldn't the plane have its cache bit updated ?

      Thank you for your time.

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

        On 22/05/2018 at 06:49, xxxxxxxx wrote:

        Hi Peterakos, thanks for writing us.

        With regard to your post, I confirm that the reported behavior is indeed correct since the bend deformer (or any other deformer) isn't actually changing the topology of the underlying geometry (the plane).  Instead updating any of the parameters related to the plane generation would force a object geometry refresh causing the the dirtiness of the DIRTYFLAGS_CACHE to change (actually to increase). This is actually the reason why in Cinema deform-cache is distinct from cache and should be accessed respectively with BaseObject::GetDeformCache() and BaseObject::GetCache().

        Best, Riccardo

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

          On 23/05/2018 at 23:32, xxxxxxxx wrote:

          Hello and thank you very much for your help !

          As the manual says "the deformer will affect its parent object and the hierarchy below that parent".
          So, every time a deformer's cache is updated I can set the parent's cache bit dirty. How can I know if an object is deformer ? (other than comparing the object Id with Obend, Otwist, e.t.c.)

          Thank you for your time !

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

            On 24/05/2018 at 02:00, xxxxxxxx wrote:

            Hi Peterakos,thanks for following up.

            Checking if an item is a modifier can be accomplished by using GeListNode::GetInfo() and using a bitwise "and" operator with OBJECT_MODIFIER flag:

              
            if (myObject && myObject->GetInfo() & OBJECT_MODIFIER)
            {
                // do something here: the object is a modifier since it was registered with the OBJECT_MODIFIER flag  
               ...
            }  
            
            

            That said it could worth having a look at the BaseObject Manual  in the Flags section.

            Best, Riccardo

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