From Laurens Voerman, "while testing databasepager stuff I noticed that the various loaders (osg/ive/osgx) do not pass the current options to the imagePager, therefore the images cannot be found if not in the global OSG_FILE_PATH. Attached is a fix, containing modified versions of
From Robert Osfield, add check to only apply Options object when a valid Option object is assigned. git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14290 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
parent
d939adeb56
commit
d82131544b
@ -17,6 +17,7 @@
|
||||
#include "Object.h"
|
||||
|
||||
#include <osg/Notify>
|
||||
#include <osgDB/Options>
|
||||
|
||||
using namespace ive;
|
||||
|
||||
@ -75,6 +76,7 @@ void ImageSequence::read(DataInputStream* in)
|
||||
unsigned int numFileNames = in->readUInt();
|
||||
if (numFileNames>0)
|
||||
{
|
||||
if (in->getOptions()) setReadOptions(new osgDB::Options(*in->getOptions()));
|
||||
for(unsigned int i=0; i<numFileNames; ++i)
|
||||
{
|
||||
addImageFile(in->readString());
|
||||
|
@ -60,6 +60,7 @@ bool ImageSequence_readLocalData(Object& obj, Input& fr)
|
||||
|
||||
if (fr.matchSequence("FileNames {"))
|
||||
{
|
||||
if (fr.getOptions()) is.setReadOptions(new osgDB::Options(*fr.getOptions()));
|
||||
fr += 2;
|
||||
iteratorAdvanced = true;
|
||||
int entry = fr[0].getNoNestedBrackets();
|
||||
|
@ -12,6 +12,7 @@ static bool checkFileNames( const osg::ImageSequence& image )
|
||||
static bool readFileNames( osgDB::InputStream& is, osg::ImageSequence& image )
|
||||
{
|
||||
unsigned int files = 0; is >> files >> is.BEGIN_BRACKET;
|
||||
if (is.getOptions()) image.setReadOptions(new osgDB::Options(*is.getOptions()));
|
||||
for ( unsigned int i=0; i<files; ++i )
|
||||
{
|
||||
std::string filename; is.readWrappedString( filename );
|
||||
|
Loading…
Reference in New Issue
Block a user