Merge pull request #13205 from luiscuenca/GLTFfix1

Minor fix allows import glTF from Substance Painter
This commit is contained in:
John Conklin II 2018-05-25 08:28:29 -07:00 committed by GitHub
commit 286d09939d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -1174,7 +1174,7 @@ bool GLTFReader::addArrayOfType(const QByteArray& bin, int byteOffset, int byteL
break; break;
} }
case GLTFAccessorComponentType::UNSIGNED_INT: { case GLTFAccessorComponentType::UNSIGNED_INT: {
readArray<quint8>(bin, byteOffset, byteLength, outarray, accessorType); readArray<quint32>(bin, byteOffset, byteLength, outarray, accessorType);
break; break;
} }
case GLTFAccessorComponentType::UNSIGNED_SHORT: { case GLTFAccessorComponentType::UNSIGNED_SHORT: {

View file

@ -190,7 +190,7 @@ namespace GLTFBufferViewTarget {
struct GLTFBufferView { struct GLTFBufferView {
int buffer; //required int buffer; //required
int byteLength; //required int byteLength; //required
int byteOffset; int byteOffset { 0 };
int target; int target;
QMap<QString, bool> defined; QMap<QString, bool> defined;
void dump() { void dump() {
@ -470,7 +470,7 @@ namespace GLTFAccessorComponentType {
} }
struct GLTFAccessor { struct GLTFAccessor {
int bufferView; int bufferView;
int byteOffset; int byteOffset { 0 };
int componentType; //required int componentType; //required
int count; //required int count; //required
int type; //required int type; //required