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

    Clone the document along with its cache

    SDK Help
    0
    2
    246
    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 24/01/2016 at 03:15, xxxxxxxx wrote:

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

      ---------
      Hello.

      I have the following scene:

      1. Sphere
      2. Polygonized plane with a collision deformer pointing to the above sphere.
      3. a cube with a bending deformer

      The plane covers the sphere like a blanket.

      Now, i need to create a clone of this document, so i use:

      1. The GetClone with COPYFLAGS_DOCUMENT.
      2. On the cloned document, i use the execute passes with true in animation, expressions and cache parameters.

      After traversing the nodes with GetCache/GetDeformCache recursion method, 
      i notice that the plane stays horizontal instead of covering the sphere (loses its cache maybe ?).
      However, the cube preserves its deformable state.

      If i also use the Hierarchy class and call Run on the cloned document, 
      the plane appears correctly, while the sphere disappears and the cube appears broken.

      So, my question is: How do i have to use the GetClone, ExecutePasses and the Hierarchy class to produce 
      the correct cached cloned document exactly as it appears in the viewport ?

      Thank you for your time.

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

        On 25/01/2016 at 09:28, xxxxxxxx wrote:

        Hi,

        can you please provide us with some code, that shows how you exactly try to do this? And also when or where you are trying to execute that code?

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