~neon/qt/quick3d

« back to all changes in this revision

Viewing changes to 3rdparty/assimp/code/FileSystemFilter.h

  • Committer: Qt by Nokia
  • Author(s): Sergey Dubitskiy
  • Date: 2012-01-24 23:46:01 UTC
  • Revision ID: git-v1:4f3b9edab3b59b6ea150d65c5357f50174cbdd73
Upgrade to AssImp library v2.0.863.

Also includes a new example.

Task-number: QTBUG-22194.

Change-Id: I8870edadff58f8103e3645574b635a3b83ce1d98
Reviewed-by: Danny Pope <daniel.pope@nokia.com>

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
#include "../include/IOSystem.h"
49
49
#include "fast_atof.h"
50
50
#include "ParsingUtils.h"
51
 
namespace Assimp {
 
51
namespace Assimp    {
52
52
 
53
53
// ---------------------------------------------------------------------------
54
54
/** File system filter
66
66
        // Determine base directory
67
67
        base = src_file;
68
68
        std::string::size_type ss2;
69
 
        if (std::string::npos != (ss2 = base.find_last_of("\\/"))) {
 
69
        if (std::string::npos != (ss2 = base.find_last_of("\\/")))    {
70
70
            base.erase(ss2,base.length()-ss2);
71
71
        }
72
72
        else {
73
73
            base = "";
74
 
        // return;
 
74
        //    return;
75
75
        }
76
76
 
77
77
        // make sure the directory is terminated properly
100
100
        std::string tmp = pFile;
101
101
 
102
102
        // Currently this IOSystem is also used to open THE ONE FILE.
103
 
        if (tmp != src_file) {
 
103
        if (tmp != src_file)    {
104
104
            BuildPath(tmp);
105
105
            Cleanup(tmp);
106
106
        }
125
125
        // First try the unchanged path
126
126
        IOStream* s = wrapped->Open(pFile,pMode);
127
127
 
128
 
        if (!s) {
 
128
        if (!s)    {
129
129
            std::string tmp = pFile;
130
130
 
131
131
            // Try to convert between absolute and relative paths