Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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

    Safety of GetCache() after ExecutePasses()?

    Cinema 4D SDK
    r20 classic api
    2
    3
    535
    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.
    • F
      Filip
      last edited by Filip

      Hi all!
      I am implementing a recursive traversal of a scene, visiting all real and virtual objects in the hierarchy, closely following the recursive function outlined in the documentation of BaseObject::GetCache().

      The docs also say this about safety: "Use the above routine only if the caches are already built. It is for instance not safe to use it in a command plugin since the user can have stopped the scene redraw and the building of caches."

      Is it safe to call this routine if I have built the caches myself using ExecutePasses(), even if called from a command plugin?

      /Filip

      1 Reply Last reply Reply Quote 0
      • ManuelM
        Manuel
        last edited by

        Hello,

        The documentation specify this because you can launch the command during an update and having the scene in a "strange state" Something you have to be aware.

        Before using ExecutePasses you should call StopAllThreads.
        The scene will be update and you can retrieves the caches.

        Cheers
        Manuel.

        MAXON SDK Specialist

        MAXON Registered Developer

        1 Reply Last reply Reply Quote 0
        • F
          Filip
          last edited by

          @m_magalhaes said in Safety of GetCache() after ExecutePasses()?:

          The scene will be update and you can retrieves the caches.

          Great, thanks!

          /Filip

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