From 668d365ef9a5d2a3366c4cbc7a10510dd0b2b199 Mon Sep 17 00:00:00 2001 From: scrawl Date: Fri, 29 May 2015 21:47:43 +0200 Subject: [PATCH] MorphGeometry copy fix --- components/sceneutil/clone.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/sceneutil/clone.cpp b/components/sceneutil/clone.cpp index 237417974..0131adc89 100644 --- a/components/sceneutil/clone.cpp +++ b/components/sceneutil/clone.cpp @@ -51,7 +51,9 @@ namespace SceneUtil if (dynamic_cast(drawable) || dynamic_cast(drawable)) { - osg::Drawable* cloned = osg::clone(drawable, *this); + osg::CopyOp copyop = *this; + copyop.setCopyFlags(copyop.getCopyFlags()|osg::CopyOp::DEEP_COPY_ARRAYS); + osg::Drawable* cloned = osg::clone(drawable, copyop); if (cloned->getUpdateCallback()) cloned->setUpdateCallback(osg::clone(cloned->getUpdateCallback(), *this)); return cloned;