[email protected] wrote on Friday, October 16, 2009 4:32 AM:
> Problem reconstruction :
> 
> osgAnimation Example osganimationnode, exchange the main proc. Instead
> of creating a viewer write out a file, as this.
> 
> int main( int , char** )
> {
>     osg::ref_ptr< osg::Group > root = new osg::Group ;
>     root->setInitialBound(osg::BoundingSphere(osg::Vec3(10,0,10),
30));
>     root->addChild(createAxis());
> 
>     osg::MatrixTransform* node = setupAnimtkNode();
>     root->addChild(node);
> 
>     if ( !root.valid() )
>         osg::notify( osg::FATAL ) << "Failed in createSceneGraph() !"
<<
> std::endl ;
>     bool arg = false;
> 
>     bool  result = osgDB::writeObjectFile( * ( root.get() ) ,
> "animNode.osg" ) ;
>     if ( !result )
>         osg::notify( osg::FATAL ) << "Failed in osgDB::writeNodeFile()
> !" << std::endl ;
> }

The reason you get no update callback in the .osg file is that
osganimationnode uses a custom callback, AnimtkUpdateCallback, that the
.osg writer doesn't know about.

>From the OpenSceneGraph-Data .osg files that have animation (such as
robot.osg), it looks like osgAnimation::BasicAnimationManager is
supported, so you could start with using that instead of
AnimtkUpdateCallback.

HTH,
-- 
Bryan Thrall
FlightSafety International
[email protected]
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to