From Sukender and Robert Osfield, clean up of options
This commit is contained in:
@@ -121,7 +121,6 @@ ReaderWriterDAE::writeNode( const osg::Node& node,
|
||||
std::istringstream iss( optString );
|
||||
std::string opt;
|
||||
|
||||
bool unrecognizedOption = false;
|
||||
//while (iss >> opt)
|
||||
while( std::getline( iss, opt, ',' ) )
|
||||
{
|
||||
@@ -131,21 +130,11 @@ ReaderWriterDAE::writeNode( const osg::Node& node,
|
||||
else if (opt == "DaeEarthTex") earthTex = true;
|
||||
else if (opt == "ZUpAxis") zUpAxis = true;
|
||||
else if (opt == "ForceTexture") forceTexture = true;
|
||||
else
|
||||
else if (!opt.empty())
|
||||
{
|
||||
OSG_NOTICE
|
||||
<< std::endl << "COLLADA dae plugin: unrecognized option \"" << opt << std::endl;
|
||||
unrecognizedOption = true;
|
||||
OSG_NOTICE << std::endl << "COLLADA dae plugin: unrecognized option \"" << opt << std::endl;
|
||||
}
|
||||
}
|
||||
if (unrecognizedOption) {
|
||||
// TODO Remove this or make use of supportedOptions()
|
||||
OSG_NOTICE
|
||||
<< "comma-delimited options:" << std::endl << std::endl
|
||||
<< "\tpolygon = use polygons instead of polylists for element" << std::endl
|
||||
<< "\tGoogleMode = write files suitable for use by Google products" << std::endl
|
||||
<< "example: osgviewer -O polygon bar.dae" << std::endl << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
if (NULL == pDAE)
|
||||
|
||||
@@ -18,14 +18,14 @@ public:
|
||||
// Collada zip archive (contains one or more dae files and a manifest.xml)
|
||||
supportsExtension("zae","COLLADA 1.4.x ZAE format");
|
||||
|
||||
supportsOption("polygon", "Use polygons instead of polylists for element (Write option)");
|
||||
supportsOption("GoogleMode", "Write files suitable for use by Google products");
|
||||
supportsOption("NoExtras", "Write option (Undocumented)");
|
||||
supportsOption("DaeEarthTex", "DAE settings for writing earth textures");
|
||||
supportsOption("ZUpAxis", "indicates if the up axis is on Z axis");
|
||||
supportsOption("ForceTexture", "force the use an image for a texture, even if the file is not found");
|
||||
supportsOption("polygon", "(Write option) Use polygons instead of polylists for element");
|
||||
supportsOption("GoogleMode", "(Write option) Write files suitable for use by Google products");
|
||||
supportsOption("NoExtras", "(Write option) Undocumented");
|
||||
supportsOption("DaeEarthTex", "(Write option) DAE settings for writing earth textures");
|
||||
supportsOption("ZUpAxis", "(Write option) Indicates the up axis is Z instead of Y");
|
||||
supportsOption("ForceTexture","(Write option) Force writing references to an image for a texture, even if the file is not found");
|
||||
|
||||
supportsOption("StrictTransparency", "Read option (Undocumented)");
|
||||
supportsOption("StrictTransparency", "(Read option) Undocumented");
|
||||
}
|
||||
|
||||
const char* className() const { return "COLLADA 1.4.x DAE reader/writer"; }
|
||||
|
||||
Reference in New Issue
Block a user