Paul/Robert/Anyone else who likes to fix OSG,
There is a problem in the file: osgPlugins\OpenFlight\ExportOptions.cpp
The initialization of "_stripFileTexturePath" is missing in the second
constructor. It happens to be a bool. So, if you pass in
osgDB::ReaderWriter::Options with an option string to specify the
version of flt output you want/any other options besides stripping
paths, you're also implicitly choosing to strip file paths out of your
textures, because most of the time a bool with unspecified value is
initialized to non-zero(true) because that's what most numbers (garbage
or not) are.
What should happen, is it should default to false and if it's a token in
the option string it becomes true.
Someone, please copy and paste the "_stripTextureFilePath( false )" line
into the second constructor and add a comma after "_lightingDefault(
true )". Don't forget the comma :)
Thanks guys. Your pal,
John Argentieri
ExportOptions::ExportOptions()
: _version( VERSION_16_1 ),
_units( METERS ),
_validate( false ),
_lightingDefault( true ),
_stripTextureFilePath( false )
{
}
ExportOptions::ExportOptions( const osgDB::ReaderWriter::Options* opt )
: _version( VERSION_16_1 ),
_units( METERS ),
_validate( false ),
_lightingDefault( true )
{
if (opt)
{
const ExportOptions* fltOpt = dynamic_cast<const
ExportOptions*>( opt );
if (fltOpt)
{
_version = fltOpt->_version;
_units = fltOpt->_units;
_validate = fltOpt->_validate;
_tempDir = fltOpt->_tempDir;
_lightingDefault = fltOpt->_lightingDefault;
}
setOptionString( opt->getOptionString() );
}
}
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org