Clone the document along with its cache

On 24/01/2016 at 03:15, xxxxxxxx wrote:

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


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.

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


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?