Re: [osg-users] Writing to Collada files

2008-06-06 Thread Paul Martz
Glad that's working. Just  to close the thread, with current SVN head of
OSG, I do the following and it all works as expected:
  >osgconv cessna.osg out.dae
  Data written to 'out.dae'.
  >osgviewer out.dae
  >osgconv out.dae out2.dae
  Data written to 'out2.dae'.
  >osgviewer out2.dae

   -Paul



> Hi again!
> 
> It's a versioning problem. I upgraded to OSG 2.5.1 (I used 2.5.0
> before) and it works now!
> 
> Thanks for your help, though!
> 
> Rick
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-opensce
negraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Writing to Collada files

2008-06-04 Thread Forum Dude
Hi again!

It's a versioning problem. I upgraded to OSG 2.5.1 (I used 2.5.0
before) and it works now!

Thanks for your help, though!

Rick
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Writing to Collada files

2008-06-04 Thread Forum Dude
Hi Paul,

thanks for your replies. I tried "osgconf teapot.dae out.dae" and it
simply says: Warning: Could not find plugin to write nodes to file
"out.dae". I also tried to load another file format "osgconf
teapot.obj out.dae" and then it says: Warning: Error in writing to
"out.dae". Nothing more specific, unfortunately.

I'm getting the same in my application. It seems it cannot find the
plugin to write when it's already loaded to read. When it finds it,
though, because it loaded another format, it still cannot write the
file.

I'll do some more testing and post them here. If you have more ideas,
let me know.

Rick

ps. With "osgconf cessna.osg out.dae" it says:

Transparency processing - BlendFunction or BlendColor not found.
Warning: Error in writing to "out.dae".

On Wed, Jun 4, 2008 at 11:28 PM, Paul Martz <[EMAIL PROTECTED]> wrote:
> Another thought: What happens if you simply do this?
>   osgconv teapot.dae out.dae
>
> If this works and your app fails on the equivalent operation, then it is
> some kind of bug in your app.
>
> I know this works with cessna.osg as input...
>   -Paul
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Writing to Collada files

2008-06-04 Thread Paul Martz
Another thought: What happens if you simply do this?
   osgconv teapot.dae out.dae

If this works and your app fails on the equivalent operation, then it is
some kind of bug in your app.

I know this works with cessna.osg as input...
   -Paul


> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf 
> Of Paul Martz
> Sent: Wednesday, June 04, 2008 1:27 PM
> To: [EMAIL PROTECTED]; 'OpenSceneGraph Users'
> Subject: Re: [osg-users] Writing to Collada files
> 
> I can write to DAE just fine using current svn head. The fact 
> that your messages are coming out in the wrong order is very 
> strange. I suggest you use a debugger. Set breakpoints at the 
> DAE readNode and writeNode entry points and examine stack 
> traces, etc..
>-Paul
> 
> 
> 
> > 
> > Hi,
> > 
> > I'm having problems writing Collada files. This is what I'm 
> doing (I'm 
> > reading a Collada file and then try to save it again):
> > 
> > - source code
> > // Attempt to load file into scene.
> > string fileName(arguments[1]);
> > notify(INFO) << "Loading " << fileName << "...\n"; 
> ref_ptr scene 
> > = readNodeFile(fileName);
> > if(scene.get()==NULL) {
> > notify(FATAL) << "Loading " << fileName << " failed.\n";
> > return 1;
> > }
> > root.get()->addChild(scene.get());
> > notify(INFO) << fileName << " successfully loaded.\n";
> > 
> > // Save a Collada version of the file.
> > string outCollada("test.dae");
> > writeNodeFile(*scene.get(),outCollada);
> > 
> > notify(INFO) << "Exiting successfully.\n";
> > - source code
> > 
> > This is what I'm getting:
> > 
> > - output
> > Loading teapot.DAE...
> > Opened DynamicLibrary osgPlugins-2.5.0/mingw_osgdb_dae.dll
> > ReaderWriterDAE( "teapot.DAE" )
> > URI loaded: file:///C:/test/teapot.DAE Error writing file test.dae: 
> > Warning: Could not find plugin to write nodes to file "test.dae".
> > teapot.DAE successfully loaded.
> > Exiting successfully.
> > Closing DynamicLibrary osgPlugins-2.5.0/mingw_osgdb_dae.dll
> > - output
> > 
> > It appears it can find the Collada library for read access (and it 
> > loads properly, I checked it) but not for write access. It 
> works fine 
> > for other file formats (e.g. .obj).
> > What could be the problem here?
> > 
> > This is my configuration:
> > http://www.openscenegraph.org/projects/osg/wiki/Support/Platfo
> > rmSpecifics/MingwColladaEclipse
> > 
> > Rick
> > 
> > ps. Are the notify() messages buffered? That would explain why the 
> > error message is output before the info message.
> > ___
> > osg-users mailing list
> > osg-users@lists.openscenegraph.org
> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-opensce
> negraph.org
> 
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-opensce
negraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Writing to Collada files

2008-06-04 Thread Paul Martz
I can write to DAE just fine using current svn head. The fact that your
messages are coming out in the wrong order is very strange. I suggest you
use a debugger. Set breakpoints at the DAE readNode and writeNode entry
points and examine stack traces, etc..
   -Paul



> 
> Hi,
> 
> I'm having problems writing Collada files. This is what I'm 
> doing (I'm reading a Collada file and then try to save it again):
> 
> - source code
> // Attempt to load file into scene.
> string fileName(arguments[1]);
> notify(INFO) << "Loading " << fileName << "...\n"; 
> ref_ptr scene = readNodeFile(fileName);
> if(scene.get()==NULL) {
>   notify(FATAL) << "Loading " << fileName << " failed.\n";
>   return 1;
> }
> root.get()->addChild(scene.get());
> notify(INFO) << fileName << " successfully loaded.\n";
> 
> // Save a Collada version of the file.
> string outCollada("test.dae");
> writeNodeFile(*scene.get(),outCollada);
> 
> notify(INFO) << "Exiting successfully.\n";
> - source code
> 
> This is what I'm getting:
> 
> - output
> Loading teapot.DAE...
> Opened DynamicLibrary osgPlugins-2.5.0/mingw_osgdb_dae.dll
> ReaderWriterDAE( "teapot.DAE" )
> URI loaded: file:///C:/test/teapot.DAE
> Error writing file test.dae: Warning: Could not find plugin 
> to write nodes to file "test.dae".
> teapot.DAE successfully loaded.
> Exiting successfully.
> Closing DynamicLibrary osgPlugins-2.5.0/mingw_osgdb_dae.dll
> - output
> 
> It appears it can find the Collada library for read access 
> (and it loads properly, I checked it) but not for write 
> access. It works fine for other file formats (e.g. .obj). 
> What could be the problem here?
> 
> This is my configuration:
> http://www.openscenegraph.org/projects/osg/wiki/Support/Platfo
> rmSpecifics/MingwColladaEclipse
> 
> Rick
> 
> ps. Are the notify() messages buffered? That would explain 
> why the error message is output before the info message.
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-opensce
negraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org