Nested Cloners [SOLVED]

  • On 23/10/2015 at 04:43, xxxxxxxx wrote:


    sorry guys, gotta steal your time once again as I now know why I used the "normal" clones in the first place (sorry, didn't recall before but only today when I indeed tried this). I am in a SceneHook Execute() function and GetCache as well as GetDeformCache always return a nullptr.

    SendModellingCommand only seems to return the final polygonal hierarchy. So is there a way to access the virtual cache from here anyhow?

    Maybe I need to clone the doc somehow, let the cache be rebuilt (which would probably impose a performance penalty if dynamics need to be recalculated for the frame of retrieval?) and read the cache then? I'd rather not because this would also include my own dynamic calculations to be redone which is really no option (it could be hours of simulation time for previous frames...worst case scenario).

    Maybe there is a way to rebuilt the caches?

    Thanks again!

  • On 26/10/2015 at 01:53, xxxxxxxx wrote:


    what exactly are you doing in you SceneHook and when? In AddToExecution() you can define when in the execution pipeline your scene hook is called.

    Best wishes,

  • On 26/10/2015 at 05:49, xxxxxxxx wrote:


    what exactly do you mean by "what exactly are you doing"?

    I am grabbing an object from the OM (my own object plugin) and reading out an object (in this case the Cloner but it doesn't matter what object, it's always nullptr) from a link field of it. Then trying to get the cache.

    obj = my_op->GetDataInstance()->GetObjectLink(ID);

    execution pipeline priority is EXECUTIONPRIORITY_DYNAMICS (which I want to be in btw.)

  • On 26/10/2015 at 06:06, xxxxxxxx wrote:

    I assume caches are not yet built (but will be only in EXECUTIONPRIORITY_GENERATORS) so I guess I need pre-built caches?

    Can I use the Hierarchy class for this purpose?

  • On 26/10/2015 at 06:47, xxxxxxxx wrote:

    Ok, the hierarchy class seems to go through all objects in the scene. This seems a bit overload. I just need the single cloner object (and its children) to build its cache I guess.

  • On 26/10/2015 at 09:42, xxxxxxxx wrote:


    I just tried to access the cache of a MoGraph cloner in a SceneHook::Execute() with EXECUTIONPRIORITY_DYNAMICS and it seems to work fine in R17. Does the problem also happen for you with R17?

    Best wishes,

  • On 27/10/2015 at 02:54, xxxxxxxx wrote:

    Thanks, I will have to try that!

  • On 03/11/2015 at 03:56, xxxxxxxx wrote:

    You are right, trying it with a minimal sample in r17 works! Ok, then it must be an implementation problem on my side for the r16 version.

    Cheers and finally solved!

  • On 03/11/2015 at 15:54, xxxxxxxx wrote:

    @Katachi: Are you able to make changes to the cache that are actually reflected with nested cloners?
    I never could get it to work (regarding the topic that you have linked).

  • On 04/11/2015 at 03:14, xxxxxxxx wrote:

    Not directly. What I am doing is using an additional Effector that reports back any changes to the clones (which means tracking the mograph objects, their deletion etc on my own). This works quite alright though of course that's not optimal.

Log in to reply