Commit graph

60 commits

Author SHA1 Message Date
Paul Trojahn 163cdb8954 Fix look_at with non uniform scaling
The angle function doesn't consider the scaling of the local coordinates,
so it needs to be removed first. Fixes #23247
2019-02-08 18:00:54 +01:00
Rémi Verschelde b16c309f82 Update copyright statements to 2019
Happy new year to the wonderful Godot community!
2019-01-01 12:58:10 +01:00
Juan Linietsky f2e54057ae -Moved EditorDefaultValue to ClassDB, made it core
-Removed one and zero hints for properties, replaced by default value
2018-11-08 11:30:59 -03:00
Dualtagh Murray b902a2f2a7 Fixing warnings generated by MSVC
Fixes #22684.
2018-10-19 11:45:24 +02:00
Rémi Verschelde 277b24dfb7 Make core/ includes absolute, remove subfolders from include path
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.
2018-09-12 09:52:22 +02:00
Rémi Verschelde 968886768b Lift 1440 limit in rotation_degrees hint range
Fixes #15947.
2018-08-16 14:36:38 +02:00
Juan Linietsky 13a801430b Further fixes to KinematicBody2D API, support for sync motion in moving objects 2018-07-17 08:58:04 -03:00
Rémi Verschelde 8852ca1455 Fix Node2D::global_scale's PropertyInfo type
Was missed in #18391.
2018-05-01 10:46:08 +02:00
Ruslan Mustakov 8619b0d280 Fix Node2D::global_position to have Vector2 type 2018-04-24 10:50:05 +07:00
Gilles Roudiere 72ed1e4244 Remove the selection rect for nodes that do not require it 2018-04-03 22:04:19 +02:00
Gilles Roudiere 8dad41e395 2D editor GUI input rework. Changes are:
- 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
2018-02-16 10:14:52 +01:00
Rémi Verschelde e4213e66b2 Add missing copyright headers and fix formatting
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.
2018-01-05 01:22:23 +01:00
Rémi Verschelde f9f6f250e6
Merge pull request #15191 from Jerome67000/z_renaming
renames "z" Node2D property to "z_index"
2018-01-04 00:41:45 +01:00
Jerome67000 42ae3525a3 #15078 renamed "z" -> "z_index" property in Node2D 2018-01-03 13:02:26 +01:00
Rémi Verschelde b50a9114b1 Update copyright statements to 2018
Happy new year to the wonderful Godot community!
2018-01-01 14:40:47 +01:00
Gilles Roudiere f1ec8ff6e8 Fixes a double class registering error 2017-11-20 11:20:38 +01:00
Gilles Roudiere 8d1f2b1857 Rework the canvas_item API for further improves to the canvas item editor 2017-11-19 13:36:31 +01:00
letheed 482e07af7e Unify degree members and properties 2017-11-10 12:52:07 +01:00
letheed ab2647a0d0 Remove deprecated rotation methods 2017-11-10 09:09:30 +01:00
letheed 5ad9be4c24 Rename pos to position in user facing methods and variables
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.
2017-09-20 13:11:10 +02:00
Rémi Verschelde bd282ff43f Use HTTPS URL for Godot's website in the headers 2017-08-27 14:16:55 +02:00
Hein-Pieter van Braam cacced7e50 Convert Object::cast_to() to the static version
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/
2017-08-24 23:08:24 +02:00
Ignacio Etcheverry 2f290038d6 Removes type information from method binds 2017-08-10 07:17:50 +02:00
Juan Linietsky 435bedd9ef Merge pull request #10116 from neikeq/prop_method_ambiguities
Renames properties and methods to avoid ambiguities
2017-08-05 17:55:43 -03:00
Ignacio Etcheverry e82270e8d0 Renames properties and methods to avoid ambiguities
- Method Node2D.scale(Vector2) renamed to Node2D.apply_scale(Vector2)
- Property BaseButton.is_pressed renamed to BaseButton.pressed
2017-08-05 22:52:58 +02:00
Rémi Verschelde 0a74fb625e Merge pull request #9791 from bojidar-bg/6087-add-global-local-conv
Add .to_local/.to_global methods on Node2D and Spatial
2017-07-24 22:24:34 +02:00
Poommetee Ketson 2777f81d29 Add object type hint for docs 2017-07-23 18:57:03 +07:00
Bojidar Marinov 140f189a65
Add .to_local/.to_global methods on Node2D and Spatial
Those are just helpers around get_global_transform().affine_inverse().xform() and get_global_transform().xform().
Closes #6087
2017-07-23 14:37:26 +03:00
Poommetee Ketson 49c7620326 Add object type hint for docs 2017-07-19 02:03:34 +07:00
TwistedTwigleg a6feb0943a Fixed set_global_scale in Node2D. 2017-07-03 13:28:26 -04:00
alexholly a3c90b0293 renamed all Rect2.pos to Rect2.position 2017-06-04 02:09:17 +02:00
Rémi Verschelde df61dc4b2b Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
Robert Hernandez 8078b5ecf6 Fixed Node2D/Control not updating properties 2017-04-01 20:13:52 -04:00
Rémi Verschelde 5dbf1809c6 A Whole New World (clang-format edition)
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
2017-03-05 16:44:50 +01:00
Hein-Pieter van Braam 411ee71b4d Rename the _MD macro to D_METHOD
This new name also makes its purpose a little clearer

This is a step towards fixing #56
2017-02-13 12:50:02 +01:00
Hein-Pieter van Braam 0f687f0ccb Remove use of _SCS from ADD_METHOD
This saves typing and is a step towards fixing #56
2017-02-13 10:37:47 +01:00
Juan Linietsky bc26f90581 Type renames:
Matrix32 -> Transform2D
	Matrix3 -> Basis
	AABB -> Rect3
	RawArray -> PoolByteArray
	IntArray -> PoolIntArray
	FloatArray -> PoolFloatArray
	Vector2Array -> PoolVector2Array
	Vector3Array -> PoolVector3Array
	ColorArray -> PoolColorArray
2017-01-11 00:52:51 -03:00
Juan Linietsky b085c40edf -Conversion of most properties to a simpler syntax, easier to use by script
-Modified help to display properties

GDScript can still not make use of them, though.
2017-01-04 01:16:14 -03:00
Juan Linietsky 118eed485e ObjectTypeDB was renamed to ClassDB. Types are meant to be more generic to Variant.
All usages of "type" to refer to classes were renamed to "class"
ClassDB has been exposed to GDScript.
OBJ_TYPE() macro is now GDCLASS()
2017-01-02 23:03:46 -03:00
Rémi Verschelde c7bc44d5ad Welcome in 2017, dear changelog reader!
That year should bring the long-awaited OpenGL ES 3.0 compatible renderer
with state-of-the-art rendering techniques tuned to work as low as middle
end handheld devices - without compromising with the possibilities given
for higher end desktop games of course. Great times ahead for the Godot
community and the gamers that will play our games!
2017-01-01 22:03:33 +01:00
anneomcl aa5ade834c Fix for #6158. Converting Vector2 to Size2 for scaling functions. 2016-09-19 23:31:45 -07:00
Emmanuel Leblond c402ac13df Add Node2D's set_global_rot get_global_rot set_global_rotd get_global_rotd set_global_scale get_global_scale methods. 2016-08-15 11:39:19 +02:00
Rémi Verschelde 4eab767a6f Rotation APIs: Better exposure for degrees methods
Made public the various set/getters for rotations in degrees.
For consistency, renamed the exposed method names to remove the leading
underscore, and kept the old names with a deprecation warning.

Fixes #4511.
2016-05-06 23:38:08 +02:00
George Marques 5be9ff7b67 Update copyright to 2016 in headers 2016-01-01 11:50:53 -02:00
reduz f7b64a62d1 -renamed function get_relative_transform() to get_relative_transform_to_parent(), makes more sense
-fixed newly introduced bug in onready keyword, fixes #3155
2015-12-28 21:05:57 -03:00
Rémi Verschelde d4993b74fc Add missing argument names in GDScript bindings
All classes were reviewed apart from VisualServer for which no argument name is documented at all.
While doing this review, I found quite a few bugs that were fixed either in earlier commits or this one (mostly documentation bugs though, i.e. some arguments were listed at the wrong place).
2015-12-28 02:13:05 +01:00
Juan Linietsky d3eb9e8c54 -remove Vector2.atan2() replaced by Vector2.angle(), fixes #2260 2015-11-19 10:41:20 -03:00
Juan Linietsky 95047562d7 Several performance improvements, mainly in loading and instancing scenes and resources.
A general speedup should be apparent, with even more peformance increase when compiling optimized.

WARNING: Tested and it seems to work, but if something breaks, please report.
2015-06-29 00:29:49 -03:00
Juan Linietsky 3936ed882c -Added lookat/get_angle_to functions in 2D, and a demo, closes #1843
-Added get_viewport().get_mouse_pos() to replace Input.get_mouse_pos(), closes #1838
2015-05-12 08:17:09 -03:00
Juan Linietsky fdaa2920eb Updated copyright year in all headers 2015-04-18 14:38:54 -03:00