Return input object: GetVirtualObjects()



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

    On 03/06/2009 at 15:15, xxxxxxxx wrote:

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

    ---------
    This is my first attempt at an input object generator plugin object so there are some things that are still a bit confusing.

    I found out the hard way not to return the original input object (op->GetDown()) in GetVirtualObjects(). Makes sense as it is part of the cloned document sent to GetVirtualObjects() and is released with that document afterwards I would imagine.

    I am using GetAndCheckHierarchyClone() to get a polygonized clone representation but this is further modified. But the original (unmodified) input object still needs to be returned also. Should I just make an additional clone to be returned in my Null object parent?



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

    On 03/06/2009 at 17:16, xxxxxxxx wrote:

    Also, I take it that if dirty=TRUE then 'res' from GetAndCheckHierarchyClone() represents the currently built cache, modifications and all, whereas if dirty=FALSE then 'res' represents the polygonized input object (hierarchy)???

    Thanks!



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

    On 04/06/2009 at 07:28, xxxxxxxx wrote:

    On the first post, I found an old Mikael Sterner post which suggests that GetClone() should be used for additional copies to be modified (YAY!).

    No idea about the second but we'll see. :)



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

    On 07/06/2009 at 02:39, xxxxxxxx wrote:

    Hi.

    I do it like this:

    if it's dirty, then I build my virtual object hierarchy and return it.

    if its not dirty then I return the 'res' from
    GetAndCheckHierarchyClone(), which i think just means that nothing has changed, and cinema can use the cached virtual hierarchy.

    greetings,
    Daniel



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

    On 07/06/2009 at 09:18, xxxxxxxx wrote:

    That should have been in my second post:

    dirty=FALSE, res=built cache
    dirty=TRUE, res=polygonized input

    And that, as you note, seems to be the case.


Log in to reply