summaryrefslogtreecommitdiff
path: root/scene/main/scene_tree.cpp
AgeCommit message (Collapse)Author
2020-03-17Style: Set clang-format Standard to Cpp11Rémi Verschelde
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`.
2020-03-08Refactor ScriptDebugger.Fabio Alessandrelli
EngineDebugger is the new interface to access the debugger. It tries to be as agnostic as possible on the data that various subsystems can expose. It allows 2 types of interactions: - Profilers: A subsystem can register a profiler, assigning it a unique name. That name can be used to activate the profiler or add data to it. The registered profiler can be composed of up to 3 functions: - Toggle: called when the profiler is activated/deactivated. - Add: called whenever data is added to the debugger (via `EngineDebugger::profiler_add_frame_data`) - Tick: called every frame (during idle), receives frame times. - Captures: (Only relevant in remote debugger for now) A subsystem can register a capture, assigning it a unique name. When receiving a message, the remote debugger will check if it starts with `[prefix]:` and call the associated capture with name `prefix`. Port MultiplayerAPI, Servers, Scripts, Visual, Performance to the new profiler system. Port SceneDebugger and RemoteDebugger to the new capture system. The LocalDebugger also uses the new profiler system for scripts profiling.
2020-03-01Merge pull request #18020 from bruvzg/input_fix_non_latin_and_add_hw_scancodesRémi Verschelde
Fix non-latin layout scancodes on Linux, adds access to physical scancodes.
2020-02-28Signals: Manually port most of remaining connect_compat usesRémi Verschelde
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).
2020-02-28Signals: Port connect calls to use callable_mpRémi Verschelde
Remove now unnecessary bindings of signal callbacks in the public API. There might be some false positives that need rebinding if they were meant to be public. No regular expressions were harmed in the making of this commit. (Nah, just kidding.)
2020-02-25Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.Juan Linietsky
- 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.
2020-02-25Rename `scancode` to `keycode`.bruvzg
Add `physical_keycode` (keyboard layout independent keycodes) to InputEventKey and InputMap. Fix non-latin keyboard layout keycodes on Linux/X11 (fallback to physical keycodes).
2020-02-21Added StringName as a variant type.Juan Linietsky
Also changed all relevant properties defined manually to StringName.
2020-02-21Huge Debugger/EditorDebugger refactor.Fabio Alessandrelli
2020-02-20Reworked signal connection system, added support for Callable and Signal ↵Juan Linietsky
objects and made them default.
2020-02-18Fix compilation warnings and re-enable werror=yes on TravisRémi Verschelde
Fix -Wunused-variable, -Wunused-but-set-variable and -Wswitch warnings raised by GCC 8 and 9. Fix -Wunused-function, -Wunused-private-field and -Wtautological-constant-out-of-range-compare raised by Clang. Fix MSVC 2019 warning C4804 (unsafe use of type 'bool' in comparison operation). GCC -Wcpp warnings/Clang -W#warnings (`#warning`) are no longer raising errors and will thus not abort compilation with `werror=yes`. Treat glslang headers are system headers to avoid raising warnings. Re-enables us to build with `werror=yes` on Linux and macOS, thus catching warnings that would be introduced by new code. Fixes #36132.
2020-02-18PoolVector is gone, replaced by VectorJuan Linietsky
Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are sugar for `Vector<Type>`.
2020-02-11Modernized default 3D material, fixes material bugs.Juan Linietsky
2020-02-11Rewrote large part of rendering, omni and spot shadows now work.Juan Linietsky
2020-02-11Base 3D engine done, still untested, though.Juan Linietsky
2020-02-10- Integrated NavigationServer and Navigation2DServer.Andrea Catania
- Added Navigation Agents and Obstacles. - Integrated Collision Avoidance. This work has been kindly sponsored by IMVU.
2020-02-05Remove duplicate ERR_PRINT macro.Marcel Admiraal
2020-01-19SceneTree: Abort change_scene if we're quittingRémi Verschelde
Otherwise we can have a segmentation fault if we try to call `add_child` on an already freed node. Fixes #35323.
2020-01-17Fix crash when confirming dialogs with Return keyRémi Verschelde
Regression from #34040, apparently making this a const reference introduces issues (not sure why, but previous code worked fine). Fixes #34691. Co-authored-by: dankan1890 <mewuidev2@gmail.com>
2020-01-03Add a shorthand for setting the exit code using `SceneTree::quit()`Hugo Locurcio
This reduces the amount of code required to exit a process with a non-zero exit code. This pattern is also found in most other programming languages.
2020-01-01Update copyright statements to 2020Rémi Verschelde
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.
2019-12-10Removed unused variables, add some constants numbersRafał Mikrut
2019-11-16Rename External MSAA to AndroidVR MSAAHolger Dammertz
A new external MSAA setting was introduced in https://github.com/godotengine/godot/pull/33518 that fixed issues on GLES2 and Oculus Mobile VR. To avoid misunderstanding it was suggested by @BastiaanOlij and discussed on discord to rename it to AndroidVR.
2019-11-11Add special external MSAA modes for GLES2 Rift S/Quest and OpenXR optimisationBastiaan Olij
2019-10-23Implement game camera overrideErik
Implemented uniform API in Viewport class to override 2D and/or 3D camera. Added buttons in 2D and 3D editor viewport toolbars that override the running game camera transform with the editor viewport camera transform. Implemented via remote debugger protocol and camera override API. Removed LiveEditFuncs function pointers from ScriptDebugger class. Since the debugger got access to the SceneTree instance (if one exists), there is no need to store the function pointers. The live edit functions in SceneTree are used directly instead. Also removed the static version of live edit functions in SceneTree for the same reason. This reduced the SceneTree -> Debugger coupling too since the function pointers don't need to be set from SceneTree anymore. Moved script_debugger_remote.h/cpp from 'core/' to 'scene/debugger/'. This is because the remote debugger is now using SceneTree directly and 'core/' classes should not depend on 'scene/' classes.
2019-10-19Fixed leak on exit when using yield with SceneTreeTimerPouleyKetchoupp
Use case: yield(get_tree().create_timer(2), "timeout") Some resources were never released because the SceneTreeTimer was keeping a reference to GDScriptFunctionState in its signal connections, while GDScriptFunctionState was holding a reference to the SceneTreeTimer object. Cleaning all signal connections on game exit fixes the issue. Fixes #29946
2019-10-14Small fixes to redundand code, copy paste bugsqarmin
2019-10-01Merge pull request #30919 from nekomatata/timer-update-transform-fixRémi Verschelde
Fix GPU particle transform delay when created on SceneTree timer timeout
2019-09-19Add new events and accompanying logic to notify when the app is paused and ↵fhuya
resumed on Android devices.
2019-09-05Merge pull request #31870 from JFonS/add_network_profilerFabio Alessandrelli
Add network profiler
2019-09-05Add network profilerjfons
2019-09-02Add autocomplete support for change_scene()Tomasz Chabora
2019-08-26[macOS] Add methods to modify global and dock menus. Add ability to open ↵bruvzg
multiple editor/project manager instances, recent/favourite project list to project manager dock menu and opened scene list to editor dock menu.
2019-08-09Remove ERR_EXPLAIN from scene/* codeTomasz Chabora
2019-08-05Remove Editor dependency from SceneTreemerumelu
2019-07-29Update transforms after timers update to make sure changes are made before ↵PouleyKetchoupp
render Fixes #29952
2019-07-23Fix some code found by Coverity Scan and PVS Studioqarmin
2019-07-19Merge pull request #23270 from silvanocerza/remote_scene_tree_filterRémi Verschelde
Implemented remote scene tree filtering
2019-07-10Use reference to constant in functionsqarmin
2019-07-02Fix various memory leaks and errorsBojidar Marinov
2019-06-27Add default values to the editor help, docs, and generated RSTBojidar Marinov
Also, make spacing of "=" in the editor help a bit more consistent. Closes #16086
2019-06-11Fix error macro calls not ending with semicolonRémi Verschelde
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.
2019-05-27Implemented remote scene tree filteringSilvano Cerza
User can now filter the remote scene tree, like the local one is filtered, while the game is running
2019-05-24Fixed scene tree update after changing node name in tool scriptPouleyKetchoupp
2019-04-30Merge pull request #27869 from jean-dao/scenetree_call_groupRémi Verschelde
Fix: use function in SceneTree::call_group
2019-04-25Use approximate equallity methods in many placesAaron Franke
2019-04-09Fix: use function in SceneTree::call_groupJean Dao
When calling call_group from C++, the function name is not passed on to call_group_flags, resulting in first argument being mistakenly used instead of function.
2019-04-04Clean up notifications and merge Node and MainLoop ones for clarity, closes ↵Juan Linietsky
#27614
2019-01-31Fix a font oversampling warning being printed when it shouldn'tHugo Locurcio
2019-01-26Warn of invalid pointer when converting object to RID, closes #19023Juan Linietsky