Dilyan, My intention was not to allow URIs to be passed across the ReaderWriter interface. It is only chance that this works. The FileName parameter of ReadNode and WriteNode should contain a file name that is valid for the current platform. In the discussion about this that went on in this list a while back I mentioned that I felt this should be made clear in the documentation. We should either make all ReaderWriters accept a URI and change the name of the parameter, or make them accept only platform file names.
However, if you still want your patch to be reviewed, please follow the instructions given in the submission protocol documented in the wiki and attach a full copy of the modified file, otherwise Robert will ignore it. Roger > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:osg- > [EMAIL PROTECTED] On Behalf Of Dilyan Palauzov > Sent: 11 January 2008 00:40 > To: [email protected] > Subject: [osg-submissions] ReaderWriterDAE, readNode vs. writeNode > > Hello, > > While ReaderWriterDAE::readNode("file://petrus.dae") works, > writeNode(node, "file://petrus.dae") does not. The latter transforms > internally the file parameter in file://file://petrus.dae ... The point > is, that readNode calls > > > std::string fileName( osgDB::findDataFile( fname, options ) ); > if( fileName.empty() ) return ReadResult::FILE_NOT_FOUND; > std::string fileURI = ConvertFilePathToColladaCompatibleURI(fileName); > > while writeNode uses to evalutate fileURI just > std::string fileURI = ConvertFilePathToColladaCompatibleURI(fname); > thus findDataFile does not eliminate file:// if it is already presented. > > > My proposal is not to include "file://" within > ReaderWriterDAE::ConvertFilePathToCOLLADACompatibleURI, if the parameter > FilePath starts already with "file://" > > > http://test.aegee.org/osgPlugin-dae-rev7791.patch > > ... is my patch to resolve the inconsistence. It includes as addition > in writeNode the debug message > > osg::notify(osg::INFO) << "ReaderWriterDAE( \"" << fileURI << "\" )" > << std::endl; > > that is present in readNode . > > I will be glad if my patch finds its place in the OSG SVN. > > Със здраве, > Дилян > _______________________________________________ > osg-submissions mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-submissions- > openscenegraph.org _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
