virtualx-engine/editor
Rémi Verschelde 9529ce41eb
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).

(cherry picked from commit 2e99d0b26f)
2020-10-05 14:41:53 +02:00
..
collada SCons: Format buildsystem files with psf/black 2020-06-10 15:30:52 +02:00
doc DocData: Skip language-specific ClassDoc without methods/constants 2020-06-18 11:29:28 +02:00
fileserver SCons: Format buildsystem files with psf/black 2020-06-10 15:30:52 +02:00
icons Replace AutoKey icon with a more universally understood "record" button 2020-09-29 08:54:45 +02:00
import glTF: Fix parsing image data with mimeType undefined 2020-10-05 14:41:53 +02:00
plugins Fix bound return type on get_priority. 2020-10-04 20:51:19 +02:00
translations i18n: Rename pt_PT to pt 2020-09-29 08:54:45 +02:00
animation_bezier_editor.cpp Fix timeline cursor not updating on zoom change in the Bezier editor 2020-07-03 15:34:30 +02:00
animation_bezier_editor.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
animation_track_editor.cpp Reverse mouse wheel in animation track editor 2020-05-25 16:38:02 +02:00
animation_track_editor.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
animation_track_editor_plugins.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
animation_track_editor_plugins.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
array_property_edit.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
array_property_edit.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
audio_stream_preview.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
audio_stream_preview.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
code_editor.cpp Optimized ScriptEditor initialization when many scripts are loaded 2020-07-17 09:42:11 +02:00
code_editor.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
connections_dialog.cpp Added search box to signals dock. 2020-09-24 14:43:09 +02:00
connections_dialog.h Added search box to signals dock. 2020-09-24 14:43:09 +02:00
create_dialog.cpp Fix custom types in node list search 2020-06-15 14:34:34 +02:00
create_dialog.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
dependency_editor.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
dependency_editor.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
dictionary_property_edit.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
dictionary_property_edit.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_about.cpp i18n: Sync translations with Weblate 2020-09-08 14:05:53 +02:00
editor_about.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_asset_installer.cpp fix item_edited behavior on Asset Installer. 2020-07-13 15:11:33 +02:00
editor_asset_installer.h fix item_edited behavior on Asset Installer. 2020-07-13 15:11:33 +02:00
editor_atlas_packer.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_atlas_packer.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_audio_buses.cpp Prefer the highlight version of the "GuiTabIcon" icon for buttons, and make their width/height equal 2020-07-15 12:11:31 +02:00
editor_audio_buses.h Delete bus effect with Delete key 2020-06-15 14:34:35 +02:00
editor_autoload_settings.cpp Improved warning shown when autoload cannot be added. 2020-06-04 12:16:39 +02:00
editor_autoload_settings.h Improve the AutoLoad editor UX 2020-02-14 15:52:50 +01:00
editor_builders.py SCons: Format buildsystem files with psf/black 2020-06-10 15:30:52 +02:00
editor_data.cpp Don't write global script class information if there is none 2020-10-04 20:53:50 +02:00
editor_data.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_dir_dialog.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_dir_dialog.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_export.cpp iOS: Fix multiple issues with PVRTC import, disable ETC1 2020-09-23 11:13:50 +02:00
editor_export.h iOS: Fix multiple issues with PVRTC import, disable ETC1 2020-09-23 11:13:50 +02:00
editor_feature_profile.cpp Make the Import dock depend on the FileSystem dock 2020-09-24 14:43:05 +02:00
editor_feature_profile.h Make the Import dock depend on the FileSystem dock 2020-09-24 14:43:05 +02:00
editor_file_dialog.cpp Fixes leak with drives [3.2] 2020-04-12 14:05:47 +02:00
editor_file_dialog.h Improve UX of drive letters 2020-03-17 14:48:54 +01:00
editor_file_system.cpp auto re-import atlas, fixes #40047 2020-07-10 11:00:10 +02:00
editor_file_system.h Make file system scan more robust 2020-02-14 16:05:36 +01:00
editor_folding.cpp Fix EditorFolding crash when switching scenes 2020-03-06 23:51:26 +01:00
editor_folding.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_fonts.cpp Add rotation widget to 3D viewport 2020-03-09 09:40:10 +01:00
editor_fonts.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_help.cpp Link exposed set/getters in property descriptions 2020-06-18 10:51:45 +02:00
editor_help.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_help_search.cpp Revert "Adds fuzzy search for help search dialog" 2020-07-03 13:17:57 +02:00
editor_help_search.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_inspector.cpp Stopped trying to revert to default values when script implementation of property_can_revert exists 2020-05-06 23:29:08 +02:00
editor_inspector.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_layouts_dialog.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_layouts_dialog.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_log.cpp Improvement for the Copy button in the Output Log 2020-09-29 08:54:45 +02:00
editor_log.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_network_profiler.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_network_profiler.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_node.cpp Improve editor tooltips related to debugging 2020-09-24 14:43:09 +02:00
editor_node.h implement generic filename disambiguation 2020-07-24 10:31:56 +02:00
editor_path.cpp Clip text in EditorPath button to avoid dock size changes 2020-01-20 14:25:27 -03:00
editor_path.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_plugin.cpp Added inspector_only option to inspect_object in EditorInterface. 2020-09-29 13:57:57 +02:00
editor_plugin.h Added inspector_only option to inspect_object in EditorInterface. 2020-09-29 13:57:57 +02:00
editor_plugin_settings.cpp Use checkbox for plugin status instead of option list 2020-03-25 09:38:53 +01:00
editor_plugin_settings.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_profiler.cpp Use the editor background color for the profiler graph 2020-02-06 13:02:08 +01:00
editor_profiler.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_properties.cpp Improve the inspector easing editor 2020-09-29 13:57:57 +02:00
editor_properties.h Use int64_t for EditorPropertyInteger and warn when out of double range 2020-01-15 23:39:49 -05:00
editor_properties_array_dict.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_properties_array_dict.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_resource_preview.cpp Fixes FileSystem tree preview icon size on HiDPI 2020-10-01 16:00:46 +02:00
editor_resource_preview.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_run.cpp [macOS, 3.2] Implement seamless display scaling. 2020-07-07 22:54:33 +03:00
editor_run.h Expose methods to play scene from plugin code 2020-07-06 19:00:56 +02:00
editor_run_native.cpp Improve editor tooltips related to debugging 2020-09-24 14:43:09 +02:00
editor_run_native.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_run_script.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_run_script.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_scale.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_scale.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_sectioned_inspector.cpp Fix filtering of search results in SectionedInspector 2020-09-24 14:43:06 +02:00
editor_sectioned_inspector.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_settings.cpp Fixes leak with creating editor settings 2020-09-04 08:49:58 +02:00
editor_settings.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_spin_slider.cpp Allow using a comma as decimal separator in EditorSpinSlider 2020-09-29 13:57:57 +02:00
editor_spin_slider.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_sub_scene.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_sub_scene.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_themes.cpp Fixes DefaultProjectIcon scaling with editor scale 2020-09-24 14:43:06 +02:00
editor_themes.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_vcs_interface.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_vcs_interface.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
export_template_manager.cpp Re-architecture of the Godot Android plugin. 2020-03-09 10:30:02 +01:00
export_template_manager.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
filesystem_dock.cpp Allow duplicating files when holding Control 2020-06-18 11:29:27 +02:00
filesystem_dock.h Expose FileSystemDock to the scripting API and fixed signals 2020-03-18 17:57:45 +01:00
find_in_files.cpp Search result highlights follow font size 2020-06-18 11:29:28 +02:00
find_in_files.h Search result highlights follow font size 2020-06-18 11:29:28 +02:00
groups_editor.cpp Fixes add group in Group Editor dialog 2020-02-14 15:58:36 +01:00
groups_editor.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
import_dock.cpp check the params section exist before erasing it in import_dock 2020-05-25 16:32:05 +02:00
import_dock.h Fix multiple issues with the "Import" dock 2020-02-18 14:18:09 +01:00
inspector_dock.cpp Implement undo-redo feature for Parameter Paste in the Inspector 2020-03-04 12:40:15 +01:00
inspector_dock.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
multi_node_edit.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
multi_node_edit.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
node_dock.cpp Clip text in NodeDock toolbuttons to prevent dock size changes 2020-01-21 10:23:09 +01:00
node_dock.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
pane_drag.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
pane_drag.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
plugin_config_dialog.cpp Fix build with GDScript support disabled 2020-09-08 09:14:25 +02:00
plugin_config_dialog.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
progress_dialog.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
progress_dialog.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
project_export.cpp Account for file deletion and renaming in Export Presets 2020-06-11 10:00:06 +02:00
project_export.h Implementation of the Godot Android Plugin configuration file 2020-05-16 23:09:45 -07:00
project_manager.cpp Change the "remove missing" button to disabled rather than hidden 2020-09-29 13:57:57 +02:00
project_manager.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
project_settings_editor.cpp Add placeholders to the searchbars in the Project/Editor settings 2020-09-24 14:43:10 +02:00
project_settings_editor.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
property_editor.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
property_editor.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
property_selector.cpp Improve search and display in the editor property/method selector 2020-09-24 14:43:09 +02:00
property_selector.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
pvrtc_compress.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
pvrtc_compress.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
quick_open.cpp Remove directory search results 2020-06-29 10:56:32 +02:00
quick_open.h Remove directory search results 2020-06-29 10:56:32 +02:00
register_exporters.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
rename_dialog.cpp Minor visual improvements to the "Batch Rename" dialog 2020-09-24 14:43:09 +02:00
rename_dialog.h Improve the batch rename dialog 2020-02-14 15:54:22 +01:00
reparent_dialog.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
reparent_dialog.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
run_settings_dialog.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
run_settings_dialog.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
scene_tree_dock.cpp Changes mention of Node3D back to Spatial 2020-10-01 23:55:10 +08:00
scene_tree_dock.h Fix changing icons' colors when switch dark and light theme 2020-09-24 14:43:10 +02:00
scene_tree_editor.cpp striped edges on node rename in SceneTreeDock 2020-09-29 08:54:45 +02:00
scene_tree_editor.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
script_create_dialog.cpp Make sure built-in script warning fits in dialog 2020-06-05 14:40:08 +02:00
script_create_dialog.h Warn about built-in script limitations in the script creation dialog 2020-04-16 12:47:18 +02:00
script_editor_debugger.cpp Fix typos with codespell 2020-09-18 14:09:51 +02:00
script_editor_debugger.h Fix dialog spam when inspecting MeshInstance from model file 2020-06-10 15:30:51 +02:00
SCsub SCons: Format buildsystem files with psf/black 2020-06-10 15:30:52 +02:00
settings_config_dialog.cpp Add placeholders to the searchbars in the Project/Editor settings 2020-09-24 14:43:10 +02:00
settings_config_dialog.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
spatial_editor_gizmos.cpp Merge pull request #37863 from ExpiredPopsicle/culling5 2020-04-30 08:05:11 +02:00
spatial_editor_gizmos.h Update Joint gizmos automatically 2020-04-23 11:07:32 +02:00