Fixed indentation
This commit is contained in:
@@ -443,11 +443,12 @@ OBJWriterNodeVisitor::OBJMaterial::OBJMaterial(osg::Material* mat, osg::Texture*
|
||||
|
||||
if (tex) {
|
||||
osg::Image* img = tex->getImage(0);
|
||||
if ((img) && (!img->getFileName().empty())) {
|
||||
image = img->getFileName();
|
||||
if(outputTextureFiles)
|
||||
osgDB::writeImageFile(*img, image, options);
|
||||
}
|
||||
if ((img) && (!img->getFileName().empty()))
|
||||
{
|
||||
image = img->getFileName();
|
||||
if(outputTextureFiles)
|
||||
osgDB::writeImageFile(*img, image, options);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -56,9 +56,9 @@ class OBJWriterNodeVisitor: public osg::NodeVisitor {
|
||||
_currentStateSet(new osg::StateSet()),
|
||||
_lastVertexIndex(1),
|
||||
_lastNormalIndex(1),
|
||||
_lastTexIndex(1),
|
||||
_outputTextureFiles(outputTextureFiles),
|
||||
_options(options)
|
||||
_lastTexIndex(1),
|
||||
_outputTextureFiles(outputTextureFiles),
|
||||
_options(options)
|
||||
{
|
||||
_fout << "# file written by OpenSceneGraph" << std::endl << std::endl;
|
||||
|
||||
@@ -149,15 +149,15 @@ class OBJWriterNodeVisitor: public osg::NodeVisitor {
|
||||
typedef std::map< osg::ref_ptr<osg::StateSet>, OBJMaterial, CompareStateSet> MaterialMap;
|
||||
|
||||
|
||||
std::ostream& _fout;
|
||||
std::list<std::string> _nameStack;
|
||||
StateSetStack _stateSetStack;
|
||||
osg::ref_ptr<osg::StateSet> _currentStateSet;
|
||||
std::map<std::string, unsigned int> _nameMap;
|
||||
std::ostream& _fout;
|
||||
std::list<std::string> _nameStack;
|
||||
StateSetStack _stateSetStack;
|
||||
osg::ref_ptr<osg::StateSet> _currentStateSet;
|
||||
std::map<std::string, unsigned int> _nameMap;
|
||||
unsigned int _lastVertexIndex, _lastNormalIndex, _lastTexIndex;
|
||||
MaterialMap _materialMap;
|
||||
bool _outputTextureFiles;
|
||||
osg::ref_ptr<const osgDB::Options> _options;
|
||||
MaterialMap _materialMap;
|
||||
bool _outputTextureFiles;
|
||||
osg::ref_ptr<const osgDB::Options> _options;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ public:
|
||||
supportsOption("NsIfNotPresent=<value>", "set specular exponent if not present");
|
||||
|
||||
supportsOption("precision=<digits>","Set the floating point precision when writing out files");
|
||||
supportsOption("OutputTextureFiles", "Write out the texture images to file");
|
||||
supportsOption("OutputTextureFiles", "Write out the texture images to file");
|
||||
}
|
||||
|
||||
virtual const char* className() const { return "Wavefront OBJ Reader"; }
|
||||
@@ -884,10 +884,10 @@ ReaderWriterOBJ::ObjOptionsStruct ReaderWriterOBJ::parseOptions(const osgDB::Rea
|
||||
{
|
||||
localOptions.noReverseFaces = true;
|
||||
}
|
||||
else if (pre_equals == "OutputTextureFiles")
|
||||
{
|
||||
localOptions.outputTextureFiles = true;
|
||||
}
|
||||
else if (pre_equals == "OutputTextureFiles")
|
||||
{
|
||||
localOptions.outputTextureFiles = true;
|
||||
}
|
||||
else if (pre_equals == "precision")
|
||||
{
|
||||
int val = std::atoi(post_equals.c_str());
|
||||
|
||||
Reference in New Issue
Block a user