summaryrefslogtreecommitdiffstats
path: root/scene/resources/packed_scene.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* | Rename `instance()`->`instantiate()` when it's a verbLightning_A2021-06-191-31/+31
| |
* | Remove side effects of scene savePedro J. Estébanez2021-06-191-1/+10
|/
* Fix crash when loading a scene containing an uncreatable typeDelf Neumärker2021-02-251-8/+9
|
* Merge pull request #38565 from nekomatata/export-default-valuesRémi Verschelde2021-02-211-1/+5
|\ | | | | Fixed export var default value in PackedScene when script is not loaded in editor
| * Fixed export var default value in PackedScene when script is not loaded in ↵PouleyKetchoupp2020-05-081-1/+5
| | | | | | | | editor
* | Improve resource load cachereduz2021-02-111-0/+3
| | | | | | | | | | | | -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.
* | Initialize class variables with default values in scene/ [2/2]Rafał Mikrut2021-02-091-2/+0
| |
* | 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 🎆
* | Rename empty() to is_empty()Marcel Admiraal2020-12-281-3/+3
| |
* | Cleanup unused engine codeTomasz Chabora2020-12-091-10/+0
| |
* | Reorganized core/ directory, it was too fatty alreadyreduz2020-11-071-2/+2
| | | | | | | | | | | | -Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
* | Fix typos with codespellRémi Verschelde2020-09-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using codespell 1.17.1. Method: ``` $ cat > ../godot-word-whitelist.txt << EOF ang curvelinear dof doubleclick fave findn leapyear lod merchantibility nd numer ois ony que seeked synching te uint unselect webp EOF $ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po" $ git diff // undo unwanted changes ```
* | PackedScene: Prevent crash when root node has `parent` attributeRémi Verschelde2020-06-081-0/+3
| | | | | | | | | | | | | | | | | | | | The crash happens further down when setting an invalid owner in `Node::_set_owner_nocheck` but I couldn't figure out how to fix it. But here the proper fix is to catch the invalid scene file early on and fail loading it. Part of #17372.
* | Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-141-34/+65
| | | | | | | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
* | Style: Enforce separation line between function definitionsRémi Verschelde2020-05-141-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I couldn't find a tool that enforces it, so I went the manual route: ``` find -name "thirdparty" -prune \ -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \ -o -name "*.glsl" > files perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files) misc/scripts/fix_style.sh -c ``` This adds a newline after all `}` on the first column, unless they are followed by `#` (typically `#endif`). This leads to having lots of places with two lines between function/class definitions, but clang-format then fixes it as we enforce max one line of separation. This doesn't fix potential occurrences of function definitions which are indented (e.g. for a helper class defined in a .cpp), but it's better than nothing. Also can't be made to run easily on CI/hooks so we'll have to be careful with new code. Part of #33027.
* | Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-141-112/+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.
* Replace NULL with nullptrlupoDharkael2020-04-021-31/+31
|
* Renamed 2D and 3D nodes to make their types explicitJuan Linietsky2020-03-271-3/+3
| | | | Fixes #30736.
* Style: Set clang-format Standard to Cpp11Rémi Verschelde2020-03-171-5/+5
| | | | | | | | | | 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`.
* Signals: Manually port most of remaining connect_compat usesRémi Verschelde2020-02-281-1/+1
| | | | | | | | It's tedious work... Some can't be ported as they depend on private or protected methods of different classes, which is not supported by callable_mp (even if it's a class inherited by the current one).
* Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.Juan Linietsky2020-02-251-1/+1
| | | | | | | | | | | | | | | | | | | | | - Renames PackedIntArray to PackedInt32Array. - Renames PackedFloatArray to PackedFloat32Array. - Adds PackedInt64Array and PackedFloat64Array. - Renames Variant::REAL to Variant::FLOAT for consistency. Packed arrays are for storing large amount of data and creating stuff like meshes, buffers. textures, etc. Forcing them to be 64 is a huge waste of memory. That said, many users requested the ability to have 64 bits packed arrays for their games, so this is just an optional added type. For Variant, the float datatype is always 64 bits, and exposed as `float`. We still have `real_t` which is the datatype that can change from 32 to 64 bits depending on a compile flag (not entirely working right now, but that's the idea). It affects math related datatypes and code only. Neither Variant nor PackedArray make use of real_t, which is only intended for math precision, so the term is removed from there to keep only float.
* Reworked signal connection system, added support for Callable and Signal ↵Juan Linietsky2020-02-201-7/+7
| | | | objects and made them default.
* PoolVector is gone, replaced by VectorJuan Linietsky2020-02-181-10/+10
| | | | | Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are sugar for `Vector<Type>`.
* Fixes import of models as PackedSceneHaoyu Qiu2020-01-071-2/+2
|
* Merge pull request #34020 from gytsen/unify-pack-versionRémi Verschelde2020-01-061-5/+3
|\ | | | | PCK: Set VERSION_PATCH in header, factor out header magic
| * PCK: Set VERSION_PATCH in header, factor out header magicJoost Heitbrink2020-01-061-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | Unify pack file version and magic to avoid hardcoded literals. `version.py` now always includes `patch` even for the first release in a new stable branch (e.g. 3.2). The public name stays without the patch number, but `Engine.get_version_info()` already included `patch == 0`, and we can remove some extra handling of undefined `VERSION_PATCH` this way. Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
* | Fixes crash for bad property of PackedSceneHaoyu Qiu2020-01-051-12/+14
|/
* 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.
* Don't store index of root nodesTomasz Chabora2019-12-051-0/+3
|
* Remove ERR_EXPLAIN from scene/* codeTomasz Chabora2019-08-091-10/+3
|
* Fix error macro calls not ending with semicolonRémi Verschelde2019-06-111-2/+2
| | | | | | | It's not necessary, but the vast majority of calls of error macros do have an ending semicolon, so it's best to be consistent. Most WARN_DEPRECATED calls did *not* have a semicolon, but there's no reason for them to be treated differently.
* Use approximate equallity methods in many placesAaron Franke2019-04-251-1/+1
|
* Skeletons can now choose between using local or world coords for processing, ↵Juan Linietsky2019-03-031-2/+2
| | | | fixes #26468
* Editor does not crash anymore if a non root node in escn is missing a parentIlaria Cislaghi2019-03-011-0/+2
|
* Add -Wshadow=local to warnings and fix reported issues.marxin2019-02-201-8/+8
| | | | Fixes #25316.
* Add check in folding to see if the nodepath exists to avoid message spam.K. S. Ernest (iFire) Lee2019-01-301-2/+2
|
* Update copyright statements to 2019Rémi Verschelde2019-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Use a more compatible (and certain to work) mechanism to check default value ↵Juan Linietsky2018-11-091-2/+8
| | | | on scene packing.
* -Moved EditorDefaultValue to ClassDB, made it coreJuan Linietsky2018-11-081-1/+7
| | | | -Removed one and zero hints for properties, replaced by default value
* Repaired mistyped of 'its' on several files.M. Huri2018-10-251-1/+1
|
* Make core/ includes absolute, remove subfolders from include pathRémi Verschelde2018-09-121-3/+3
| | | | | | This allows more consistency in the manner we include core headers, where previously there would be a mix of absolute, relative and include path-dependent includes.
* Make some debug prints verbose-only, remove othersRémi Verschelde2018-08-241-13/+0
|
* Ensure index is only saved when scene is inherited, or parent node is not ↵Juan Linietsky2018-08-051-1/+9
| | | | from the edited scene. Closes #17562.
* Perform a name check when loading scenes and running on editor, fixes #6152Juan Linietsky2018-07-291-1/+7
|
* Reduce unnecessary COW on Vector by make writing explicitHein-Pieter van Braam2018-07-261-16/+16
| | | | | | | | | | | | | | | | | | | | | | | This commit makes operator[] on Vector const and adds a write proxy to it. From now on writes to Vectors need to happen through the .write proxy. So for instance: Vector<int> vec; vec.push_back(10); std::cout << vec[0] << std::endl; vec.write[0] = 20; Failing to use the .write proxy will cause a compilation error. In addition COWable datatypes can now embed a CowData pointer to their data. This means that String, CharString, and VMap no longer use or derive from Vector. _ALWAYS_INLINE_ and _FORCE_INLINE_ are now equivalent for debug and non-debug builds. This is a lot faster for Vector in the editor and while running tests. The reason why this difference used to exist is because force-inlined methods used to give a bad debugging experience. After extensive testing with modern compilers this is no longer the case.
* Duplicate Arrays and Dictionaries when instancing scene in editorBojidar Marinov2018-03-131-0/+2
| | | | | | Also, add deep (=false) parameter to Array.duplicate and Dictionary.duplicate Fixes #13971
* Fix typos in code and docs with codespellRémi Verschelde2018-01-181-2/+2
| | | | Using v1.11.0 from https://github.com/lucasdemarchi/codespell
* Fixed resource setup handlingAndreaCatania2018-01-111-3/+1
|
* Add missing copyright headers and fix formattingRémi Verschelde2018-01-051-0/+1
| | | | | | Using `misc/scripts/fix_headers.py` on all Godot files. Some missing header guards were added, and the header inclusion order was fixed in the Bullet module.
* Update copyright statements to 2018Rémi Verschelde2018-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!