static bool writeAnimations( osgDB::OutputStream& os, const osgAnimation::AnimationManagerBase& manager ) { const osgAnimation::AnimationList& animations = manager.getAnimationList(); os.writeSize(animations.size()); os << osgDB::BEGIN_BRACKET << std::endl; for ( osgAnimation::AnimationList::const_iterator itr=animations.begin(); itr!=animations.end(); ++itr ) { os << itr->get(); } os << osgDB::END_BRACKET << std::endl; return true; }
bool AnimationManagerBase_writeLocalData(const osgAnimation::AnimationManagerBase &manager, Output &fw) { const osgAnimation::AnimationList &animList = manager.getAnimationList(); fw.indent() << "num_animations " << animList.size() << std::endl; for (osgAnimation::AnimationList::const_iterator it = animList.begin(); it != animList.end(); ++it) { if (!fw.writeObject(**it)) osg::notify(osg::WARN) << "Warning: can't write an animation object" << std::endl; } return true; }
static bool checkAnimations( const osgAnimation::AnimationManagerBase& manager ) { return manager.getAnimationList().size()>0; }