summaryrefslogtreecommitdiff
path: root/scene/main/scene_tree.cpp
AgeCommit message (Collapse)Author
2021-10-08Delete objects enqueued for deletion during SceneTree destructionkleonc
2021-09-30Rename Node's `filename` property to `scene_file_path` for clarityHugo Locurcio
2021-09-17Merge pull request #49819 from nekomatata/fix-process-mode-inheritRémi Verschelde
2021-09-14Merge pull request #51237 from KoBeWi/tween_fix()Rémi Verschelde
Various fixes to Tween code
2021-09-13Merge pull request #49063 from Calinou/remove-16x-msaaRémi Verschelde
Remove 16× MSAA support due to driver bugs and low performance
2021-09-06Fix process mode update when mode owner is set to InheritPouleyKetchoupp
Prevent the root node to be set to PROCESS_MODE_INHERIT, since it causes undefined behavior. Fix a case where the process owner node is wrongly set to the direct parent instead of the proper node. Add errors for all unhandled cases.
2021-08-31Add Listener2Dkobewi
2021-08-25Remove 16× MSAA support due to driver bugs and low performanceHugo Locurcio
In the `master` branch, 16× MSAA caused the entire system to freeze on NVIDIA GPUs. This is likely caused by graphics drivers not actually implementing 16× MSAA, but combining 8× MSAA with 2× SSAA instead. On top of that, modern shader complexity makes 16× MSAA very difficult to use while keeping a good framerate. 8× MSAA is hard enough to use as it is.
2021-08-23Entirely removes BIND_VMETHOD in favor of GDVIRTUALreduz
* `_gui_input`, `_input`, `_unhandled_input` and `_unhandled_key_input` are now regular C++ virutal functions. * Everything else converted to GDVIRTUAL * BIND_VMETHOD is gone, always use the new syntax from now on. Creating `_gui_input` method and using the binder to register events will no longer work, simply override the virtual function now.
2021-08-22Revert "Add Node processing and physics processing cumulative (as opposed to ↵Juan Linietsky
delta) time"
2021-08-17Add Node processing and physics processing cumulative (as opposed to delta) ↵Mohammad Khashashneh
time.
2021-08-13Disable Node3D when compiling without 3D and fix disable_3d optionAaron Franke
2021-08-12Use the Unicode multiplication symbol where relevantHugo Locurcio
2021-08-10Organize methods in Viewport and explicitly name 3D methods with 3DAaron Franke
2021-08-06Various fixes to Tween codekobewi
2021-07-26Merge pull request #50899 from akien-mga/refrefRémi Verschelde
Use Ref<T> references as iterators where relevant
2021-07-26Use Ref<T> references as iterators where relevantRémi Verschelde
And const when possible.
2021-07-26Use doubles for time everywhere in Timer/SceneTreeAaron Franke
2021-07-25Use const references where possible for List range iteratorsRémi Verschelde
2021-07-23Use C++ iterators for Lists in many situationsAaron Franke
2021-07-23Show tooltips even when paused or time_scale is 0kobewi
2021-07-20Merge pull request #50655 from JFonS/sname_optRémi Verschelde
Editor StringName and Viewport optimizations
2021-07-20Editor StringName and Viewport optimizationsJoan Fons
* Added explicit return type to the SNAME macro. * Add some extra SNAME usages. * Change some ClassDB methods to use const StringName & arguments. * Cache the Window parent in Control because it's used in is_layout_rtl(), which is called often. * Only enable internal processing for viewports that need it. * Change CanvasItem::group to be a StringName because it's only used as that.
2021-07-20Merge pull request #50206 from groud/undoredo_increase_args_countRémi Verschelde
Increase the number of arguments accepted by UndoRedo methods
2021-07-18Optimize StringName usagereduz
* Added a new macro SNAME() that constructs and caches a local stringname. * Subsequent usages use the cached version. * Since these use a global static variable, a second refcounter of static usages need to be kept for cleanup time. * Replaced all theme usages by this new macro. * Replace all signal emission usages by this new macro. * Replace all call_deferred usages by this new macro. This is part of ongoing work to optimize GUI and the editor.
2021-07-12[Net] Remove most multiplayer hooks from SceneTree.Fabio Alessandrelli
Use `multiplayer` or `get_multiplayer()` instead of `get_tree()`.
2021-07-06Increase the number of arguments accepted by UndoRedo methodsGilles Roudière
2021-06-29Merge pull request #49719 from LightningAA/rename-node-is-ancestor-ofRémi Verschelde
Rename `is_a_parent_of()` to `is_ancestor_of()`
2021-06-21Rename `is_a_parent_of()` to `is_ancestor_of()`Lightning_A
2021-06-19Rename `instance()`->`instantiate()` when it's a verbLightning_A
2021-06-20Merge pull request #41794 from KoBeWi/shiny_new_tweensRémi Verschelde
2021-06-19Complete rewrite of TweensTomasz Chabora
* Tweens were changed from Node to RefCounted. New API is inspired by DOTween. * Tweens are created and managed by SceneTree, similar to SceneTreeTimer, which makes them ultra cheap to use a lot. * Animating with Tweens is done by creating sequences of Tweeners. You create them from code and they autostart by default (fire-and-forget). * There are 4 Tweeners that cover the former Tween functionality: PropertyTweener, IntervalTweener, CallbackTweener and MethodTweener. * The methods were simplified a lot. Long argument lists are replaced with chained calls on Tweens and Tweeners. * Tweeners by default execute in sequence, so it's easy to create complex chained animations. * You can bind a Tween to a node. Tween will be removed automatically when the bound node is freed.
2021-06-17Add PROPERTY_USAGE_NONE and use itAaron Franke
2021-06-16Refactor VisibilityNotifier3Dreduz
* This is the 3D counterpart to #49632 * Implemented a bit different as 3D works using instancing After merged, both 2D and 3D classes will most likely be renamed in a separate PR to DisplayNotifier2D/3D.
2021-06-11Core: Move DirAccess and FileAccess to `core/io`Rémi Verschelde
File handling APIs are typically considered part of I/O, and we did have most `FileAccess` implementations in `core/io` already.
2021-05-20Fix typos with codespellRémi Verschelde
Using codespell 2.0.0. Method: ``` $ cat > ../godot-word-whitelist.txt << EOF ang curvelinear dof doubleclick fave findn GIRD 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 ```
2021-04-23Implement occlusion cullingjfons
Added an occlusion culling system with support for static occluder meshes. It can be enabled via `Project Settings > Rendering > Occlusion Culling > Use Occlusion Culling`. Occluders are defined via the new `Occluder3D` resource and instanced using the new `OccluderInstance3D` node. The occluders can also be automatically baked from a scene using the built-in editor plugin.
2021-04-22Call randomize() automaticallyTomasz Chabora
2021-03-20Add Root Null CheckNathan Franke
2021-02-25Remove GDScript bindings for OS.get/set_exit_code, ↵Emmanuel Leblond
SceneTree.quit(<exit_code>) should be used instead
2021-02-25Fix Godot returned status code on unexpected errorEmmanuel Leblond
2021-02-25Added option in project settings to draw Shape2D outlinesPouleyKetchoupp
Disabling collision outlines can be useful for performance when the game is running and many collision shapes are displayed.
2021-02-22Add preview Sun and Environmentreduz
* Adds both a preview sun and preview environment to the 3D editor. * They are valid as long as a DirectionalLight3D and WorldEnvironment are not in the scene. * If any is added to the scene, the respective preview is disabled. * Changed WorldEnvironment to better handle multiple node versions. * Added a function in SceneTree to get the first node in a group. * Fixed button minimum size to also consider font height if no text is there, this broke with the TextSever PR.
2021-02-20Draw an outline for 2D debug collision shapesHugo Locurcio
This makes them easier to distinguish, especially when used in a TileMap. The default color's opacity has been slightly decreased to account for the new outline.
2021-02-19Update documentation for the new ProcessModeAaron Franke
2021-02-18Refactor Process Modereduz
Implements https://github.com/godotengine/godot-proposals/issues/1835#issuecomment-727186192 * PauseMode is now ProcessMode, containing the following states: ``` PROCESS_MODE_INHERIT, // same as parent node PROCESS_MODE_NORMAL, // process only if not paused PROCESS_MODE_PAUSE_ONLY, // process only if paused PROCESS_MODE_ALWAYS, // process always PROCESS_MODE_DISABLED, // never process ``` * NOTIFICATION_PAUSED and NOTIFICATION_UNPAUSED are received effectively when the node is paused and unpaused (not any longer when pause mode is set in SceneTree). * Renamed some nodes that used ProcessMode/process_mode to specify a callback type to ProcessCallback to avoid clashes.
2021-02-18Reorganize Project Settingsreduz
-Advanced Settings toggle also hides advanced properties when disabled -Simplified Advanced Bar (errors were just plain redundant) -Reorganized rendering quality settings. -Reorganized miscelaneous settings for clean up.
2021-02-09Initialize class variables with default values in scene/ [2/2]Rafał Mikrut
2021-02-07Implement pause-aware pickingPedro J. Estébanez
This changes the way 2D & 3D physics picking behaves in relation to pause: - When pause is set, every collision object that is hovered or captured (3D only) is released from that condition, getting the relevant mouse-exit callback., unless its pause mode makes it immune from pause. - During the pause. picking only considers collision objects immune from pause, sending input events and enter/exit callbacks to them as expected. - When pause is left, nothing happens. This is a big difference with the classic behavior, which at this point would process all the input events that have been queued against the current state of the 2D/3D world (in other words, checking them against the current position of the objects instead of those at the time of the events).
2021-01-24Shadow map rendering optimizationreduz
-All shadow rendering is done with raster now (no compute) -All shadow rendering is done by rendering directly to the shadow atlas -Improved how buffer clearing is done to optimize the above. -Ability to set shadows as 16 bits.