Commit graph

345 commits

Author SHA1 Message Date
kobewi
22ccfc5a39 Print error on invalid call_group() calls 2024-09-20 17:20:03 +02:00
rune-scape
154049ce17 StringName Dictionary keys
also added 'is_string()' method to Variant
and refactored many String type comparisons to use it instead
2024-08-29 13:39:27 -07:00
Ricardo Buring
2f8ab4a654 Fixed Timestep Interpolation (3D)
Adds 3D fixed timestep interpolation to the rendering server.
This does not yet include support for multimeshes or particles.

Co-authored-by: lawnjelly <lawnjelly@gmail.com>
2024-07-07 22:15:23 +02:00
kobewi
413c11357d Use Core/Scene stringnames consistently 2024-05-13 23:41:07 +02:00
kobewi
0b877a9962 Expose is_part_of_edited_scene() 2024-04-26 11:49:38 +02:00
Haoyu Qiu
8d1cb7e74c Add project setting for root node auto translate mode 2024-04-16 11:02:04 +08:00
Bernat Arlandis
0a68876348 Remove some unused SceneTree properties 2024-04-13 00:56:01 +02:00
Ricardo Buring
2ed2ccc2d8 Fixed Timestep Interpolation (2D)
Adds fixed timestep interpolation to the rendering server (2D only).
Switchable on and off with a project setting (default is off).

Co-authored-by: lawnjelly <lawnjelly@gmail.com>
2024-03-23 12:28:36 +01:00
Micky
7b3e1a5bde Optimize SceneTree's change_scene_to_file autocompletion 2024-03-01 15:12:52 +01:00
Rémi Verschelde
c1377920cd
Merge pull request #86743 from Mickeon/autocompletion-optimise-object
Optimise comparisons for Object's `get_argument_options`
2024-03-01 14:56:06 +01:00
Micky
cd2032a90b Optimise Object's get_argument_options 2024-02-29 18:00:54 +01:00
Adam Scott
dcf4cf79fd
Hide snap_2d_vertices_to_pixel setting to advanced 2024-02-28 10:59:41 -05:00
Aaron Franke
c399424db9
Move 3D-only resources to their own folder 2024-02-26 05:23:04 -06:00
A Thousand Ships
f06222e487
[Physics] Fix export with 3D disabled 2024-02-22 16:23:48 +01:00
Sabs, like Sobs
3475156ae3 Expose pixel snapping settings add pixel-art notes
This small in-engine documentation change aims to make it easier to
discover ways to handle pixel art aesthetics.

- I have moved 2D pixel snapping settings out of "Advanced." This now matches other pixel-art-friendly settings for
GUI Snapping and Default Texture filtering.
- I've added notes to the project settings and Sprite/AnimatedSprite sources to hint users towards better understanding of why pixelated sprites may not work correctly and what to do about it. This should help users make informed decisions for their needs.

Context: Proper handling of pixel art in Godot is routinely frustrating for new users: I, like others, assumed that Godot would act on pixels, not subpixels, when I was working a pixel art game. I was confused when my interpolations would appear blurry, and when pixel textures would be distorted for no apparent reason (this was because of centering).
I had naively thought that setting Linear interpolation would be the single "it's a pixel art game" toggle, but that only hid the underlying issues until later. I had no idea there was a snap-to-pixel option because it was hidden in the Advanced options, since my default assumption was that a pixel art game would want no subpixels at all.

Some references for the frustration:

- https://github.com/godotengine/godot/issues/82696
- https://www.reddit.com/r/godot/comments/fah25e/best_way_to_achieve_pixel_perfect_rendering/
- https://shaggydev.com/2021/09/21/project-setup-for-pixel-art/
2024-02-17 23:40:53 +00:00
Michael Alexsander
7b42c24550
Make auto translation inheritable 2024-02-15 16:51:19 -03:00
Micky
ca2f340384 Fix missing autocompletion for inheriting classes 2024-01-03 00:13:04 +01:00
Stanislav Labzyuk
958699a0c4 Implement project-wide node groups 2023-12-19 18:07:19 +01:00
Yuri Sizov
16d1d85a56 Merge pull request #78206 from alula/node-count-in-group
Add SceneTree.get_node_count_in_group()
2023-12-14 17:38:00 +01:00
Pedro J. Estébanez
8bebabda18 Let scene replacemnent benefit from certain late pieces of frame logic 2023-11-21 18:32:49 +01:00
Rémi Verschelde
15b8185c68
Don't use TTR/RTR for ERR/WARN prints
We don't translate those, only editor strings are translated.
2023-11-12 12:00:55 +01:00
Hugo Locurcio
fcbf7011cc
Make 3D editor gizmos and debug shapes ignore fog
This makes them easier to see in their intended colors in scenes with fog.
2023-09-27 00:54:57 +02:00
A Thousand Ships
a5fe392b78 Disallow nested custom multiplayers in SceneTree
Enables clearing the custom multiplayer
2023-09-25 14:59:05 +02:00
Markus Sauermann
c4705a590b Fix Object::notification order
Previously the `p_reversed` parameter didn't influence the order
in a correct way.
Also script overridden _notification functions were not called in
the correct order.

To fix this some `notification` functions had to add a `p_reversed`
parameter.

This made it necessary to adjust cpp-bindings.

Co-authored-by: David Snopek <dsnopek@gmail.com>
2023-08-30 00:15:55 +02:00
clayjohn
57eb762bae Add option to enable HDR rendering in 2D
This is needed to allow 2D to fully make use of 3D effects (e.g. glow), and can be used to substantially improve quality of 2D rendering at the cost of performance

Additionally, the 2D rendering pipeline is done in linear space (we skip linear_to_srgb conversion in 3D tonemapping) so the entire Viewport can be kept linear.
This is necessary for proper HDR screen support in the future.
2023-08-07 11:24:03 +02:00
Yuri Sizov
e8df8c5e2c Merge pull request #78988 from RandomShaper/fix_change_scene
Reimplement scene change
2023-07-26 18:39:43 +02:00
Hendrik Brucker
7e21eb7e00 Extract and reorganize texture resource classes 2023-07-14 20:04:21 +02:00
Yuri Sizov
7ff2a93952 Merge pull request #72248 from RedwanFox/mainloop_init_order_fix
Ensure that SceneTree is initialized and finalized at correct time
2023-07-12 17:16:05 +02:00
Pedro J. Estébanez
4354cd8d41 Reimplement scene change 2023-07-04 13:29:50 +02:00
Pedro J. Estébanez
70ca659143 Fix node internal/non-internal processing order
Bonus:
Fix issues in group-processing related setters
2023-06-27 19:19:55 +02:00
Pedro J. Estébanez
fc0e37bbe0 Fix change of precedence in fixup 2023-06-26 19:20:34 +02:00
Rémi Verschelde
6b91f57042
Fixup compilation warning after #78713 2023-06-26 17:55:08 +02:00
Pedro J. Estébanez
a39b683b12 Ensure default node groups' call queue are processed 2023-06-26 16:56:10 +02:00
Nickolai Korshunov
83f065c0ef Ensure that SceneTree is initialized and finalized at correct time
SceneTree should be fully initialized before any tree operation with any node and finalized only after all nodes exited tree.
2023-06-20 23:47:02 +03:00
Raul Santos
5373b67e2a
Respect returned bool from virtual process methods in SceneTree
SceneTree overrides the virtual `process` and `physics_process` methods
that it inherits from MainLoop. These methods return a boolean that
determines if the main loop should end.
The SceneTree was ignoring the returned boolean, so scripts inheriting
from SceneTree that override these methods and return true didn't exit
the main loop. Now the boolean is checked.
2023-06-18 20:45:58 +02:00
smix8
f1d8ddd9bd Remove SceneTree debug avoidance hint
Removes SceneTree debug avoidance hint.
2023-06-16 17:18:47 +02:00
Alula
bddf24645d
Add SceneTree.get_node_count_in_group() 2023-06-14 19:19:30 +02:00
Ninni Pipping
dcd2b883eb Use NULL instead of COND checks when appropriate
Restricted to scene
2023-06-10 08:56:30 +02:00
Pedro J. Estébanez
8bbc713ebf Fix node idle process priority being ignored 2023-06-09 13:05:07 +02:00
Markus Sauermann
ce10ca6979 Create a virtual mouse move event after moving child nodes
This updates mouse cursor and mouse-over-states without the need
for additional mouse movements.
2023-05-29 22:46:19 +02:00
Rémi Verschelde
5271186f2f
Merge pull request #75901 from reduz/refactor-node-processing
Refactor Node Processing to allow Scene Multithreading
2023-05-10 12:46:44 +02:00
smix8
a6ac305f96 Rework Navigation Avoidance
Rework Navigation Avoidance.
2023-05-10 05:01:58 +02:00
Juan Linietsky
98c655ec8d Refactor Node Processing
* Node processing works on the concept of process groups.
* A node group can be inherited, run on main thread, or a sub-thread.
* Groups can be ordered.
* Process priority is now present for physics.

This is the first steps towards implementing https://github.com/godotengine/godot-proposals/issues/6424.
No threading or thread guards exist yet in most of the scene code other than Node. That will have to be added later.
2023-05-09 19:17:51 +02:00
Chris Hutchinson
97712b3f50 Clamp minimum value of time_left to 0.0 2023-04-17 16:49:04 +02:00
Rémi Verschelde
347a8e20ae
Merge pull request #69324 from RedMser/advanced-settings-errors
Make it easier to solve warnings/errors referring to project settings
2023-04-11 19:39:53 +02:00
smix8
4b0dee080e Keep NavigationServer active while SceneTree is paused
Keep NavigationServer active while SceneTree is paused.
2023-04-10 15:30:22 +02:00
RedMser
ed960453b7 Make solving project setting errors easier
Show full project setting path in error messages.
Force filtering for advanced settings if filter is not empty.
2023-03-27 08:10:35 +02:00
kobewi
55b50703d7 Prevent off-screen controls in editor 2023-02-20 20:25:39 +01:00
Rémi Verschelde
55bf948fe7
Fix change_scene memory leak due to duplicate instantiation
Regression from #71105.
Fixes #71363.
2023-01-15 14:05:15 +01:00
Rémi Verschelde
baae87e307
Merge pull request #71105 from reduz/unload-current-scene
Add SceneTree.unload_current_scene()
2023-01-11 09:46:33 +01:00