summaryrefslogtreecommitdiff
path: root/modules/gltf/gltf_document.cpp
AgeCommit message (Collapse)Author
2023-02-14For basisu avoid inserting to the image array twice.K. S. Ernest (iFire) Lee
Basisu images were getting referenced incorrectly like set black or set as not transparent.
2023-02-07Fixes for gltf export.K. S. Ernest (iFire) Lee
* Fix null crashes. * Bake tracks * Add some error messages.
2023-02-06Use reimport_append api for importing embedded gltf imagesLyuma
Co-authored-by: K. S. Ernest (iFire) Lee <ernest.lee@chibifire.com>
2023-02-01gltf: Add GLTFHandleBinary::HANDLE_BINARY_EMBED_AS_UNCOMPRESSEDLyuma
This option allows for a safe fallback for embedded gltf textures in cases where VRAM compression is not needed. Add an is_editor_hint guard around GLTFHandleBinary::HANDLE_BINARY_EXTRACT_TEXTURES, to use EMBED_AS_UNCOMPRESSED by default at runtime. This provides an option for pixel art to be stored losslessly. Additionally, respect project importer defaults for texture import settings. Avoid writing and reimporting extracted textures identical to version on disk.
2023-01-31Merge pull request #72201 from fire/gltf-extract-imgRémi Verschelde
Restore gltf embedded scenes due to problems with textures.
2023-01-31gltf: Avoid using base64 hash as an image filenameK. S. Ernest (iFire) Lee
Consistently use the images.name property with deduplication, or else the image index.
2023-01-30Add remove immutable tracks option to glTF importerSilc Renew
Co-authored-by: Lyuma <xn.lyuma@gmail.com>
2023-01-27Merge pull request #62499 from fire/gltf-binary-img-compressionRémi Verschelde
Handle gltf binary images
2023-01-27Merge pull request #72162 from lyuma/skeleton_renameRémi Verschelde
Make BoneAttachment3D and Skeleton3D names consistent.
2023-01-27Handle gltf binaryK. S. Ernest (iFire) Lee
[ Ignore and Warn | Extract Textures (default) | Optimize Loading Embedded as Basisu ] Enable compressed mip maps from Basis Universal for faster compressions. Increase the quality of Basis to avoid corruption. To keep compatibility use the first mip of the previous internal Godot format. Because texture names may have invalid filename characters, adds String::validate_filename to sanitize filenames for import pipeline use.
2023-01-26Make BoneAttachment3D and Skeleton3D names consistent.Lyuma
BoneAttachment3D nodes are now named as their bone name. Resolves cases where BoneAttachment3D nodes will have arbitrary names like BoneAttachment3D6 Reserve the name "Skeleton3D" and use this name for all generated Skeleton3D nodes. This change will break existing imported scenes with more than one skeleton and/or bone attachments.
2023-01-26Avoid nested skeletons, and handle skinned meshes with children.Lyuma
Recursively adds child nodes into each skeleton. This should prevent nested skeletons and avoid bone attachments for leaf bones. In cases where a skinned mesh has children, creates two scene nodes with the same name, which both will represent this single gltf node. Because blend shape animations must target the mesh, adds a separate mapping for ImporterMeshInstance3D node references. This change will break existing imported scenes with bone attachments and more than one skeleton. Co-authored-by: K. S. Ernest (iFire) Lee <ernest.lee@chibifire.com>
2023-01-23Adds missing method call to set blendshape tracks as 'imported' when ↵SaracenOne
importing from a GLTF.
2023-01-19Fixes cases where the runtime ResourceLoader cannot load gltf images.K. S. Ernest (iFire) Lee
2023-01-05One Copyright Update to rule them allRémi Verschelde
As many open source projects have started doing it, we're removing the current year from the copyright notice, so that we don't need to bump it every year. It seems like only the first year of publication is technically relevant for copyright notices, and even that seems to be something that many companies stopped listing altogether (in a version controlled codebase, the commits are a much better source of date of publication than a hardcoded copyright statement). We also now list Godot Engine contributors first as we're collectively the current maintainers of the project, and we clarify that the "exclusive" copyright of the co-founders covers the timespan before opensourcing (their further contributions are included as part of Godot Engine contributors). Also fixed "cf." Frenchism - it's meant as "refer to / see".
2022-12-17glTF: Fix export crash with a ShaderMaterial (fixes #70159)Quentin Guidée
2022-12-11Pass GLTFState to the export_preflight methodAaron Franke
2022-12-10Consistently use `p_` for parameters in GLTFDocumentAaron Franke
2022-12-10Merge pull request #69372 from aaronfranke/gltf-cleanupRémi Verschelde
GLTF module: Clean up lots of includes
2022-12-04Use system fonts as fallback and improve system font handling.bruvzg
Add support for font weight and stretch selection when using system fonts. Add function to get system fallback font from a font name, style, text, and language code. Implement system font support for Android. Use system fonts as a last resort fallback.
2022-11-29GLTF: Clean up lots of includesAaron Franke
2022-11-29Merge pull request #68665 from TokageItLab/cut-unkeyed-gltf-animRémi Verschelde
Add "Trimming" option to cut un-keyed timeline before first key in glTF animation
2022-11-29Add trimming option to cut un-keyed timeline before first key in gltfSilc Renew
2022-11-24Merge pull request #69083 from fire/abstract_gltf_materialRémi Verschelde
Cache materials in gltf as the abstract class of Material in GLTFDocument
2022-11-24Cache materials in gltf as the abstract class of MaterialK. S. Ernest (iFire) Lee
Use the abstract material class instead of BaseMaterial3D. This allows inserting ShaderMaterials into gltf. Like in VRM.
2022-11-22Add unregister for GLTFDocumentExtensionRedMser
2022-11-21Add three new methods to GLTFDocumentExtensionAaron Franke
2022-11-09Change the way GLTFDocumentExtension classes are registeredAaron Franke
Also move GLTFDocumentExtension into the extensions folder
2022-11-01Replace Quaternion Euler constructor with `from_euler` methodAaron Franke
2022-10-14Make some Image methods statickobewi
2022-10-10SCons: Re-enable treating `#warning` as error with `werror`Rémi Verschelde
Replace all TODO uses of `#warning` by proper TODO comments, and will open matching bug reports to keep track of them. We don't have a great track record fixing TODOs, but I'd wager we're even worse for fixing these "TODO #warning" so we should prohibit this usage.
2022-10-07Fix MSVC warnings, rename shadowed variables, fix uninitialized values, ↵bruvzg
change warnings=all to use /W4.
2022-10-03GLTF imports & exports material texture filtersThe Tophat Demon
2022-09-19Add a way to get the GLTF extensions supported by GLTFDocumentExtensionAaron Franke
2022-09-19Make used extensions stored in GLTFStateAaron Franke
This allows GLTFDocumentExtension classes to add to the used extensions array.
2022-09-18Minor enhancements to the GLTF module (lights and docs)Aaron Franke
2022-09-10Fix gltf 8 bone weights condition to check for the second joint arraySarfraz
size.
2022-09-05Rename TileMap/GridMap.`world_to_map` and opposite to `local_to_map`Micky
For both TileMap and GridMap: - `world_to_map` -> `local_to_map` - `map_to_world` -> `map_to_local` Also changes any mention of "world" in this context to "local" to avoid future confusion. Finally, updates the docs of both methods for consistency. In particular, adding a note on how to convert the returned values from local to global coordinates and vice versa.
2022-09-02Merge pull request #65170 from KoBeWi/your_argument_is_TypedArrayRémi Verschelde
2022-09-02Add `is_zero_approx` methods to `Vector2`, `3`, and `4`Jonathan Nicholl
2022-09-01Change Array arguments to TypedArraykobewi
2022-08-30Merge pull request #65066 from aaronfranke/str-path-joinRémi Verschelde
2022-08-29Rename String `plus_file` to `path_join`Aaron Franke
2022-08-28Move GLTF camera conversion code into GLTFCameraAaron Franke
2022-08-28Move GLTF light conversion code into GLTFLightAaron Franke
2022-08-26Rename `str2var` to `str_to_var` and similarMicky
Affects the Math class, a good chunk of the audio code, and a lot of other miscellaneous classes, too. - `var2str` -> `var_to_str` - `str2var` -> `str_to_var` - `bytes2var` -> `bytes_to_var` - `bytes2var_with_objects` -> `bytes_to_var_with_objects` - `var2bytes` -> `var_to_bytes` - `var2bytes_with_objects` -> `var_to_bytes_with_objects` - `linear2db` -> `linear_to_db` - `db2linear` -> `db_to_linear` - `deg2rad` -> `deg_to_rad` - `rad2deg` -> `rad_to_deg` - `dict2inst` -> `dict_to_inst` - `inst2dict` -> `inst_to_dict`
2022-08-22Merge pull request #64400 from aaronfranke/gltf-fix-cameraRémi Verschelde
2022-08-20Expose Basis `set_orthogonal_index` method as a GridMap functionrafallus
2022-08-14GLTF: Fix orthographic cameras, internally store data in GLTF's formatAaron Franke
2022-08-10Prevent AnimationPlayer from being added on GLTF import if the option is ↵Hakim
unchecked. Fixes #63954