Commit Graph

295 Commits

Author SHA1 Message Date
0b30d77384 Physics Interpolation - refactor Camera and fix get_camera_transform()
* Moves 3D Camera interpolation scene side.
* Automatically switches `get_camera_transform()` to report interpolated transform during `_process()`.
* Fixes `ClippedCamera` to work with physics interpolation.
2024-06-09 12:08:27 +01:00
b045a7c92e Always look for unique node names in owner if not found in owned nodes
(cherry picked from commit 95ced4bbdc)
2024-05-01 12:04:27 +02:00
a73715cf55 Merge pull request #58577 from pfertyk/issue_58543_audio_not_paused
[3.x] Fix AudioStreamPlayer not paused on pause mode change
2024-04-20 09:18:46 +01:00
d56d1ff4d2 Deprecate NOTIFICATION_MOVED_IN_PARENT
* NOTIFICATION_MOVED_IN_PARENT makes node children management very inefficient.
* Replaced by a NOTIFICATION_CHILD_ORDER_CHANGED (and children_changed signal).
* Most of the previous tasks carried out by NOTIFICATION_MOVED_IN_PARENT are now done not more than a single time per frame.

This PR breaks compatibility (although this notification was very rarely used, even within the engine), but provides an alternate way to do the same.
2024-04-20 07:52:05 +01:00
fe65682937 Add Node.is_node_ready 2024-04-08 17:44:23 +08:00
90cf873979 Fix AudioStreamPlayer not paused on pause mode change
Fixes #58543.
2024-04-05 14:20:44 +02:00
8b79135538 Add MergeGroup node to simplify merging Meshes at runtime 2024-01-31 08:28:51 +00:00
4e741ec2ba Merge pull request #64493 from Mickeon/3.x-editor-group
[3.x] Add Node editor description group
2024-01-29 23:27:07 +01:00
3e19cf834a CPUParticles2D - Add ability to follow physics interpolated target
Allows a non-interpolated particle system to closely follow an interpolated target without tracking ahead of the target, by performing fixed timestep interpolation on the particle system global transform, and using this for emission.
2023-09-18 16:05:03 +01:00
b777a9e5f9 Canvas item hierarchical culling
Adds optional hierarchical culling to the 2D rendering (within VisualServer).

Each canvas item maintains a bound in local space of the item itself and all child / grandchild items. This allows branches to be culled at once when they don't intersect a viewport.
2023-04-25 20:17:33 +01:00
1426cd3b3a One Copyright Update to rule them all
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".

Backported from #70885.
2023-01-10 15:26:54 +01:00
099e90e00d Make Node editable_instance methods available to GDScript
(cherry picked from commit 7eb6ae2798)
2022-12-01 10:15:06 +08:00
3b869e8027 Fix crash of queue_free() when main loop is not SceneTree
(cherry picked from commit 3b08d0e852)
2022-11-30 15:44:49 +01:00
80b50e59d5 Merge pull request #67612 from timothyqiu/who-ami-i-3.x
[3.x] Fix get_path() error when calling get_node()
2022-10-31 12:25:12 +01:00
5d6dc206bc Fix get_path() error when calling get_node() 2022-10-19 13:05:41 +08:00
6102f3cfc2 [3.x] Rename set_indexed & get_child's params to be clearer
3.x backport of #67300 and #64463.
2022-10-12 20:55:41 +02:00
17f42e8e66 Improve signal already connected error message
The signal already connected message is improved to provide the names of the objects involved.
2022-09-21 07:52:30 +01:00
ec368b40d8 [3.x] Add Editor Description group
Backport from 4.0
2022-08-16 13:51:09 +02:00
25c87e99cf Merge pull request #61578 from YuriSizov/core-fix-events-for-moved-nodes-3.x 2022-08-05 19:33:25 +02:00
995281ca90 Fix editor-only visibility for lights
* Update visibility again for editor-only lights if owner changes.

Fixes #26399, supersedes #52327

(cherry picked from commit d69e3791bf)
2022-07-03 03:21:51 +02:00
fe21fb175c print_stray_nodes() also prints node's script 2022-07-03 01:00:58 +02:00
0cb897421a Node: Rename child_exited_tree to child_exiting_tree
The name was confusing as this signal is emitted around the same time as
`tree_exiting` and `NOTIFICATION_EXIT_TREE`, i.e. while the child node is
still in tree.

Fixes #59210.

(cherry picked from commit 3e6de687b8)
2022-06-20 15:00:09 +02:00
6d53c60bf7 Mark node groups as dirty for every children if parent is moved 2022-05-31 21:23:16 +03:00
328866ee6a Physics Interpolation - Reset on adding child to SceneTree
For convenience, branches added to the SceneTree now have physics interpolation reset after the first update of the transform to the VisualServer.
2022-05-10 11:09:20 +01:00
0ab077fcef Physics Interpolation - add interpolation mode property to node
Exposes the "interpolated" flag on nodes via a property, physics_interpolation_mode.

Mode can be INHERIT, OFF and ON. This makes it easy to turn off interpolation for nodes in the editor, versus via code.
2022-05-07 13:51:49 +01:00
6ee64331db Merge pull request #60527 from KoBeWi/unique_names_demastered 2022-05-02 10:48:27 +02:00
153dc4d57e Backport the new Tween system as SceneTreeTween
Co-authored-by: Tomasz Chabora <kobewi4e@gmail.com>
2022-04-29 20:01:12 +08:00
d088128b43 Remove duplicate editor settings definitions 2022-04-27 15:26:46 +08:00
e1c74ae83f Implement Scene Unique Nodes 2022-04-26 13:55:48 +02:00
0b650b3e41 Clear owners when pruning even out of the tree 2022-03-12 12:48:15 +01:00
522bce1159 Fixed Timestep Interpolation (3D)
Adds fixed timestep interpolation to the visual server.
Switchable on and off with project setting.

This version does not add new API for set_transform etc, when nodes have the interpolated flag set they will always use interpolation.
2022-02-16 09:41:23 +00:00
e4e3f7d157 Add a signal to notify when children nodes enter or exit tree
-Allows more fine grained notifications (hence better performance) than using the global scene tree signals (node added and removed).
-Required for #55950

(cherry picked from commit fbd9599b04)
2022-02-11 09:50:58 +01:00
d3473b2a95 Rework Node::get_node to omit is_absolute() check in best case scenario
(cherry picked from commit e2792cc71c)
2022-01-25 18:13:42 +01:00
08af6e0407 Replicate load-as-placeholder state on node duplication
(cherry picked from commit 6aecf91e4f)
2022-01-19 16:01:04 +01:00
a627cdafc5 Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-13 15:54:13 +01:00
571e05d3d3 Clear only owners that are no longer in the same tree
(cherry picked from commit 2db9397fb9)
2022-01-05 15:51:18 +01:00
b4998e7e1b Rationalize Node removals and deletions
- Regarding preservation of owner, `free()` and `remove_child()` now behave the same: owner is kept during `tree_exiting` signal and `null` during `tree_exited`.
- Superfluous code to handle cancelation of ownership is removed.
2021-12-01 14:43:36 +01:00
4dba25b3ff Add property value pinning 2021-11-08 17:42:27 +01:00
7b6b402a0c Added Node name to print() when printing Nodes.
(cherry picked from commit 3ca25ffe8a)
2021-07-20 13:05:09 +02:00
6d48b67f14 Node::add_child Check for cyclic dependency
Node Replace string addition with vformat()

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
(cherry picked from commit 81388db8a7)
2021-07-15 10:52:33 +02:00
7e03bd1671 Remove duplicate WARN_PRINTS macro 2021-06-18 12:57:59 +01:00
140350d767 Style: Enforce braces around if blocks and loops
Using clang-tidy's `readability-braces-around-statements`.
https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2021-05-05 15:02:01 +02:00
a828398655 Style: Replaces uses of 0/NULL by nullptr (C++11)
Using clang-tidy's `modernize-use-nullptr`.
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html
2021-05-04 16:30:23 +02:00
b5e1e05ef2 Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2021-05-04 14:45:16 +02:00
64a63e0861 Style: clang-format: Disable AllowShortCaseLabelsOnASingleLine 2021-05-04 14:45:15 +02:00
6e600cb3f0 Style: Set clang-format Standard to c++14 2021-05-04 14:45:15 +02:00
880b830ca8 Merge pull request #46292 from hilfazer/nested_scene_instances_duplication 2021-04-29 13:31:27 +02:00
b032067e42 Relaxes Node naming constraints in glTF documents to match the Editor. 2021-03-12 08:35:50 -08:00
84a9efcebc Prevent crash when clicking Mesh in MeshInstance when is scene root 2021-02-26 18:58:05 +01:00
2735a5498e Improve the get_node() error message to be more descriptive
- Mention the origin of the `get_node()` call.
- Mention whether the attempted path is absolute or relative.

See #46214.

(cherry picked from commit e6abdc943d)
2021-02-22 14:16:42 +01:00