|
|
@ -87,6 +87,8 @@ namespace SceneUtil
|
|
|
|
{
|
|
|
|
{
|
|
|
|
osg::ref_ptr<osg::Group> handle = new osg::Group;
|
|
|
|
osg::ref_ptr<osg::Group> handle = new osg::Group;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
osg::UserDataContainer* udc = toAttach->getUserDataContainer();
|
|
|
|
|
|
|
|
|
|
|
|
CopyRigVisitor copyVisitor(handle, filter);
|
|
|
|
CopyRigVisitor copyVisitor(handle, filter);
|
|
|
|
toAttach->accept(copyVisitor);
|
|
|
|
toAttach->accept(copyVisitor);
|
|
|
|
copyVisitor.doCopy();
|
|
|
|
copyVisitor.doCopy();
|
|
|
@ -96,11 +98,13 @@ namespace SceneUtil
|
|
|
|
osg::ref_ptr<osg::Node> newHandle = handle->getChild(0);
|
|
|
|
osg::ref_ptr<osg::Node> newHandle = handle->getChild(0);
|
|
|
|
handle->removeChild(newHandle);
|
|
|
|
handle->removeChild(newHandle);
|
|
|
|
master->asGroup()->addChild(newHandle);
|
|
|
|
master->asGroup()->addChild(newHandle);
|
|
|
|
|
|
|
|
newHandle->setUserDataContainer(udc);
|
|
|
|
return newHandle;
|
|
|
|
return newHandle;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
master->asGroup()->addChild(handle);
|
|
|
|
master->asGroup()->addChild(handle);
|
|
|
|
|
|
|
|
handle->setUserDataContainer(udc);
|
|
|
|
return handle;
|
|
|
|
return handle;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|