- Timestamp:
- 07/16/09 13:49:37 (4 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/examples/osganimationtimeline/osganimationtimeline.cpp
r9692 r10487 1 1 /* -*-c++-*- 2 * Copyright (C) 2008 Cedric Pinson < mornifle@plopbyte.net>2 * Copyright (C) 2008 Cedric Pinson <cedric.pinson@plopbyte.net> 3 3 * 4 4 * This library is open source and may be redistributed and/or modified under … … 158 158 int main (int argc, char* argv[]) 159 159 { 160 std::cerr << "This example works only with osgAnimation/nathan.osg" << std::endl;160 std::cerr << "This example works only with nathan.osg" << std::endl; 161 161 162 162 osg::ArgumentParser psr(&argc, argv); … … 164 164 osgViewer::Viewer viewer(psr); 165 165 166 std::string file = " osgAnimation/nathan.osg";166 std::string file = "nathan.osg"; 167 167 if(argc >= 2) 168 168 file = psr[1]; … … 170 170 // replace the manager 171 171 osg::Group* root = dynamic_cast<osg::Group*>(osgDB::readNodeFile(file)); 172 if (!root) { 173 osg::notify(osg::FATAL) << "can't read file " << file << std::endl; 174 return 1; 175 } 172 176 osgAnimation::AnimationManagerBase* animationManager = dynamic_cast<osgAnimation::AnimationManagerBase*>(root->getUpdateCallback()); 173 177 if(!animationManager) 174 178 { 175 std::cerr<< "Did not find AnimationManagerBase updateCallback needed to animate elements" << std::endl;179 osg::notify(osg::FATAL) << "Did not find AnimationManagerBase updateCallback needed to animate elements" << std::endl; 176 180 return 1; 177 181 }
