GetVirtualObjects



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

    On 23/09/2010 at 02:09, xxxxxxxx wrote:

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

    ---------
    Hello,

    I'm create a new object  with the GetVirtualObjects() function from ObjectData class.
    It works.

    My question is, the new object appears at first element in the object manager.
    Is there a possibility to move this object under the current active object (if I select an other object before) ?
    Can you use the InsertUnder() function in the GetVirtualObjects() function ?

    regards
    Markus



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

    On 23/09/2010 at 10:26, xxxxxxxx wrote:

    No - C4D determines where an object is inserted. You can of course create your own menu command that creates your object at an arbitrary position and hide the default one instead



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

    On 23/09/2010 at 11:35, xxxxxxxx wrote:

    Hmm, I was under the assumption that it is not safe or valid to modify the existing scene from within GetVirtualObjects(). At least that´s what I remember from the docs. Is that not true (anymore) or why isn´t this pointed out?



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

    On 23/09/2010 at 14:18, xxxxxxxx wrote:

    This is correct, do not modify the scene within GetVirtualObjects.

    Cheers, Sebastian



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

    On 23/09/2010 at 14:58, xxxxxxxx wrote:

    thx for confirming sebastian. Marky71 what you are doing is not safe. You should probably better use a button in your attributes and generate that object then from within your message overload (depending on when and why you need to create that object in the OM).



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

    On 23/09/2010 at 15:25, xxxxxxxx wrote:

    What Marky71 does is safe. From what I've understood he just uses ObjectData::GetVirtualObjects to create the geometry. But when he creates a new object in the scene, he wants automatically move this under a selected object. So Philip's idea, to use a command plugin and hide the object plugin, is the best way to achieve this.

    Cheers, Sebastian



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

    On 23/09/2010 at 15:35, xxxxxxxx wrote:

    It is safe to create geomoetry from within GVO but it is not safe to then move the object as a child of another object from within GVO.  From what I understand that is altering the scene and is not safe.  If you want to make the geomoetry from within GVO you should then call the Message() to move the object under the selected object in the OM.  I agree with Samir here, you shouldn't move the object from within GVO.

    :)



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

    On 23/09/2010 at 15:58, xxxxxxxx wrote:

    Originally posted by xxxxxxxx

    What Marky71 does is safe. From what I've understood he just uses ObjectData::GetVirtualObjects to create the geometry. But when he creates a new object in the scene, he wants automatically move this under a selected object.

    Well, the docs say
    GetVirtualObjects () is of course allowed to do ANY modifications that do not modify the scene

    imo this means in reverse that ANY modification that does modify the scene is not allowed or safe. I conclude therefore that also allocating and inserting an object (wether this has geometry or not) into the scene is also not allowed and therefore not safe.

    At least that is the way I understand it. Apparently I seem to be wrong but then I don´t fully see the difference between generating objects in the scene and moving an object in the scene (I mean the editor scene, not the virtual one). Both are scene modifications to me = both actions are not allowed from GVO. Do I miss something? 😵



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

    On 23/09/2010 at 16:03, xxxxxxxx wrote:

    Yes, touching the scene within GetVirtualObjects is not allowed. But InsertUnder on the virtual objects is for sure safe.



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

    On 23/09/2010 at 16:04, xxxxxxxx wrote:

    Originally posted by xxxxxxxx

    But when he creates a new object in the scene, he wants automatically move this under a selected object. So Philip's idea, to use a command plugin and hide the object plugin, is the best to achieve this.

    yes of course it is. My understanding however is that he creates the object from within GVO not from the plugin menu. Or did I misunderstood his initial post?



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

    On 23/09/2010 at 16:05, xxxxxxxx wrote:

    LOL..  you're right..  that's not what he was doing....  I didn't read it correctly.  My bad.



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

    On 23/09/2010 at 16:06, xxxxxxxx wrote:

    Originally posted by xxxxxxxx

    Yes, touching the scene within GetVirtualObjects is not allowed.

    ok, somehow I have the feeling now that we all talked about different things. :)



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

    On 23/09/2010 at 16:08, xxxxxxxx wrote:

    Yes, seems so :)



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

    On 23/09/2010 at 16:10, xxxxxxxx wrote:

    This is a good topic because it helps us understand the limitations of GVO.   So from both of your understanding, is adding geomoetry from within GVO changing the scene?

    ~Shawn



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

    On 23/09/2010 at 16:11, xxxxxxxx wrote:

    Originally posted by xxxxxxxx

    But InsertUnder on the virtual objects is for sure safe.

    Yes, that is true of course. Anything in the virtual scene is allowed actually. But if I understood the thread poster correctly, he is saying that he is modifying the "real" scene by inserting an object from within GVO. I guess you talked about the virtual scene. Just a misunderstanding. :)



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

    On 23/09/2010 at 16:45, xxxxxxxx wrote:

    GVO returns an object or object hierarchy that virtually 'replaces' the plugin object that does the GVO in the document - internally handled by Cinema 4D, not the programmer.  This returned object is what results when you Make Editable or when the document is being prepared for render (among other processes).  Trying to insert the resulting object of GVO into the real scene is definite a good path to crashing.

    ETA: But, yes, you can insert it into a 'virtual document' that, say, is needed to perform some operation such as Current State to Object before passing the result to the real document through GVO.



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

    On 23/09/2010 at 22:06, xxxxxxxx wrote:

    hello all,
    thanks for this many hints. I believe i will using a command plugins as "work around" to move the new object under an selected object. This should be save.

    regards



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

    On 24/09/2010 at 04:32, xxxxxxxx wrote:

    But if I understood the thread poster correctly, he is saying that he is modifying the "real" scene by inserting an object from within GVO.

    Oh, I see, after reading his post again I now got it :)


Log in to reply