summaryrefslogtreecommitdiffstats
path: root/scene/2d/node_2d.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright statements to 2021Rémi Verschelde2021-01-011-2/+2
| | | | | | | | | | | | | | 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 🎆
* Move initialization of some classes to headersTomasz Chabora2020-12-111-9/+0
|
* Reorganized core/ directory, it was too fatty alreadyreduz2020-11-071-1/+1
| | | | | | -Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-141-24/+46
| | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
* Style: Enforce separation line between function definitionsRémi Verschelde2020-05-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | 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.
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-141-41/+0
| | | | | | | | | | | | | | 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.
* Implement Skew in Node2DJuan Linietsky2020-05-011-2/+40
| | | | Skew is x-axis only, because it must be bidirectionally convertible to a 2x3 matrix, but you can subtract it to the rotation to get the effect on y-axis
* Renaming of servers for coherency.Juan Linietsky2020-03-271-8/+8
| | | | | | | | | | VisualServer -> RenderingServer PhysicsServer -> PhysicsServer3D Physics2DServer -> PhysicsServer2D NavigationServer -> NavigationServer3D Navigation2DServer -> NavigationServer2D Also renamed corresponding files.
* Added a Window node, and made it the scene root.Juan Linietsky2020-03-261-1/+1
| | | | Still a lot of work to do.
* Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.Juan Linietsky2020-02-251-4/+4
| | | | | | | | | | | | | | | | | | | | | - 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.
* Control/Light2D: Preventing setting 0 as scale as for Node2DRémi Verschelde2020-01-131-0/+1
| | | | | | | Triggers errors in `Transform2D::affine_invert()`. Fixes #26510. Fixes https://github.com/godotengine/godot/issues/24997#issuecomment-457951639.
* Don't compile editor-only function when tools=noGilles Roudière2020-01-091-0/+3
|
* Update copyright statements to 2020Rémi Verschelde2020-01-011-2/+2
| | | | | | | | | | | 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.
* Altered rotation_degrees rangeSoumya Lahiri2019-09-301-1/+1
|
* Fix look_at with non uniform scalingPaul Trojahn2019-02-081-1/+1
| | | | | The angle function doesn't consider the scaling of the local coordinates, so it needs to be removed first. Fixes #23247
* Update copyright statements to 2019Rémi Verschelde2019-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* -Moved EditorDefaultValue to ClassDB, made it coreJuan Linietsky2018-11-081-6/+6
| | | | -Removed one and zero hints for properties, replaced by default value
* Fixing warnings generated by MSVCDualtagh Murray2018-10-191-6/+0
| | | | Fixes #22684.
* Make core/ includes absolute, remove subfolders from include pathRémi Verschelde2018-09-121-1/+1
| | | | | | This allows more consistency in the manner we include core headers, where previously there would be a mix of absolute, relative and include path-dependent includes.
* Lift 1440 limit in rotation_degrees hint rangeRémi Verschelde2018-08-161-1/+1
| | | | Fixes #15947.
* Further fixes to KinematicBody2D API, support for sync motion in moving objectsJuan Linietsky2018-07-171-1/+0
|
* Fix Node2D::global_scale's PropertyInfo typeRémi Verschelde2018-05-011-1/+1
| | | | Was missed in #18391.
* Fix Node2D::global_position to have Vector2 typeRuslan Mustakov2018-04-241-1/+1
|
* Remove the selection rect for nodes that do not require itGilles Roudiere2018-04-031-23/+27
|
* 2D editor GUI input rework. Changes are:Gilles Roudiere2018-02-161-4/+5
| | | | | | | | | | - The input handling is done into several distinct functions, and the code is more consistent. - The actions' history is more precise ("Edited CanvasItem" is now "Rotated CanvasItem","Moved CanvasItem",etc...) - Fixed a little bug about input key events not forwarded correctly to plugins - IK is followed by default when you move a bone node, the alt-key allow you to move it normally
* Add missing copyright headers and fix formattingRémi Verschelde2018-01-051-0/+1
| | | | | | Using `misc/scripts/fix_headers.py` on all Godot files. Some missing header guards were added, and the header inclusion order was fixed in the Bullet module.
* Merge pull request #15191 from Jerome67000/z_renamingRémi Verschelde2018-01-041-11/+11
|\ | | | | renames "z" Node2D property to "z_index"
| * #15078 renamed "z" -> "z_index" property in Node2DJerome670002018-01-031-11/+11
| |
* | Update copyright statements to 2018Rémi Verschelde2018-01-011-2/+2
|/ | | | Happy new year to the wonderful Godot community!
* Fixes a double class registering errorGilles Roudiere2017-11-201-2/+0
|
* Rework the canvas_item API for further improves to the canvas item editorGilles Roudiere2017-11-191-39/+33
|
* Unify degree members and propertiesletheed2017-11-101-13/+13
|
* Remove deprecated rotation methodsletheed2017-11-101-18/+2
|
* Rename pos to position in user facing methods and variablesletheed2017-09-201-2/+2
| | | | | | | | | | | Rename user facing methods and variables as well as the corresponding C++ methods according to the folloming changes: * pos -> position * rot -> rotation * loc -> location C++ variables are left as is.
* Use HTTPS URL for Godot's website in the headersRémi Verschelde2017-08-271-1/+1
|
* Convert Object::cast_to() to the static versionHein-Pieter van Braam2017-08-241-1/+1
| | | | | | | | | | | | Currently we rely on some undefined behavior when Object->cast_to() gets called with a Null pointer. This used to work fine with GCC < 6 but newer versions of GCC remove all codepaths in which the this pointer is Null. However, the non-static cast_to() was supposed to be null safe. This patch makes cast_to() Null safe and removes the now redundant Null checks where they existed. It is explained in this article: https://www.viva64.com/en/b/0226/
* Removes type information from method bindsIgnacio Etcheverry2017-08-101-1/+1
|
* Merge pull request #10116 from neikeq/prop_method_ambiguitiesJuan Linietsky2017-08-051-2/+2
|\ | | | | Renames properties and methods to avoid ambiguities
| * Renames properties and methods to avoid ambiguitiesIgnacio Etcheverry2017-08-051-2/+2
| | | | | | | | | | - Method Node2D.scale(Vector2) renamed to Node2D.apply_scale(Vector2) - Property BaseButton.is_pressed renamed to BaseButton.pressed
* | Merge pull request #9791 from bojidar-bg/6087-add-global-local-convRémi Verschelde2017-07-241-0/+13
|\ \ | | | | | | Add .to_local/.to_global methods on Node2D and Spatial
| * | Add .to_local/.to_global methods on Node2D and SpatialBojidar Marinov2017-07-231-0/+13
| |/ | | | | | | | | Those are just helpers around get_global_transform().affine_inverse().xform() and get_global_transform().xform(). Closes #6087
* / Add object type hint for docsPoommetee Ketson2017-07-231-1/+1
|/
* Add object type hint for docsPoommetee Ketson2017-07-191-1/+1
|
* Fixed set_global_scale in Node2D.TwistedTwigleg2017-07-031-1/+1
|
* renamed all Rect2.pos to Rect2.positionalexholly2017-06-041-3/+3
|
* Add "Godot Engine contributors" copyright lineRémi Verschelde2017-04-081-0/+1
|
* Fixed Node2D/Control not updating propertiesRobert Hernandez2017-04-011-9/+13
|
* A Whole New World (clang-format edition)Rémi Verschelde2017-03-051-161/+128
| | | | | | | | | | | | | | | | | | | | | | | | I can show you the code Pretty, with proper whitespace Tell me, coder, now when did You last write readable code? I can open your eyes Make you see your bad indent Force you to respect the style The core devs agreed upon A whole new world A new fantastic code format A de facto standard With some sugar Enforced with clang-format A whole new world A dazzling style we all dreamed of And when we read it through It's crystal clear That now we're in a whole new world of code
* Rename the _MD macro to D_METHODHein-Pieter van Braam2017-02-131-44/+44
| | | | | | This new name also makes its purpose a little clearer This is a step towards fixing #56
* Remove use of _SCS from ADD_METHODHein-Pieter van Braam2017-02-131-13/+13
| | | | This saves typing and is a step towards fixing #56