Ahhh....ok!!

Good to know!!!
At this point i can only save as .ive only the nodes attached to animation, and 
then at run time attach them to an instance of animation Node!!!

Thank you so much!!!!

---------- Initial Header -----------

>From      : [EMAIL PROTECTED]
To          : "osg users" [email protected]
Cc          :
Date      : Wed, 20 Jun 2007 10:27:41 +0100
Subject : Re: [osg-users] Problem passing from osg to ive format

> Hi Matteo,
>
> The model is little use to me as you have extended the OSG with your
> Animation node, the standard .osg plugin doesn't support this without
> your own DotOsgWrapper, and .ive will never support this as its not
> extensible, so what you are after isn't technically possible.
>
> Robert.
>
> On 6/20/07, Matteo Campana <[EMAIL PROTECTED]> wrote:
> > Hi Robert
> > Thank you to reply me!!
> >
> > So here is a very simple .osg file.
> >
> > Just now I tried to open the .ive file by the osgviewer...and it works 
> > (because it doesn't access to the "Animation" function)..... in my viewer 
> > the problem occur after the dynamic cast and when I try to use the method 
> > "SetLoopMode":
> >
> > void Player::MyReadingFunction(char* filename){
> > ...
> > sceneGraph = dynamic_cast<osg::Group*>(osgDB::readNodeFile(fileName));
> > animationNode = dynamic_cast<Animation*>(sceneGraph->getChild(0));
> > animationNode->SetLoopMode(Animation::LOOP);
> > ...
> > }
> >
> > In order to save and read the .ive files i simply used this function:
> > osgDB::writeNodeFile(*(sceneGraph.get()), "SceneGraph.ive" );
> >
> > and
> >
> > osgDB::readNodeFile(SceneGraph.ive);
> >
> > Is it ok?
> >
> > Thanks
> > ---------- Initial Header -----------
> >
> > From      : [EMAIL PROTECTED]
> > To          : "osg users" [email protected]
> > Cc          :
> > Date      : Tue, 19 Jun 2007 16:36:08 +0100
> > Subject : Re: [osg-users] Problem passing from osg to ive format
> >
> >
> >
> >
> >
> >
> >
> > > Hi Matteo,
> > >
> > > Could you provide an example .osg file that works, but fails when you
> > > convert it to .ive?
> > >
> > > Once I have this I can test it on my system to see if I can spot the 
> > > problem.
> > >
> > > Robert.
> > >
> > > On 6/19/07, Matteo Campana <[EMAIL PROTECTED]> wrote:
> > > > Dear All
> > > >
> > > > I create my "Animation" node deriving the "Sequence" node:
> > > > I create a plugin  file that I simple included in my project in order 
> > > > to save and load my scene.
> > > >
> > > > This is my problem....
> > > > if I save and open my scene as .osg file everything works perfectly.
> > > >
> > > > Now I'm trying to save and read the scene using .ive format.
> > > > The file is well saved but when I open it, it crash.
> > > > The problem occurs when I call a method of "Animation":
> > > >
> > > >         animationNode = 
> > > > dynamic_cast<Animation*>(sceneGraph->getChild(0));
> > > >         animationNode->SetLoopMode(Animation::LOOP);
> > > >
> > > > It seem that it cant properly read the animation node.
> > > >
> > > >
> > > > Do I have to change something in the plugin passing from .osg to .ive 
> > > > format?
> > > > Thanks
> > > >
> > > >
> > > > In attachment I send the Animation plugin
> > > > This is part of my derived class:
> > > >
> > > > class Animation : public osg::Sequence {
> > > >
> > > > public:
> > > >         //costruttore
> > > >         Animation();
> > > >
> > > >     /** Copy constructor using CopyOp to manage deep vs shallow copy.*/
> > > >         Animation(const Animation&, const osg::CopyOp& 
> > > > copyop=osg::CopyOp::SHALLOW_COPY);
> > > >
> > > >         META_Object(osg,Animation);
> > > >
> > > >         virtual void traverse(osg::NodeVisitor& nv);
> > > >
> > > > ecc..
> > > >
> > > >
> > > > _______________________________________________
> > > > osg-users mailing list
> > > > [email protected]
> > > > http://openscenegraph.net/mailman/listinfo/osg-users
> > > > http://www.openscenegraph.org/
> > > >
> > > >
> > > _______________________________________________
> > > osg-users mailing list
> > > [email protected]
> > > http://openscenegraph.net/mailman/listinfo/osg-users
> > > http://www.openscenegraph.org/
> > >
> >
> > _______________________________________________
> > osg-users mailing list
> > [email protected]
> > http://openscenegraph.net/mailman/listinfo/osg-users
> > http://www.openscenegraph.org/
> >
> >
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://openscenegraph.net/mailman/listinfo/osg-users
> http://www.openscenegraph.org/
>
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to