From 45f2b29a774d98117ed3ad0c2935040362bd7fea Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 19 Jan 2011 09:34:26 +0000 Subject: [PATCH] From Sukender and Robert Osfield, clean up of options --- src/osgPlugins/dae/ReaderWriterDAE.cpp | 15 ++------------- src/osgPlugins/dae/ReaderWriterDAE.h | 14 +++++++------- 2 files changed, 9 insertions(+), 20 deletions(-) diff --git a/src/osgPlugins/dae/ReaderWriterDAE.cpp b/src/osgPlugins/dae/ReaderWriterDAE.cpp index 3339ae544..0f66407ec 100644 --- a/src/osgPlugins/dae/ReaderWriterDAE.cpp +++ b/src/osgPlugins/dae/ReaderWriterDAE.cpp @@ -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) diff --git a/src/osgPlugins/dae/ReaderWriterDAE.h b/src/osgPlugins/dae/ReaderWriterDAE.h index cda7adb1b..61d2ca198 100644 --- a/src/osgPlugins/dae/ReaderWriterDAE.h +++ b/src/osgPlugins/dae/ReaderWriterDAE.h @@ -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"; }