gltf: improve embedded data discovery
Some editors seems to use the image resource's mime type (e.g. "image/png") for data embedded uris instead of "application/octet-stream".
(cherry picked from commit 1abf464b59
)
This commit is contained in:
parent
c6a96fc360
commit
e1fc7776f6
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue