[osg-users] DEEP_COPY_USERDATA isn't that deep

Chris Djali krizdjali at gmail.com
Fri Sep 20 11:19:10 PDT 2019


Is it intentional that using osg::CopyOp::DEEP_COPY_USERDATA copies the UserDataContainer, but doesn't deep-copy the actual things in it unless osg::CopyOp::DEEP_COPY_OBJECTS is also enabled? This means that things can be added or removed, but changes to existing things are shared.

We have a situation where we only want to deep-copy the userdata and not anything else, so can't set the deep-copy objects flag. This could be supported either by ORing objects into the copy op in the userdata container copy constructor, or by adding another copy op for copying userdata even more deeply, otherwise we're going to have to manually implement a less pretty workaround.


Read this topic online here:

More information about the osg-users mailing list