summaryrefslogtreecommitdiff
path: root/scene/main/node.h
AgeCommit message (Collapse)Author
2021-06-30Merge pull request #49834 from nekomatata/physics-disable-modesRémi Verschelde
Add support for controlling physics nodes' behavior when disabled
2021-06-30Add support for controlling physics nodes' behavior when disabledPouleyKetchoupp
New property disable_mode to set different behaviors: Remove: remove from physics simulation MakeStatic: change body mode to static (doesn't affect area and soft body) KeepActive: do nothing Extra change: Handle disable/enable node state with specific notifications, in order to differentiate global pause from disabled nodes.
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-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-07Merge pull request #49221 from Faless/mp/4.x_rpc_refactorRémi Verschelde
[Net] Refactor RPCs, remove RSETs
2021-06-05New and improved IK system for Skeleton2DTwistedTwigleg
This PR and commit adds a new IK system for 2D with the Skeleton2D node that adds several new IK solvers, a way to control bones in a Skeleton2D node similar to that in Skeleton3D. It also adds additional changes and functionality. This work was sponsored by GSoC 2020 and TwistedTwigleg. Full list of changes: * Adds a SkeletonModifier2D resource * This resource is the base where all IK code is written and executed * Has a function for clamping angles, since it is so commonly used * Modifiers are unique when duplicated so it works with instancing * Adds a SkeletonModifierStack2D resource * This resource manages a series of SkeletonModification2Ds * This is what the Skeleton2D directly interfaces with to make IK possible * Adds SkeletonModifier2D resources for LookAt, CCDIK, FABRIK, Jiggle, and TwoBoneIK * Each modification is in its own file * There is also a SkeletonModifier2D resource that acts as a stack for using multiple stacks together * Adds a PhysicalBone2D node * Works similar to the PhysicalBone3D node, but uses a RigidBody2D node * Changes to Skeleton2D listed below: * Skeleton2D now holds a single SkeletonModificationStack2D for IK * Skeleton2D now has a local_pose_override, which overrides the Bone2D position similar to how the overrides work in Skeleton3D * Changes to Bone2D listed below: * The default_length property has been changed to length. Length is the length of the bone to its child bone node * New bone_angle property, which is the angle the bone has to its first child bone node * Bone2D caches its transform when not modified by IK for IK interpolation purposes * Bone2D draws its own editor gizmo, though this is stated to change in the future * Changes to CanvasItemEditor listed below: * Bone2D gizmo drawing code removed * The 2D IK code is removed. Now Bone2D is the only bone system for 2D * Transform2D now has a looking_at function for rotating to face a position * Two new node notifications: NOTIFICATION_EDITOR_PRE_SAVE and NOTIFICATION_EDITOR_POST_SAVE * These notifications only are called in the editor right before and after saving a scene * Needed for not saving the IK position when executing IK in the editor * Documentation for all the changes listed above.
2021-06-01[Net] Refactor RPCs, remove RSETsFabio Alessandrelli
In this PR: - Removed rset - rpc_config can now optionally configure transfer mode (reliable/unreliable/ordered) and channel (channels are not actually implemented yet.) - Refactor how the RPC id is computed to minimize the logic in Node and scripts that now only needs a single `get_rpc_methods` function.
2021-04-11Use Array for node configuration warningsNathan Franke
Previously, the warnings were passed as a string and delimitation of which were hard coded at each implementation.
2021-03-09Merge pull request #45545 from abaire/relaxes_gltf_name_sanitizationRémi Verschelde
Relaxes node name sanitization in gltf documents.
2021-02-28SceneTreeDock: Changed "Save Branch as Scene" to make use of ↵Oliver Dick
Node::duplicate_from_editor, which is also used by "Duplicate" function of the SceneTreeDock - Removed Node::duplicate_and_reown method as it is not used anymore
2021-02-24Relaxes Node naming constraints in glTF documents to match the Editor.abaire
2021-02-21Prevent selecting hidden nodes in 3D and Canvas Item editorshilfazer
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-12Merge pull request #34892 from KoBeWi/copy-pasta_v7Rémi Verschelde
Yet another node copy-paste PR
2021-02-12Duplicate resources pasted to other sceneskobewi
2021-02-09Initialize class variables with default values in scene/ [2/2]Rafał Mikrut
2021-01-17Change how editable children data is storedkobewi
Co-authored-by: hilfazer <az13337@gmail.com>
2021-01-01Update copyright statements to 2021Rémi Verschelde
Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
2020-12-22Rename MainLoop methods to match Node methodsMarcel Admiraal
2020-12-11Move initialization of some classes to headersTomasz Chabora
2020-12-09Static analyzer fixes:bruvzg
Removes unused code in OS. Fixes return types. Fixes few typos.
2020-11-26[Complex Text Layouts] Refactor Font class, default themes and controls to ↵bruvzg
use Text Server interface. Implement interface mirroring. Add TextLine and TextParagraph classes. Handle UTF-16 input on macOS and Windows.
2020-11-16Remove empty lines around braces with the formatting scriptAaron Franke
2020-11-07Reorganized core/ directory, it was too fatty alreadyreduz
-Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
2020-10-18Refactor MethodBind to use variadic templatesreduz
Removed make_binders and the old style generated binders.
2020-07-10Add override keywords.Marcel Admiraal
2020-06-30Add a separate application focus/in notification out from Window focus ↵Juan Linietsky
notification.
2020-05-15Replace 'add_child_below_node' with 'add_sibling' in NodeDominik 'dreamsComeTrue' Jasiński
Fixes: #19642
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-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-26Add macOS DisplayServer implementation.bruvzg
Change global menu to use Callable, add support for check items and submenus.
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-20Reworked signal connection system, added support for Callable and Signal ↵Juan Linietsky
objects and made them default.
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-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-17Implement `Node::get_process_priority()` and its associated propertyHugo Locurcio
This closes #33660.
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-07-10Use reference to constant in functionsqarmin
2019-04-17Add a monitor for the orphan nodesDaw11
- Allow the user to keep track of the nodes that might leak - Possible fix for #27103
2019-04-04Clean up notifications and merge Node and MainLoop ones for clarity, closes ↵Juan Linietsky
#27614
2019-01-30Add check in folding to see if the nodepath exists to avoid message spam.K. S. Ernest (iFire) Lee
2019-01-10Rewrote rename logic to be less buggy and more efficient, fixes #23803 and ↵Juan Linietsky
probably many recent bugs using GraphEdit
2019-01-01Update copyright statements to 2019Rémi Verschelde
Happy new year to the wonderful Godot community!
2018-10-29Moved folding outside the resource files, now saved outside the project.Juan Linietsky