Get BaseObject after binding [SOLVED]



  • On 13/09/2016 at 03:46, xxxxxxxx wrote:

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

    ---------
    Hi,

    I am trying to get the resulting BaseObject from a link field. It works well until the object is skinned to bones. If skinned, I get the original unskinned geometry.

    This is run from inside GetVirtualObjects of an object plugin.

    I am converting a copy of the object with CURRENTSTATETOOBJECT.
    I am not using GetHierarchyClone (or GetAndCheckHierarchyClone) since they hide the original object, which I need to stay editable in the scene.

    Any help on how I can get the final state of skinned geometry?

    Thanks



  • On 13/09/2016 at 06:41, xxxxxxxx wrote:

    If I use

    	
    	Bool* dirtyLink = false;
      
    	BaseObject* res = op->GetHierarchyClone(hh, sourceObjectLink, HIERARCHYCLONEFLAGS_ASPOLY, dirtyLink, nullptr);
    

    I do get the deformed points after binding, but the source object disappears. How do I keep it from disappearing?



  • On 14/09/2016 at 02:58, xxxxxxxx wrote:

    Hi salozo, thanks for writing us.

    With reference to your request, you could try looking for and accessing the object's DeformCache through the GetDeformCache method and retrieve the final deformed data directly from there.
    As side note please consider that using the GetHierarchyClone method as shown in your second post can't achieve the result you're looking for.

    Best, Riccardo



  • On 14/09/2016 at 07:23, xxxxxxxx wrote:

    Thank you for your reply Riccardo.

    I made some progress using GetDeformCache.


Log in to reply