Nevermind, I found the easiest way is I can just remove the MERGE_GEODES option and just make my own MergeGeodesVisitor. I just copied the code from Optimizer.cpp, removed the check on isPermissible and then added an extra check when it is going through the geodes. If it find that geode is marked to be saved via whatever means I tell it, it just adds it back to the group without combining. One line change and it works just fine.
From: [email protected] [mailto:[email protected]] On Behalf Of Cary, Karl A. Sent: Wednesday, February 12, 2014 8:30 AM To: OpenSceneGraph Users Subject: Re: [osg-users] Saving a Named Group in Optimize So this seems to work just fine for groups, but how would I keep geodes from combining? For example, I have a group that I mark as dynamic that contains 4 geodes. These 4 geodes need to be kept separate. In most other groups, even groups I need to save, the geodes could be combined together. Setting the geodes to dynamic or changing node mask or setting comments, none of it stops the geodes from being combined. This is when I set the MERGE_GEODES optimization option, which I really do need to do. From: [email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of Trajce Nikolov NICK Sent: Wednesday, February 05, 2014 12:20 AM To: OpenSceneGraph Users Subject: Re: [osg-users] Saving a Named Group in Optimize also if you put comment attributes it will not be removed on optimize Nick On Wed, Feb 5, 2014 at 12:54 AM, Farshid Lashkari <[email protected]<mailto:[email protected]>> wrote: Hi Karl, Setting the data variance of a node to DYNAMIC should prevent the optimizer from removing it: group->setDataVariance(osg::Object::DYNAMIC); Cheers, Farshid On Tue, Feb 4, 2014 at 1:49 PM, Cary, Karl A. <[email protected]<mailto:[email protected]>> wrote: Is there a way to save a named group from being optimized away by setting either some type of option or flag before running the optimizer? I can always write a custom optimize visitor to handle it, but it just seemed like it might be a common case that is handled and I haven't known about. Thanks. Karl _______________________________________________ osg-users mailing list [email protected]<mailto:[email protected]> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org _______________________________________________ osg-users mailing list [email protected]<mailto:[email protected]> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- trajce nikolov nick
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

