Hierarchy deformer, mesh, ModifyObject()



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 04/02/2006 at 09:23, xxxxxxxx wrote:

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

    ---------
    I thought all was going well with creating a plugin hierarchy modifier (i.e.: bones) until I dropped another object underneath the polygon mesh with the bones and instantly crashed.

    It seems that ModifiyObject() is called by the root bone for every object that may be affected from the root mesh down. Okay, so I only want the root mesh affected. Since the 'op' in ModifyObject() is a copy, I can't use direct equation of pointers (the root mesh is linked in each bone). Names would be useless as well. So far, I have this, rudimentarily:

    * First, check equality with the mesh's PointCount (which is stored).
    * Second, check for a specific tag (my own) on the mesh.

    But since rigged meshes may (and most definitely will) be nested and can be duplicated (and nested), this is incomplete. I need a unique identifier on that tag to distinguish that particular root mesh from any other (which may also have the same point count and tag, yes!).

    My question is how to create a unique number that remains unique between invocations (saving and loading of the document). Is there anything in the SDK that could be used for this?

    Thanks for any help,



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 04/02/2006 at 10:29, xxxxxxxx wrote:

    You should be able to get the document object pointer from the cache clone with GetCacheParent if that helps.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 04/02/2006 at 11:08, xxxxxxxx wrote:

    Thank you, David. That was exactly what was needed!

    P.S.: Sorry if I get easily testy here on occassion. Has anyone ever considered writing a book on the Cinema 4D C++ SDK to possibly expand on/pull-together what is here, in the docs, and in the scant examples? Of course, it would not remain authoritative as new releases occur, but who cares. If there is one in another language, a translation to English would be appreciated. :) I'm really flying blind on this hierarchy modifier stuff since there is none besides the few lines in the docs.

    Thanks again,



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 04/02/2006 at 12:17, xxxxxxxx wrote:

    I think everyone can appreciate how frustrating it can be, I've been there too when I started out many years ago. Back then, we didn't even have the sdk docs. It was a case of looking through the sdk examples, api headers and just trying it out. The sdk docs are in progress afaik, I'm sure they'll grow more with extra info and every post here helps.


Log in to reply