godot/scene/resources
Rémi Verschelde 2e99d0b26f
glTF: Fix parsing image data with mimeType undefined
The glTF 2.0 spec only makes `mimeType` mandatory for `bufferView` image data,
so the previous logic to handle URIs with base64-encoded images could fail if
`mimeType` is undefined.

The logic was documented and refactored to better handle the spec, notably:

- `uri` and `bufferView` are now mutually exclusive, and only the latter fails
  if `mimeType` is undefined.
- `uri` with a file path will now respect the `mimeType` if defined, and thus
  attempt loading the file with the specified format (even if its extension is
  not the one expected for this format). So we can support bad extensions (PNG
  data with `.jpg` extension) or custom ones (PNG data in `.img` file for
  example).
- `uri` with base64 encoded data will infer MIME type from `data:image/png` or
  `data:image/jpeg` if it was not documented in `mimeType` initially.
- `uri` with base64 encoded data, no `mimeType` and `application/octet-stream`
  or `application/gltf-buffer` will fall back to trying both PNG and JPEG
  loaders.

Fully fixes #33796 (and fixes up #42501).
2020-10-05 13:06:50 +02:00
..
default_theme Move safe line color into editor 2020-09-10 20:35:28 +01:00
animation.cpp Expose Animation::value_track_interpolate to GDscript 2020-10-01 14:27:09 +02:00
animation.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
audio_stream_sample.cpp Style: Enforce braces around if blocks and loops 2020-05-14 21:57:34 +02:00
audio_stream_sample.h Add override keywords. 2020-07-10 13:56:54 +01:00
bit_map.cpp Style: Enforce braces around if blocks and loops 2020-05-14 21:57:34 +02:00
bit_map.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
box_shape_3d.cpp Shape3D::get_debug_mesh_lines const methods 2020-08-02 11:10:43 +02:00
box_shape_3d.h Shape3D::get_debug_mesh_lines const methods 2020-08-02 11:10:43 +02:00
camera_effects.cpp Environment: Refactor code for readability + more 2020-07-01 14:44:45 +02:00
camera_effects.h Add override keywords. 2020-07-10 13:56:54 +01:00
capsule_shape_2d.cpp Split Geometry singleton into Geometry2D and Geometry3D 2020-05-27 14:28:34 +03:00
capsule_shape_2d.h Add override keywords. 2020-07-10 13:56:54 +01:00
capsule_shape_3d.cpp Shape3D::get_debug_mesh_lines const methods 2020-08-02 11:10:43 +02:00
capsule_shape_3d.h Shape3D::get_debug_mesh_lines const methods 2020-08-02 11:10:43 +02:00
circle_shape_2d.cpp Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
circle_shape_2d.h Add override keywords. 2020-07-10 13:56:54 +01:00
concave_polygon_shape_2d.cpp Split Geometry singleton into Geometry2D and Geometry3D 2020-05-27 14:28:34 +03:00
concave_polygon_shape_2d.h Add override keywords. 2020-07-10 13:56:54 +01:00
concave_polygon_shape_3d.cpp Shape3D::get_debug_mesh_lines const methods 2020-08-02 11:10:43 +02:00
concave_polygon_shape_3d.h Shape3D::get_debug_mesh_lines const methods 2020-08-02 11:10:43 +02:00
convex_polygon_shape_2d.cpp Split Geometry singleton into Geometry2D and Geometry3D 2020-05-27 14:28:34 +03:00
convex_polygon_shape_2d.h Add override keywords. 2020-07-10 13:56:54 +01:00
convex_polygon_shape_3d.cpp Shape3D::get_debug_mesh_lines const methods 2020-08-02 11:10:43 +02:00
convex_polygon_shape_3d.h Shape3D::get_debug_mesh_lines const methods 2020-08-02 11:10:43 +02:00
curve.cpp Style: Enforce braces around if blocks and loops 2020-05-14 21:57:34 +02:00
curve.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
cylinder_shape_3d.cpp Shape3D::get_debug_mesh_lines const methods 2020-08-02 11:10:43 +02:00
cylinder_shape_3d.h Shape3D::get_debug_mesh_lines const methods 2020-08-02 11:10:43 +02:00
dynamic_font.cpp [Complex Test Layouts] Change String to use UTF-32 encoding on all platforms. 2020-09-03 19:56:24 +03:00
dynamic_font.h [Complex Test Layouts] Change String to use UTF-32 encoding on all platforms. 2020-09-03 19:56:24 +03:00
environment.cpp Add fog to sky shaders 2020-08-19 22:58:14 -07:00
environment.h Restored fog (non volumetric). 2020-08-13 22:09:22 -03:00
font.cpp [Complex Test Layouts] Change String to use UTF-32 encoding on all platforms. 2020-09-03 19:56:24 +03:00
font.h [Complex Test Layouts] Change String to use UTF-32 encoding on all platforms. 2020-09-03 19:56:24 +03:00
gradient.cpp Merge pull request #35924 from doot24/fix_#35863 2020-09-27 09:51:24 +02:00
gradient.h Sort points in a Gradient for color and offset updates. 2020-08-12 01:55:41 -04:00
height_map_shape_3d.cpp Shape3D::get_debug_mesh_lines const methods 2020-08-02 11:10:43 +02:00
height_map_shape_3d.h Shape3D::get_debug_mesh_lines const methods 2020-08-02 11:10:43 +02:00
line_shape_2d.cpp Split Geometry singleton into Geometry2D and Geometry3D 2020-05-27 14:28:34 +03:00
line_shape_2d.h Add override keywords. 2020-07-10 13:56:54 +01:00
material.cpp Style: Enforce braces around if blocks and loops 2020-05-14 21:57:34 +02:00
material.h Add override keywords. 2020-07-10 13:56:54 +01:00
mesh.cpp glTF: Fix parsing image data with mimeType undefined 2020-10-05 13:06:50 +02:00
mesh.h Remove ArrayMesh::surface_remove declaration 2020-09-04 16:27:59 +02:00
mesh_data_tool.cpp Style: Enforce braces around if blocks and loops 2020-05-14 21:57:34 +02:00
mesh_data_tool.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
mesh_library.cpp Style: Enforce braces around if blocks and loops 2020-05-14 21:57:34 +02:00
mesh_library.h mesh_library.h: Update header guard to reflect file name 2020-09-08 15:12:31 +03:00
multimesh.cpp Style: Enforce braces around if blocks and loops 2020-05-14 21:57:34 +02:00
multimesh.h Add override keywords. 2020-07-10 13:56:54 +01:00
navigation_mesh.cpp Style: Enforce braces around if blocks and loops 2020-05-14 21:57:34 +02:00
navigation_mesh.h Add override keywords. 2020-07-10 13:56:54 +01:00
packed_scene.cpp Fix typos with codespell 2020-09-18 13:44:25 +02:00
packed_scene.h Add override keywords. 2020-07-10 13:56:54 +01:00
particles_material.cpp doc: Sync classref with current source 2020-09-11 12:22:10 +02:00
particles_material.h doc: Sync classref with current source 2020-09-11 12:22:10 +02:00
physics_material.cpp Fix hints on PhysicsMaterial bounce/friction. 2020-09-19 18:44:49 -04:00
physics_material.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
polygon_path_finder.cpp Split Geometry singleton into Geometry2D and Geometry3D 2020-05-27 14:28:34 +03:00
polygon_path_finder.h Style: Enforce braces around if blocks and loops 2020-05-14 21:57:34 +02:00
primitive_meshes.cpp Made property hint consistent with other property hints 2020-06-03 13:01:27 -07:00
primitive_meshes.h Add override keywords. 2020-07-10 13:56:54 +01:00
ray_shape_2d.cpp Move RayShape2D implementation into its own translation unit 2020-06-01 01:52:07 +03:00
ray_shape_2d.h Add override keywords. 2020-07-10 13:56:54 +01:00
ray_shape_3d.cpp Shape3D::get_debug_mesh_lines const methods 2020-08-02 11:10:43 +02:00
ray_shape_3d.h Shape3D::get_debug_mesh_lines const methods 2020-08-02 11:10:43 +02:00
rectangle_shape_2d.cpp Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
rectangle_shape_2d.h Add override keywords. 2020-07-10 13:56:54 +01:00
resource_format_text.cpp Improve appearance of [connection] and [editable] sections in .tscn files 2020-09-29 14:01:01 +03:00
resource_format_text.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
SCsub SCons: Format buildsystem files with psf/black 2020-03-30 09:05:53 +02:00
segment_shape_2d.cpp Move RayShape2D implementation into its own translation unit 2020-06-01 01:52:07 +03:00
segment_shape_2d.h Add override keywords. 2020-07-10 13:56:54 +01:00
shader.cpp doc: Sync classref with current source 2020-09-04 10:43:11 +02:00
shader.h Add override keywords. 2020-07-10 13:56:54 +01:00
shape_2d.cpp Merge pull request #37903 from Xrayez/shape-2d-draw-bind 2020-06-16 15:15:51 +02:00
shape_2d.h Add override keywords. 2020-07-10 13:56:54 +01:00
shape_3d.cpp Style: Enforce braces around if blocks and loops 2020-05-14 21:57:34 +02:00
shape_3d.h Shape3D::get_debug_mesh_lines const methods 2020-08-02 11:10:43 +02:00
skin.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
skin.h Add support for named binds in Skin. 2020-02-21 09:40:29 -03:00
sky.cpp Add incremental update mode to sky 2020-07-11 00:10:15 -07:00
sky.h Merge pull request #40272 from clayjohn/VULKAN-time-slicing 2020-07-11 10:00:39 +02:00
sky_material.cpp Add night sky to PhysicalSkyMaterial 2020-05-16 12:59:55 -07:00
sky_material.h Add override keywords. 2020-07-10 13:56:54 +01:00
sphere_shape_3d.cpp Shape3D::get_debug_mesh_lines const methods 2020-08-02 11:10:43 +02:00
sphere_shape_3d.h Shape3D::get_debug_mesh_lines const methods 2020-08-02 11:10:43 +02:00
style_box.cpp Add a property hint to StyleBoxFlat shadow_size for editor usability 2020-09-24 17:41:40 +02:00
style_box.h Add override keywords. 2020-07-10 13:56:54 +01:00
surface_tool.cpp Style: Enforce braces around if blocks and loops 2020-05-14 21:57:34 +02:00
surface_tool.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
syntax_highlighter.cpp Switch from recursion to iterative for backfilling colour regions 2020-10-03 14:58:55 +01:00
syntax_highlighter.h Changed line_edited_from(from) to lines_edit_from(from, to) 2020-09-10 20:35:28 +01:00
text_file.cpp Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
text_file.h Add override keywords. 2020-07-10 13:56:54 +01:00
texture.cpp Implement 3D textures as import and resource format. 2020-09-09 13:50:21 -03:00
texture.h Implement 3D textures as import and resource format. 2020-09-09 13:50:21 -03:00
theme.cpp Style: Enforce braces around if blocks and loops 2020-05-14 21:57:34 +02:00
theme.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
tile_set.cpp [Complex Test Layouts] Change String to use UTF-32 encoding on all platforms. 2020-09-03 19:56:24 +03:00
tile_set.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
video_stream.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
visual_shader.cpp Fix VisualShaderNode::set_output_port_connected 2020-10-02 09:06:13 +03:00
visual_shader.h Fix VisualShaderNode::set_output_port_connected 2020-10-02 09:06:13 +03:00
visual_shader_nodes.cpp Fix typo in VisualShaderNodeSample3D::generate_code 2020-10-04 10:34:58 +03:00
visual_shader_nodes.h Merge pull request #42078 from Chaosus/vs_rename_type 2020-09-29 10:34:22 +02:00
world_2d.cpp Avoid overflow when calculating visible_cells 2020-07-13 16:53:58 +02:00
world_2d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
world_3d.cpp Style: Enforce braces around if blocks and loops 2020-05-14 21:57:34 +02:00
world_3d.h Environment: Refactor code for readability + more 2020-07-01 14:44:45 +02:00
world_margin_shape_3d.cpp Shape3D::get_debug_mesh_lines const methods 2020-08-02 11:10:43 +02:00
world_margin_shape_3d.h Shape3D::get_debug_mesh_lines const methods 2020-08-02 11:10:43 +02:00