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

    Voronoi cache is not changed

    SDK Help
    0
    4
    893
    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 11/01/2018 at 06:17, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   R18 
      Platform:   Windows  ;   
      Language(s) :     C++  ;

      ---------
      Hello.

      I have a Voronoi Fracture and as child it has a sphere with a material. Once I replace the material by dragging and dropping a different one on the same tag, an EVMSG_DOCUMENTRECALCULATED event is generated.

      At that moment, I parse the hierarchy to see what has changed. The problem is that even though I get a DIRTYFLAGS_CACHE due to the change on the sphere, I cannot use it since it is a control object (BIT_CONTROLOBJECT). Is it possible to receive the notification on the voronoi that one of its CACHE children has changed ?

      The problem here is that If I do the same on an Array, it gives me a dirty cache mask while Voronoi doesn't.
       
      Thank you for your time.

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

        On 12/01/2018 at 09:10, xxxxxxxx wrote:

        Hi Peterakos, thanks for writing us.

        With regard to the your request, although I see your intent to optimize the search for any dirty status change, I suggest to try to use C4DAtom::GetHDirty() rather than C4DAtom::GetDirty().
        In any case I warmly recommend no to make any assumption on the children's cache dirtiness based on the generator's cache dirtiness.

        Best, Riccardo

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

          On 14/01/2018 at 14:00, xxxxxxxx wrote:

          Hello and thank you for your answer.

          Is GetHDirty referring to the actual hierarchy children or cache children ?

          Thank you.

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

            On 26/01/2018 at 07:01, xxxxxxxx wrote:

            Hello.

            Please allow me to bring this up again since I have tested everything and at this point I really don't know which path is better for my case.

            I have a scene with a Cloner and an object as child. The object has a material. If I replace the material with a different one I receive a DIRTYFLAGS_CACHE update on cloner. Everything is fine here.

            If I use the same scenario with a Voronoi instead of a cloner, once I replace the material of the child, Voronoi doesn't update its cache dirty bit. Somehow, I need to know that the Voronoi has changed. How can I do that ?

            Should I manually set voronoi's Dirty flag once its child is updated ? That will cause the whole scene to be checked twice though. Can I avoid it ?

            Thank you.

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