summaryrefslogtreecommitdiffstats
path: root/core/io/resource_importer.h
Commit message (Collapse)AuthorAgeFilesLines
* Merge commit godotengine/godot@cb411fa960f0b7fdbd97dcdb4c90f9346360ee0eSpartan3222024-11-121-1/+2
|\
| * Merge pull request #97363 from reduz/deterministic-gen-suberesources-idThaddeus Crews2024-11-111-1/+1
| |\ | | | | | | | | | Allow passing UID to importer
| | * Allow passing UID to importerJuan2024-11-111-1/+1
| | | | | | | | | | | | | | | | | | | | | This helps, for importers spitting out new resources to the res:// filesystem to actually hash them to generate deterministic UIDs. This PR also fixes the determinism for translations.
| * | Universalize UID support in all resource typesJuan2024-11-111-0/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | Ensures all resource types support UIDs in a project. This is required to fix: * Scripts and many other resource types can't be referenced by UID and when refactored the references are lost. * Path export properties can't use UID for unsupported types. * Refactoring problems when files are moved outside the editor (this PR effectively fixes it). * Editor properly refreshing paths if they changed externally while opened (as example, git update). This needs to be addressed in a subsequent PR, but this one effectively sets the prerequisites. Resource types that do not support UID will get a .uid file appended to them (this includes .gd, .gdshader, .gdextension, etc. files).
* | Merge commit godotengine/godot@0f5f3bc9546b46b2029fc8896dc859697f1eab97Spartan3222024-11-111-1/+1
|\|
| * Fix freeze on non-thread-safe custom importersHunter Loftis2024-10-151-1/+1
| |
* | Fix copyright headers referring to GodotSpartan3222024-10-271-2/+2
| |
* | Rebrand preambles to RedotDubhghlas McLaughlin2024-10-111-0/+2
|/ | | | | | | | | | | | | | | | | | | | | | Credits: Co-authored-by: Skogi <skogi.b@gmail.com> Co-authored-by: Spartan322 <Megacake1234@gmail.com> Co-authored-by: swashberry <swashdev@pm.me> Co-authored-by: Christoffer Sundbom <christoffer_karlsson@live.se> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: McDubh <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: radenthefolf <radenthefolf@gmail.com> Co-authored-by: John Knight <80524176+Tekisasu-JohnK@users.noreply.github.com> Co-authored-by: Adam Vondersaar <adam.vondersaar@uphold.com> Co-authored-by: decryptedchaos <nixgod@gmail.com> Co-authored-by: zaftnotameni <122100803+zaftnotameni@users.noreply.github.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: wesam <108880473+wesamdev@users.noreply.github.com> Co-authored-by: Mister Puma <MisterPuma80@gmail.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: SingleError <isaaconeoneone@gmail.com> Co-authored-by: Bioblaze Payne <BioblazePayne@gmail.com>
* Fix slow editor load on large projects (v2)Hilderin2024-09-251-1/+1
|
* Fix Addon requires editor restart to become functionalHilderin2024-09-021-0/+7
|
* Fix FileSystem dock won't show any file folders (v2)Hilderin2024-08-201-0/+1
|
* Revert "Fix FileSystem dock won't show any file folders"Rémi Verschelde2024-06-111-3/+0
| | | | | | This reverts commit 72856d633a6be5c596d4a3231acab009828a2efe. Fixes #93022.
* Fix FileSystem dock won't show any file foldersHilderin2024-06-101-0/+3
|
* Add 'override' mark to ResourceFormat classppphp2024-03-251-15/+15
|
* Implement glTF compat version system for files from older Godot versionsAaron Franke2023-11-031-0/+1
|
* Ability to change a resource UID from APIJuan Linietsky2023-01-091-0/+8
| | | | | | | | | | * Works for text, binary and imported resources * Allows better clean up of duplicate files. TODO (future PRs): * Use this API for assigning new UIDs to copied files. * Use this API for UID conflict on FS scanning (if more than one file has the same UID, the newer one(s) should get assigned a different UID).
* One Copyright Update to rule them allRémi Verschelde2023-01-051-29/+29
| | | | | | | | | | | | | | | | | | | | 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".
* Implement Feature Build Profilesreduz2022-07-221-1/+1
| | | | | | | | | | | | | | | | | | | | | This PR is a continuation of #50381 (which was implemented exactly a year ago!) * Add a visual interface to select which classes should not be built into Godot (well, they are built if something else uses them, but if not used the optimizer will remove them out). * Add a detection system to scan the project and figure out the actual classes used. * Added the ability for SCons to load build profiles. Obligatory Screen: A simple test with a couple of nodes in the scene resulted in a 25% reduction for the final binary size TODO: * Script languages need to implement used class detection (left for another PR). * Options to disable servers or server functionalities (like 2D or 3D physics, navigation, etc). Are missing, that should also greatly aid in reducing binary size. * Options to disable some modules would be desired. * More options to disable drivers (OpenGL, Vulkan, etc) would be desired. In general this PR is a starting point for more contributors to improve and enhance this functionality.
* Replace most uses of Map by HashMapreduz2022-05-161-3/+3
| | | | | | | | | | | | * Map is unnecessary and inefficient in almost every case. * Replaced by the new HashMap. * Renamed Map to RBMap and Set to RBSet for cases that still make sense (order matters) but use is discouraged. There were very few cases where replacing by HashMap was undesired because keeping the key order was intended. I tried to keep those (as RBMap) as much as possible, but might have missed some. Review appreciated!
* Remove `RES` and `REF` typedefs in favor of spelled out `Ref<>`Hugo Locurcio2022-05-031-1/+1
| | | | | | These typedefs don't save much typing compared to the full `Ref<Resource>` and `Ref<RefCounted>`, yet they sometimes introduce confusion among new contributors.
* ResourceImporter: Restore default append logic for new importersRémi Verschelde2022-02-071-1/+1
| | | | | | | | This was changed in #56943 to allow adding new importers from plugins that take precedence over built-in ones, but this should be opt-in, not the default behavior. Fixes #57730.
* Make add_importer and add_post_importer_plugin override existing importers.K. S. Ernest (iFire) Lee2022-01-191-3/+2
|
* Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
| | | | Happy new year to the wonderful Godot community!
* Add path to functions that return iporter optionsreduz2021-11-141-2/+2
| | | | | | | -Allows displaying custom options for specific file format variants -Added support for scene format import to retrieve custom options This PR is necessary for #54886 to be implemented properly.
* Implement Resource UIDsreduz2021-07-241-0/+3
| | | | | | | | | | | | | | | | | | | | * Most resource types now have unique identifiers. * Applies to text, binary and imported resources. * File formats reference both by text and UID (when available). UID always has priority. * Resource UIDs are 64 bits for better compatibility with the engine. * Can be represented and used textually, example `uuid://dapwmgsmnl28u`. * A special binary cache file is used and exported, containing the mappings. Example of how it looks: ```GDScript [gd_scene load_steps=2 format=3 uid="uid://dw86wq31afig2"] [ext_resource type="PackedScene" uid="uid://bt36ojelx8q6c" path="res://subscene.scn" id="1_t56hs"] ``` GDScript, shaders and other special resource files can't currently provide UIDs, but this should be doable with special keywords on the files. This will be reserved for future PRs.
* Expose an ImportOrder enum in ResourceImporterHugo Locurcio2021-07-231-1/+11
| | | | This avoids using magic numbers in code.
* Rename Reference to RefCountedPedro J. Estébanez2021-06-111-2/+2
|
* Use multiple threads to import.Juan Linietsky2021-04-191-0/+5
| | | | | | | | | | - For now everything imports multithreaded by default (should work I guess, let's test). - Controllable per importer Early test benchmark. 64 large textures (importing as lossless, _not_ as vram) on a mobile i7, 12 threads: Importing goes down from 46 to 7 seconds. For VRAM I will change the logic to use a compressing thread in a subsequent PR, as well as implementing Betsy.
* Improved 3D Scene ImporterJuan Linietsky2021-03-221-0/+3
| | | | | | | | | | | | * Added option for importers to show an Advanced settings dialog * Created advanced settings dialog for Scene Importer * Cleaned up importers (remove many old/unused options) * Added the ability to customize every node, material, mesh and animation individually * Saving to animations and meshes to files is now a manual process, making it more predictable * Added the ability for materials to be replaced by external files (or to be made external, up to you). * When doubleclicking an impoted scene in the filesystem dock, it automatically shows the import settings instead of asking to open it. WARNING: Lightmap UV unwrap is not working, it needs to be re-made.
* Added Import Defaults Editor in Project Settingsreduz2021-02-231-0/+1
| | | | | -Change importer defaults in project settings. -Ability to change them or reset them.
* Improve resource load cachereduz2021-02-111-1/+1
| | | | | | -Added a new method in Resource: reset_state , used for reloading the same resource from disk -Added a new cache mode "replace" in ResourceLoader, which reuses existing loaded sub-resources but resets their data from disk (or replaces them if they chaged type) -Because the correct sub-resource paths are always loaded now, this fixes bugs with subresource folding or subresource ordering when saving.
* Update copyright statements to 2021Rémi Verschelde2021-01-011-2/+2
| | | | | | | | | | | | | | Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
* Cleanup unused engine codeTomasz Chabora2020-12-091-1/+0
|
* Refactored Mesh internals and formats.reduz2020-12-021-0/+1
| | | | | | | | | | | | | | | -Changed how mesh data is organized, hoping to make it more efficient on Vulkan and GLES. -Removed compression, it now always uses the most efficient format. -Added support for custom arrays (up to 8 custom formats) -Added support for 8 weights in skeleton data. -Added a simple optional versioning system for imported assets, to reimport if binary is newer -Fixes #43979 (I needed to test) WARNING: -NOT backwards compatible with previous 4.x-devel, will most likely never be, but it will force reimport scenes due to version change. -NOT backwards compatible with 3.x scenes, this will be eventually re-added. -Skeletons not working any longer, will fix in next PR.
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-141-2/+0
| | | | | | | | | | | | | | Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
* Exposed RenderingDevice to script APIJuan Linietsky2020-04-201-1/+1
| | | | | | | | | | | | | Also added an easier way to load native GLSL shaders. Extras: Had to fix no-cache for subresources in resource loader, it was not properly working, making shaders not properly reload. Note: The precommit hooks are broken because they don't seem to support enums from one class being used in another. Feel free to fix this after merging this PR.
* Replace NULL with nullptrlupoDharkael2020-04-021-3/+3
|
* Style: Set clang-format Standard to Cpp11Rémi Verschelde2020-03-171-3/+3
| | | | | | | | | | For us, it practically only changes the fact that `A<A<int>>` is now used instead of the C++03 compatible `A<A<int> >`. Note: clang-format 10+ changed the `Standard` arguments to fully specified `c++11`, `c++14`, etc. versions, but we can't use `c++17` now if we want to preserve compatibility with clang-format 8 and 9. `Cpp11` is still supported as deprecated alias for `Latest`.
* Removed interactive loader, added proper thread loading.Juan Linietsky2020-02-281-1/+1
|
* Update copyright statements to 2020Rémi Verschelde2020-01-011-2/+2
| | | | | | | | | | | Happy new year to the wonderful Godot community! We're starting a new decade with a well-established, non-profit, free and open source game engine, and tons of further improvements in the pipeline from hundreds of contributors. Godot will keep getting better, and we're looking forward to all the games that the community will keep developing and releasing with it.
* Made use of semicolons more consitent, fixed formattingJohnJLight2019-06-191-1/+2
|
* Unexpose subclasses of ResourceFormatLoader and -SaverRémi Verschelde2019-06-181-2/+0
| | | | | | | | | | | | | | ResourceFormatLoader and ResourceFormatSaver are meant to be overridden to add support for different formats in ResourceLoader and ResourceSaver. Those should be exposed as they can be overridden in plugins. On the other hand, all predefined subclasses of those two base classes are only meant to register support for new file and resource types, but should not and cannot be used directly from script, so they should not be exposed. Also unexposed ResourceImporterOGGVorbis (and thus its base class ResourceImporter) which are editor-only.
* Style: Fix issues with clang-format 8.0Rémi Verschelde2019-05-201-1/+1
|
* Added ability for multiple images to be imported as an atlasJuan Linietsky2019-04-191-0/+5
| | | | | This adds support for groups in the import system, which point to a single file. Add property hint for saving files in file field
* Make sure ResurceLoader.exists works on imported files, fixes #23555Juan Linietsky2019-03-041-0/+1
|
* Better warnings when resources can't be saved. Fixes #26531Juan Linietsky2019-03-041-0/+1
|
* -Fix problem of order of import plugins, closes #26340Juan Linietsky2019-02-271-1/+0
| | | | -Ensure resource previewer does not start until first import is done
* Fix GCC 5 build after #26331 and cleanup styleRémi Verschelde2019-02-271-4/+6
| | | | Also cleanup after 01a3dd3.
* -Properly handle missing ETC support on exportJuan Linietsky2019-02-261-2/+15
| | | | | -Added ability for resource importers to save metadata -Added ability for resource importers to validate depending on project settings
* Core: Ensure classes match their header filenameRémi Verschelde2019-02-121-0/+113
Also drop some unused files. Renamed: - `core/dvector.h` -> `pool_vector.h` - `core/io/resource_import.h` -> `resource_importer.h` - `core/sort.h` -> `sort_array.h` - `core/string_db.h` -> `string_name.h` Dropped: - `core/allocators.h` - `core/os/shell.h` - `core/variant_construct_string.cpp`