void mergeAnimation(osg::Node* mainModel, osg::Node* mergeModel)
{
        FindAnimationManagerVisitor famvMain;
        mainModel->accept(famvMain);
        osgAnimation::AnimationManagerBase* animationManagerMain = 
famvMain.getAnimationManager();
        if (animationManagerMain == 0)
                throw std::logic_error("no animation manager found in main 
model");

        FindAnimationManagerVisitor famv;
        mergeModel->accept(famv);
        osgAnimation::AnimationManagerBase* animationManager = 
famv.getAnimationManager();
        if (animationManager == 0)
                throw std::logic_error("no animation manager found in secondary 
model");

        const osgAnimation::AnimationList& list = 
animationManager->getAnimationList();
        for (osgAnimation::AnimationList::const_iterator ai = list.begin(); ai 
!= list.end(); ai++)
                animationManagerMain->registerAnimation(*ai);
}

28.05.2013, 08:27, "Michael Borst" <[email protected]>:
> Do you have sample code,
> maybe i am just missing one importent line or flag to be set
>
> Thank you!
>
> Cheers,
> Michael
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=54235#54235
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to