summaryrefslogtreecommitdiff
path: root/scene/main/node.cpp
AgeCommit message (Collapse)Author
2020-09-03[Complex Test Layouts] Change `String` to use UTF-32 encoding on all platforms.bruvzg
2020-09-01Made get_child support negative indexes, with documentationSekoiaTree
2020-08-12Expose NOTIFICATION_POST_ENTER_TREETomasz Chabora
2020-07-26Merge pull request #40724 from KoBeWi/weird_condition_🤔Rémi Verschelde
Fix ultra long node names
2020-07-26Fix ultra long node namesTomasz Chabora
2020-07-24Remove multilevel callsGeorge Marques
In general they are more confusing to users because they expect inheritance to fully override parent methods. This behavior can be enabled by script writers using a simple super() call.
2020-06-30Add a separate application focus/in notification out from Window focus ↵Juan Linietsky
notification.
2020-06-09Fix signal duplication bug when duplicating node with instanced childrenMaganty Rushyendra
Change error checking in `duplicate_signals()` to check for path to `p_original`, thus adhering to the method used in `duplicate`, instead of checking for ownership.
2020-05-15Replace 'add_child_below_node' with 'add_sibling' in NodeDominik 'dreamsComeTrue' Jasiński
Fixes: #19642
2020-05-14Style: Enforce braces around if blocks and loopsRémi Verschelde
Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2020-05-14Style: Enforce separation line between function definitionsRémi Verschelde
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.
2020-05-14Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde
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.
2020-05-10Style: clang-format: Disable AllowShortCaseLabelsOnASingleLineRémi Verschelde
Part of #33027.
2020-04-21Add ability to bind typed arrays to script APIJuan Linietsky
Note: Only replaced 2 instances to test, Node.get_children and TileMap.get_used_cells Note: Will do a mass replace on later PRs of whathever I can find, but probably need a tool to grep through doc. Warning: Mono will break, needs to be fixed (and so do TypeScript and NativeScript, need to ask respective maintainers)
2020-04-06Remove Node.get_position_in_parent()Tomasz Chabora
2020-04-02Replace NULL with nullptrlupoDharkael
2020-03-26Working multiple window support, including editorJuan Linietsky
2020-03-26Refactored input, goes all via windows now.Juan Linietsky
Also renamed Input to InputFilter because all it does is filter events.
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-27Improve the `Node.add_child_below_node()` documentationHugo Locurcio
This closes https://github.com/godotengine/godot-docs/issues/2730.
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-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-13Remove more deprecated methods and codeRémi Verschelde
2020-02-12Optmized data sent during RPC and RSet calls.Andrea Catania
- Now is sent the method ID rather the full function name. - The passed IDs (Node and Method) are compressed so to use less possible space. - The variant (INT and BOOL) is now encoded and compressed so to use much less data. - Optimized RPCMode retrieval for GDScript functions. - Added checksum to assert the methods are the same across peers. This work has been kindly sponsored by IMVU.
2020-02-05Remove duplicate WARN_PRINT macro.Marcel Admiraal
2020-01-07Don't show conf warning if script is not toolTomasz Chabora
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-11-21Setting the node process priority should not trigger an errorMartin Capitanio
Fixes #33749 This function can be called outside the scene tree.
2019-11-17Implement `Node::get_process_priority()` and its associated propertyHugo Locurcio
This closes #33660.
2019-10-17Expose Node::update_configuration_warning() to scriptsPouleyKetchoupp
This method can be used to generate custom node warnings by script. Node::_get_configuration_warning was already exposed to generate custom warnings, but it wasn't fully usable without being able to notify the scene tree when the warning needs to appear or change.
2019-09-25Merge pull request #32051 from qarmin/some_error_explanationRémi Verschelde
Added some obvious errors explanations
2019-09-25Added some obvious errors explanationsqarmin
2019-09-19Add new events and accompanying logic to notify when the app is paused and ↵fhuya
resumed on Android devices.
2019-08-23Add an `editor_description` property to Node for documentation purposesHugo Locurcio
It is implemented using editor-only metadata, in a way similar to edit locking or Position2D gizmo extents. This closes #2082.
2019-08-17Improve the scene tree signals/groups tooltipHugo Locurcio
The tooltip now displays the number of connections and groups that are assigned to the hovered node.
2019-08-09Remove ERR_EXPLAIN from scene/* codeTomasz Chabora
2019-08-08Merge pull request #31185 from mitchcurtis/get_pathRémi Verschelde
Improve error message in Node::get_path()
2019-08-08Merge pull request #31182 from mitchcurtis/remove_childRémi Verschelde
Improve error message in Node::remove_child()
2019-08-08Improve error message in Node::remove_child()Mitch Curtis
2019-08-07Improve error message in Node::get_path()Mitch Curtis
2019-08-07Merge pull request #31122 from Muller-Castro/enhancementRémi Verschelde
Unnecessary reassignments
2019-08-07Add some code changes/fixes proposed by Coverity and Clang Tidyqarmin
2019-08-06Removed unnecessary reassignsMuller-Castro
Those assignments are duplicated since add_to_group() or remove_from_group() aren't changing the state of those members.
2019-07-20Changed some code showed in LGTM and Coverageqarmin
2019-07-11Merge pull request #30498 from bojidar-bg/30495-cannot-insert-keyRémi Verschelde
Fix inability to insert keys via Insert Key context menu
2019-07-10Fix inability to insert keys via Insert Key context menuBojidar Marinov
Fixes #30495
2019-07-10Use reference to constant in functionsqarmin
2019-07-01Merge pull request #29980 from Dentrax/directed-by-qarminRémi Verschelde
Fix some editor crashes