When one invalid image fails, it should only fail that single image.
Move to a more graceful degradation 3d asset import model.
(cherry picked from commit a81f4dd5a7)
This commit is contained in:
committed by
Rémi Verschelde
parent
2c400a7aae
commit
d5b6cb4639
@ -1451,8 +1451,11 @@ Error EditorSceneImporterGLTF::_parse_images(GLTFState &state, const String &p_b
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ERR_FAIL_COND_V_MSG(img.is_null(), ERR_FILE_CORRUPT,
|
if (img.is_null()) {
|
||||||
vformat("glTF: Couldn't load image index '%d' with its given mimetype: %s.", i, mimetype));
|
ERR_PRINT(vformat("glTF: Couldn't load image index '%d' with its given mimetype: %s.", i, mimetype));
|
||||||
|
state.images.push_back(Ref<Texture>());
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
Ref<ImageTexture> t;
|
Ref<ImageTexture> t;
|
||||||
t.instance();
|
t.instance();
|
||||||
|
|||||||
Reference in New Issue
Block a user