Merge pull request #16881 from fzwoch/gltf_embedded

gltf: improve embedded data discovery
This commit is contained in:
Rémi Verschelde 2018-02-21 14:15:06 +01:00 committed by GitHub
commit ff3e1eaeb3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -1108,7 +1108,8 @@ Error EditorSceneImporterGLTF::_parse_images(GLTFState &state, const String &p_b
if (d.has("uri")) {
String uri = d["uri"];
if (uri.findn("data:application/octet-stream;base64") == 0) {
if (uri.findn("data:application/octet-stream;base64") == 0 ||
uri.findn("data:" + mimetype + ";base64") == 0) {
//embedded data
data = _parse_base64_uri(uri);
data_ptr = data.ptr();