Commit graph

915 commits

Author SHA1 Message Date
Rémi Verschelde
0507f87de9 Merge pull request #7491 from BastiaanOlij/tools-no-fixes
Few small fixes so tools=no and target=release compiles
2017-01-10 15:31:03 +01:00
Rémi Verschelde
82ea31e42a Merge pull request #7490 from touilleMan/issue-7481
Remove deprecated Vector2.floorf method
2017-01-10 15:30:41 +01:00
Rémi Verschelde
9856843717 Merge pull request #7462 from karroffel/error_code
expose OS.set_exit_code and OS.get_exit_code to ClassDB
2017-01-10 15:29:39 +01:00
BastiaanOlij
bf990b0822 Few small fixes so tools=no and target=release compiles 2017-01-10 21:42:14 +11:00
Emmanuel Leblond
0fbf3b990d Remove deprecated Vector2.floorf method 2017-01-10 09:11:36 +01:00
Juan Linietsky
a503f8aadc Groundbreaking!! Godot resources can now be flagged to be local to the scene being edited!
This means that each time this scene is instanced, the resource will be unique!
As such, thanks to this, the following features were implemented:
-ButtonGroup is no longer a control, it's now a resource local to the scene
-ViewportTexture can be created from the editor and set to any object, making ViewportSprite and other kind of nodes obsolete!
2017-01-10 01:07:03 -03:00
Juan Linietsky
1f8451001d -Translation text will change automatically for in-game buttons, labels, poups when translation is changed.
-Added a NOTIFICATION_TRANSLATION_CHANGED for controls that need custom code
-Sorry, editor will not update automatically because it uses a different translatio method.
2017-01-09 16:43:44 -03:00
Juan Linietsky
e9bb65db81 -All types have editable script now in properties
-Changed clip to a property in Control which can be set by the user
2017-01-09 15:50:59 -03:00
Juan Linietsky
62273e51a2 Moved JSON functions to built-in to_json, parse_json, validate_json 2017-01-08 22:40:00 -03:00
m4nu3lf
2e38b32e0f Fixed inertia tensor computation and center of mass 2017-01-09 00:13:54 +00:00
Juan Linietsky
fdc3380cf6 Remove XML format, as promised, for 3.0 2017-01-08 21:12:19 -03:00
Juan Linietsky
13cdccf23b Variant INT and REAL are now 64 bits (other types remain at 32) 2017-01-08 20:58:39 -03:00
Rémi Verschelde
8b7a86ec7b Move tests again from core to main
As advised by @reduz, as tests depend on other libs.
2017-01-08 21:33:37 +01:00
Juan Linietsky
10938e8bb9 Made Variant::NIL printable as "Null". Please everyone be on the lookout of bugs related to assigning an empty variant to a string, and expecting it to be not empty! 2017-01-08 17:23:04 -03:00
Juan Linietsky
547a57777b renamed joystick to joypad everywhere around source code! 2017-01-08 17:06:33 -03:00
Juan Linietsky
0a59c3c3a6 Dictionary keys are now sorted by insertion order 2017-01-08 14:17:04 -03:00
Ferenc Arn
6b1252cdfa Fix the order in which additional transformations are applied in Matrix3 and Transform.
This is a part of the breaking changes proposed in PR #6865, solving the issue regarding the order of affine transformations described in #2565. This PR also fixes the affected code within Godot codebase. Includes improvements to documentation too.

Another change is, Matrix3::get_scale() will now return negative scaling when the determinant of the matrix is negative. The rationale behind this is simple: when performing a polar decomposition on a basis matrix M = R.S, we have to ensure that the determinant of R is +1, such that it is a proper rotation matrix (with no reflections) which can be represented by Euler angles or a quaternion.

Also replaced the few instances of float with real_t in Matrix3 and Transform.

Furthermore, this PR fixes an issue introduced due to the API breakage in #6865. Namely Matrix3::get_euler() now only works with proper rotation matrices. As a result, the code that wants to get the rotation portion of a transform needs to use Matrix3::get_rotation() introduced in this commit, which complements Matrix3::get_scaled(), providing both parts of the polar decomposition.

Finally, it is now possible to construct a rotation matrix from Euler angles using the new constructor Matrix3::Matrix3(const Vector3 &p_euler).
2017-01-08 10:36:14 -06:00
Rémi Verschelde
ede36aca8d i18n: Add support for Scots (sco) language
Fixes #6931.
2017-01-08 16:48:30 +01:00
Rémi Verschelde
790f629e5e Move core engine tests to core/ 2017-01-08 14:08:18 +01:00
Juan Linietsky
8b912d1115 -Fix bugs related to PoolVector crashes
-Added ability to request nodes using $Name in GDScript :)
2017-01-08 02:04:53 -03:00
Juan Linietsky
2ab83e1abb Memory pool vectors (DVector) have been enormously simplified in code, and renamed to PoolVector 2017-01-07 18:26:38 -03:00
karroffel
fbfcc981d9 exposed OS.set_exit_code and OS.get_exit_code to ClassDB 2017-01-07 18:55:48 +01:00
Juan Linietsky
53ce643e52 -Changed memory functions, Memory::alloc_static*, simplified them, made them aligned to 16
-Changed Vector<> template to fit this.
2017-01-06 10:15:44 -03:00
Juan Linietsky
0f7af4ea51 -Changed most project settings in the engine, so they have major and minor categories.
-Changed SectionedPropertyEditor to support this
-Renamed Globals singleton to GlobalConfig, makes more sense.
-Changed the logic behind persisten global settings, instead of the persist checkbox, a revert button is now available
2017-01-05 09:16:00 -03:00
Juan Linietsky
9e477babb3 -GDScript support for accessing properties directly
-Added code lookup and code completion support for properties too
2017-01-04 17:37:45 -03:00
Juan Linietsky
76c2e8583e Merge branch 'master' of https://github.com/godotengine/godot 2017-01-04 01:17:41 -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
Ferenc Arn
bd7ba0b664 Use right handed coordinate system for rotation matrices and quaternions. Also fixes Euler angles (XYZ convention, which is used as default by Blender).
Furthermore, functions which expect a rotation matrix will now give an error simply, rather than trying to orthonormalize such matrices. The documentation for such functions has be updated accordingly.

This commit breaks code using 3D rotations, and is a part of the breaking changes in 2.1 -> 3.0 transition. The code affected within Godot code base is fixed in this commit.
2017-01-03 17:41:04 -06:00
Juan Linietsky
3fae505128 Begin modifying properties to make them more friendly to script and doc. 2017-01-03 00:38:16 -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
3f3f5a5359 Merge remote-tracking branch 'origin/gles3' into gles3-on-master
Various merge conflicts have been fixed manually and some mistakes
might have been made - time will tell :)
2017-01-02 21:52:26 +01:00
Rémi Verschelde
0b2771bd65 Merge pull request #7271 from Faless/ipv6_cleanup
Fixes and improvementes for IPv6 implementation.
2017-01-02 15:51:45 +01: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
Juan Linietsky
a62c99c4e4 Some fixes and clean ups 2016-12-31 10:53:29 -03:00
Juan Linietsky
37f558cd7b Some BRDF fixes 2016-12-21 14:22:17 -03:00
Bojidar Marinov
474eafbbf6
Remove extraneous line in .po reader, which caused it to disregard first line
Fixes #7337
2016-12-20 21:10:44 +02:00
Juan Linietsky
075fde7f26 work in progress global illumination 2016-12-20 00:21:07 -03:00
Bojidar Marinov
23381a530b
Add named colors to GDScript/Visual Script/core.
Names and values taken from https://en.wikipedia.org/wiki/X11_color_names
2016-12-17 11:14:53 +02:00
Fabio Alessandrelli
d194e1c48e Expose HTTP classes' set_ip_type to scripting 2016-12-13 11:09:37 +01:00
Juan Linietsky
22a90e8f2a DOF blur, near and far fields.. 2016-12-10 01:13:20 -03:00
Fabio Alessandrelli
c1c1ec690e Separate hostname resolve cache based on ip_type 2016-12-09 18:24:59 +01:00
Fabio Alessandrelli
1aff508dd9 IP_Address now handle IPv4 and IPv6 transparently
IP_Address changes:
- Converts to and from String transparently while handling IPv4 as IPv6
  mapped (::ffff:[IP]) address internally.
- Completely remove AddrType enum.
- Setting/Getting of ip array is now only possible through dedicated functions
  (ie. set_ipv4, get_ipv4, set_ipv6, get_ipv6)
- Add function to know if the address is a valid IPv4 (for IP implementation and enet)
2016-12-09 18:24:59 +01:00
Fabio Alessandrelli
a77a0118f6 Allow setting ip_type for TCP/UDP and HTTP classes 2016-12-09 18:24:59 +01:00
Fabio Alessandrelli
c18c5013f8 Migrate int.IP_TYPE_ constants to IP.TYPE_ 2016-12-09 18:24:59 +01:00
Fabio Alessandrelli
95bdd97768 Use an instance variable for ip_type in raw sockets
PacketPeerUDP/StreamPeerTCP/TCP_Server now uses an instance variable
to store the selected ip_type (IPv4/IPv6/ANY, where ANY = dual stack).
All calls to resolve addresses, sending/receving data, connecting/listening
will use that socket type.
2016-12-09 18:24:59 +01:00
Juan Linietsky
a299c3ebf1 Support for SSAO 2016-12-04 12:45:30 -03:00
George Marques
a692b7a1c1 Merge pull request #7149 from Kazuo256/array-last
Add Array.front() and Array.back()
2016-11-22 08:08:59 -02:00
Fabio Alessandrelli
cdc97ca453 Properly localize absolute path.
Calling localize_path will return a localized path in res:// if the
path starts with the resource file-system/folder, and will return
the unchanged absolute path otherwise.

Closes #6979 and #7161.
2016-11-22 09:09:39 +01:00
Ariel Manzur
159650fe6f memory ops implemented as OS functions by default
(cherry picked from commit 67f65f6639)
2016-11-18 21:55:30 +01:00
Kazuo256
bf4fda64fd Add Array.front() and Array.back() 2016-11-18 18:45:51 -02:00
Rémi Verschelde
ea87f0f9d9 Blimey! Ye Pirate locale be anchor' a'port! 2016-11-15 09:01:51 +01:00
Ignacio Etcheverry
c93c2a6be8 Merge pull request #6968 from neikeq/pr-register-trnglmesh
Core: Register TriangleMesh type
2016-11-12 14:01:59 +01:00
Rémi Verschelde
7751a933a9 Merge pull request #6802 from henriquelalves/master
Added small modification on gdscript parser to allow users insert '+' before variables
2016-11-11 10:55:26 +01:00
Rémi Verschelde
f0f04d5082 Merge pull request #6862 from Faless/fix_6388
Fix Keyboard Input Hangs when using modifiers
2016-11-11 10:47:10 +01:00
Juan Linietsky
cacf9ebb7f all light types and shadows are working, pending a lot of clean-up 2016-11-09 23:55:06 -03:00
Rémi Verschelde
2ba1b58374 Merge pull request #7039 from RandomShaper/fix-triangulation
Clean/fix triangulation internals
2016-11-09 15:46:13 +01:00
Rémi Verschelde
45f0903839 Merge pull request #7070 from ISylvox/vsnc-to-vsync
Renames vsnc to vsync
2016-11-09 12:03:04 +01:00
ISylvox
b5c383fd61 vsnc --> vsync 2016-11-08 21:06:57 +07:00
SPTelur
df737ebb46 Some missing License notice has been added 2016-11-07 06:16:18 +06:00
George Marques
88b00cb658 Merge pull request #7048 from neikeq/pr-marshals-singleton
Add singleton instance to _Marshalls
2016-11-06 13:34:18 -02:00
Ignacio Etcheverry
6d6d9bc7f9 Core: Add singleton instance to _Marshalls 2016-11-05 17:13:04 +01:00
Pedro J. Estébanez
0e1972aa51 Clean/fix triangulation internals
Drop unused variable
Remove commented-out code
Fix leak by using Vector instead of raw memory
2016-11-05 10:16:44 +01:00
volzhs
42f2380190 Fix wrong number for ERR_* on comment 2016-11-04 00:57:34 +09:00
AlexHolly
d8129719c2 advanced string format 2016-11-01 15:14:48 +01:00
Rémi Verschelde
f34151ff0f style: Various other PEP8 fixes in Python files
Done with `autopep8 --select=E7`, fixes:

- E701 - Put colon-separated compound statement on separate lines.
- E702 - Put semicolon-separated compound statement on separate lines.
- E703 - Put semicolon-separated compound statement on separate lines.
- E711 - Fix comparison with None.
- E712 - Fix (trivial case of) comparison with boolean.
- E713 - Fix (trivial case of) non-membership check.
- E721 - Fix various deprecated code (via lib2to3).
2016-11-01 00:35:16 +01:00
Rémi Verschelde
817dd7ccbb style: Fix PEP8 blank lines issues in Python files
Done with `autopep8 --select=E3,W3`, fixes:

- E301 - Add missing blank line.
- E302 - Add missing 2 blank lines.
- E303 - Remove extra blank lines.
- E304 - Remove blank line following function decorator.
- E309 - Add missing blank line.
- W391 - Remove trailing blank lines.
2016-11-01 00:35:16 +01:00
Rémi Verschelde
d4c17700aa style: Fix PEP8 whitespace issues in Python files
Done with `autopep8 --select=E2,W2`, fixes:

- E201 - Remove extraneous whitespace.
- E202 - Remove extraneous whitespace.
- E203 - Remove extraneous whitespace.
- E211 - Remove extraneous whitespace.
- E221 - Fix extraneous whitespace around keywords.
- E222 - Fix extraneous whitespace around keywords.
- E223 - Fix extraneous whitespace around keywords.
- E224 - Remove extraneous whitespace around operator.
- E225 - Fix missing whitespace around operator.
- E226 - Fix missing whitespace around operator.
- E227 - Fix missing whitespace around operator.
- E228 - Fix missing whitespace around operator.
- E231 - Add missing whitespace.
- E231 - Fix various deprecated code (via lib2to3).
- E241 - Fix extraneous whitespace around keywords.
- E242 - Remove extraneous whitespace around operator.
- E251 - Remove whitespace around parameter '=' sign.
- E261 - Fix spacing after comment hash.
- E262 - Fix spacing after comment hash.
- E265 - Format block comments.
- E271 - Fix extraneous whitespace around keywords.
- E272 - Fix extraneous whitespace around keywords.
- E273 - Fix extraneous whitespace around keywords.
- E274 - Fix extraneous whitespace around keywords.
- W291 - Remove trailing whitespace.
- W293 - Remove trailing whitespace.
2016-11-01 00:35:16 +01:00
Rémi Verschelde
97c8508f5e style: Start applying PEP8 to Python files, indentation issues
Done with `autopep8 --select=E1`, fixes:

- E101 - Reindent all lines.
- E112 - Fix under-indented comments.
- E113 - Fix over-indented comments.
- E115 - Fix under-indented comments.
- E116 - Fix over-indented comments.
- E121 - Fix a badly indented line.
- E122 - Fix a badly indented line.
- E123 - Fix a badly indented line.
- E124 - Fix a badly indented line.
- E125 - Fix indentation undistinguish from the next logical line.
- E126 - Fix a badly indented line.
- E127 - Fix a badly indented line.
- E128 - Fix a badly indented line.
- E129 - Fix a badly indented line.
2016-11-01 00:33:51 +01:00
Fabio Alessandrelli
7eef15b734 Set proper ip_type default for listen() and resolve_hostname() 2016-10-30 17:46:05 +01:00
Fabio Alessandrelli
2f1c859272 Add optional IP type param in TCP/UDP connect/set_send_address 2016-10-30 17:46:05 +01:00
Fabio Alessandrelli
ee69bd81cf TCPServer listen now default to IP type ANY (v6 socket with v4 support) 2016-10-30 17:46:05 +01:00
Rémi Verschelde
89001369e7 Merge pull request #6751 from SuperUserNameMan/new_PRNG_for_rand_from_seed
xorshift32 PRNG for Math::rand_from_seed()
2016-10-30 10:49:22 +01:00
Ignacio Etcheverry
313b7a50b6 Core: Register TriangleMesh type 2016-10-30 01:14:15 +02:00
Ignacio Etcheverry
33766a4935 Merge pull request #6901 from volzhs/fix-inputevent-compare
Fix comparison bug with InputEvent
2016-10-29 22:29:18 +02:00
Damon
1e7f078ce9 Fix locale for macOS-style locales 2016-10-27 07:29:00 -05:00
Damon Myers
470ead74db Change set_locale to fallback to the global language (#6910) 2016-10-27 10:36:32 +02:00
Rémi Verschelde
c67e3a485d Merge pull request #6925 from godotengine/ipv6
Adding IPv6 support
2016-10-26 14:32:51 +02:00
volzhs
b76a0ca40c Fix comparison bug with InputEvent 2016-10-23 05:47:36 +09:00
Henrique L. Alves
6a4b4c7db4 Added small modification on parser for '+' 2016-10-22 14:26:48 -02:00
Ariel Manzur
a3131a6b5b added implementation of is_valid_ip_address() 2016-10-20 09:58:00 -03:00
Ariel Manzur
672225b710 added windows support for ipv6, cleaned up unix code 2016-10-20 07:04:10 -03:00
Ariel Manzur
1c2ac490cf address type for http client 2016-10-19 18:49:41 -03:00
Ariel Manzur
1d45f35a4a fixed some byte order and parsing problems 2016-10-19 18:32:36 -03:00
Fabio Alessandrelli
17d7e6a142 Fix Keyboard Input Hangs when using modifiers
Main input parsing loop only update actions for keyboard if the state has changed.
`InputMap::event_is_action` now ignores keyboard modifiers if the event is not pressed.
Clarify difference between `InputMap::action_has_event` and `InputMap::event_is_action` in docs.

Fixes #6388.
2016-10-19 17:52:49 +02:00
Juan Linietsky
4428115916 Everything returning to normal in 3D, still a long way to go
-implemented the scene part of visual server and rasterizer, objects without lighting and material are rendererd only
2016-10-19 11:14:41 -03:00
Ariel Manzur
887a897c02 adding ipv6 2016-10-18 18:53:18 -03:00
Rémi Verschelde
e96c49f849 Merge pull request #6850 from akien-mga/pr-scsub-shebang
SCsub: Add python shebang as a hint for syntax highlighting
2016-10-17 20:13:18 +02:00
Rémi Verschelde
fc8ccd5b8c SCsub: Add python shebang as a hint for syntax highlighting
Also switch existing shebangs to "better" /usr/bin/env python.
2016-10-17 20:10:46 +02:00
Rémi Verschelde
c7ea842416 Merge pull request #6733 from Cruel/patch-1
Use int consistently instead of int32_t for Vectors
2016-10-17 09:53:06 +02:00
Rémi Verschelde
fb257f7f24 Merge pull request #6698 from razvanc-r/fix_hash_float
Fixes hash float negative 0 problem
2016-10-17 09:41:39 +02:00
Fabio Alessandrelli
2f2cea070e Properly handle absolute paths in Globals::localize_path
This give a proper fix for #4280 - #3106 , allowing absolute paths
that starts from the file system, not the resource folder
2016-10-13 11:51:38 +02:00
Răzvan Cosmin Rădulescu
9ad0850301 Fixes hash float negative 0 problem
Before this was giving an error:

var a = {Vector2(1, 0): 5, Vector2(-1, 0): 7}
    print(a)
    print(a[Vector2(1, 0)])
    print(a[-Vector2(1, 0)])

This simple commit fixes the issue.
2016-10-12 21:24:07 +02:00
Juan Linietsky
1527cf8c0d 2D Shaders are working again using the new syntax, though all is buggy in general 2016-10-10 18:31:01 -03:00
yg2f
a747c8ccee xorshift32 PRNG for Math::rand_from_seed()
should fixes #1043

PRNG adapted from : http://excamera.com/sphinx/article-xorshift.html
2016-10-10 20:41:36 +02:00
Rémi Verschelde
b9e010fb7f Merge pull request #6743 from mateka/issue-6296
Issue #6296: When searching for control, checking if matrix is inversible
2016-10-09 14:53:32 +02:00
Mateusz Adamczyk
8671836b76 Added simple check to viewport, if matrix32 is invesile (https://github.com/godotengine/godot/issues/6296). 2016-10-08 12:33:10 +02:00
Thomas Edvalson
6debabe57e
Use int instead of int32_t for Vectors 2016-10-06 16:51:19 -04:00
Răzvan Cosmin Rădulescu
f2af5ab949 fixes #6331, Variant::can_convert 2016-10-04 15:58:12 +02:00
Juan Linietsky
22d83bc9f6 Begining of GLES3 renderer:
-Most 2D drawing is implemented
-Missing shaders
-Missing all 3D
-Editor needs to be set on update always to be used, otherwise it does not refresh
-Large parts of editor not working
2016-10-03 21:35:16 +02:00
Rémi Verschelde
917f5e9bbc Merge pull request #6675 from J08nY/issue-vector3-angle-to
Adds Vector.angle_to(Vector other), fixes #3912

[ci skip]
2016-10-03 13:53:46 +02:00