Commit graph

382 commits

Author SHA1 Message Date
Rémi Verschelde d739e25650 2to3 exporter: Make conversion less spammy
Also fix logic bug in transform/rot conversion.
In my tests it seems like it was not actually misbehaving,
but the logic was wrong for tracks with ID > 9.
2018-06-14 12:37:38 +02:00
Rémi Verschelde 2caaaf3abf Fix serialization of identifiers with non printable ASCII characters
Fixes #6888.

Also apply the same logic in the 2 to 3 exporter, fixes #16850.
2018-03-02 13:32:33 +01:00
Rémi Verschelde 2712014744 Update copyright statements to 2018
Happy new year to the wonderful Godot community!
2018-01-02 11:27:24 +01:00
Xavier Sellier 487773ed24 Remove funny output during when exporting a project or loading Godot Engine 2017-12-11 11:13:04 -05:00
Rémi Verschelde 6a4e7198c5 Style: apply clang-format (5.0.0) to current source 2017-12-11 15:31:49 +01:00
Rémi Verschelde 9d598833d2 Use HTTPS URL for Godot's website in the headers 2017-08-27 14:11:45 +02:00
Rémi Verschelde 886c7d82d0 Re-apply clang-format to all files
Some badly formatted code has managed to pass through our CI...
2017-08-27 14:11:11 +02:00
Hein-Pieter van Braam bec8fd1732 Fix color_ramp indexing negative elements
The 'pos' variable passed to get_color() and get_offset() can be
negative if the color ramp itself is empty. This causes a lookup in an
empty position in the color Vector which leads to a crash.

We add a check so we never do a lookup in the color Vector if the
gradient is empty.

This fixes #10501

(cherry picked from commit 67b9d6eef2)
2017-08-27 12:56:05 +02:00
elasota 91140904cc Fix AtlasTexture + Sprite3D using the wrong UV region
- Change get_rect_region to return UV region instead of pixel rect
- Fixed atlas texture Sprite3D Y offsets being applied in the wrong direction and fixed Flip not adjusting the geometry.
- Changed get_rect_region name to get_rect_region_uv_rect
2017-08-24 23:05:49 +02:00
Hein-Pieter van Braam 364f2e8082 Correct hash behavior for floating point numbers
This backports the work in #7815 and the subsequent fixes in #8393

The following program now works as expected in this branch in both
release_debug and debug mode:

```gdscript
        print(sqrt(-1))
        print(sqrt(-1))

        var simple1=asin(10.0)
        var simple2=acos(10.0)
        print(simple1)
        print(simple2)
```

And successfully prints -nan 4 times

This fixes #9580 and fixes #8925
2017-08-20 23:44:28 +02:00
Marcelo Fernandez 647c4ae5bf Add closest_power_of_2 func and implement mix_rate/latency on OS X 2017-08-18 12:10:21 -03:00
Juan Linietsky c1b6301050 keep default exported script values unless overriden, closes #8127
(cherry picked from commit 475e8b28b2)
2017-08-13 20:29:43 +02:00
Andrii Doroshenko (Xrayez) 7011f11615 Bind some useful methods in SurfaceTool to GDScript
These include:
* generate_tangents()
* add_to_format()
* create_from()
* append_from()

Reordered and grouped the bindings to match the header for improved readability.

Removed commented out `generate_flat_normals()` method which wasn't present
in the header.

Fixes #9946

(cherry picked from commit aa1165a3f5)
2017-08-13 17:55:40 +02:00
Poommetee Ketson 4a0dc529ce BuildSystem: generated files have .gen.ext 2017-06-25 20:31:56 +07:00
Pedro J. Estébanez 2018db093c Add one-way collision to tile-set/tile-map 2017-06-17 22:26:50 +02:00
Ferenc Arn c2c1d2076c GDScript bindings for various missing Mesh functions.
Fixes #8041.

(cherry picked from commit f2a335d0c1)
2017-05-27 00:42:59 +02:00
Rémi Verschelde 6cf507f004 Move other lone thirdparty files to thirdparty/misc
Also move Box2D ConvexDecomposition contrib code to
thirdparty/b2d_convexdecomp.

(cherry picked from commit d4029aa51a)
2017-05-26 23:39:47 +02:00
Rémi Verschelde e43e7a414a Fix theme_data.h formatting via make_header.py
Should make clang-format happy.

(cherry picked from commit 5f15f03d38)
2017-05-26 19:11:43 +02:00
volzhs 4a0aac4fb3 Fix editor style box for ToolButton 2017-04-12 12:20:51 +09:00
Rémi Verschelde e9b045d9e5 Add "Godot Engine contributors" copyright line 2017-04-08 00:45:24 +02:00
Pedro J. Estébanez 9f8f8efa67 Add priority to samples in a library 2017-04-06 23:59:49 +02:00
Rémi Verschelde f8db8a3faa Bring that Whole New World to the Old Continent too
Applies the clang-format style to the 2.1 branch as done for master in
5dbf1809c6.
2017-03-19 00:36:26 +01:00
Rémi Verschelde dbf0137576 Style: Fix statements ending with ';;'
(cherry picked from commit f44ee891be)
2017-03-18 21:14:33 +01:00
Rémi Verschelde 4bfecab813 Style: No break before list brace
clang-format does not handle that well *at all*.

For the reference, found the relevant pieces of code with:
`ag "=[ "$'\t'"]?"$'\n'"[ "$'\t'"]?{" --ignore=thirdparty`

(cherry picked from commit 40323407df)
2017-03-18 21:05:58 +01:00
Pedro J. Estébanez 148566b31b Fix redundant connections saved in sub-inheritance 2017-03-15 11:48:24 +01:00
Pedro J. Estébanez 6aef1c48c4 Fix node duplication in scene sub-inheritance 2017-03-08 19:58:59 +01:00
Rémi Verschelde 43574f65da Merge pull request #7909 from RandomShaper/cp-tileset-modulate-2.1
Cherry-pick modulate (color) for TileSet tiles (2.1)
2017-03-01 10:08:01 +01:00
Pedro J. Estébanez b6721caa13 Add modulate (color) to TileSet tiles
(cherry picked from commit 86789c7071)
2017-03-01 03:21:47 +01:00
volzhs 71a5b0885b Cache DynamicFont resource for Android 2017-02-22 22:54:19 +09:00
Juan Linietsky ebb7d2cdb7 -WIP Exporter to Godot 3.0, only text scenes (no .scn) and still kind of buggy 2017-02-12 23:13:14 -03:00
Pedro J. Estébanez 888f8b31e7 Improve .tscn VCS
Serialize dictionaries adding newlines between key-value pairs
Serialize group lists also with newlines in between
Serialize string properties escaping only " and \ (needed for a good diff experience with built-in scripts and shaders)

Bonus:
Make AnimationPlayer serialize its blend times always sorted so their order is predictable in the .tscn file.

This PR is back-compat; won't break the load of existing files.

Cherry-picked from 7dbb1c0571
2017-01-25 20:11:10 +01:00
Rémi Verschelde d8223ffa75 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!

(cherry picked from commit c7bc44d5ad)
2017-01-12 19:15:30 +01:00
Andreas Haas fa816730c0 Curve2D/3D: Add clear_points method.
Adds a method to the Curve2D and Curve3D classes to easily clear the curve.
So you don't have to remove each point manually.

(cherry picked from commit e741da869a)
2017-01-12 19:15:27 +01:00
Zher Huei Lee 17399de0e1 Reused Button styleboxes for ButtonArray
Plus other tweaks to make it look more similar to a VBoxContainer of
Buttons.

(cherry picked from commit 191fdc873e)
2017-01-12 19:15:26 +01:00
Rémi Verschelde eaf803f71e 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-02 22:30:34 +01:00
Rémi Verschelde a7389217f8 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-02 22:29:36 +01:00
Rémi Verschelde e259bf8bbb 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-02 22:28:28 +01:00
Rémi Verschelde 561c1f17a1 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-02 22:26:55 +01:00
Rémi Verschelde 5a49e45d21 SCsub: Add python shebang as a hint for syntax highlighting
Also switch existing shebangs to "better" /usr/bin/env python.

(cherry picked from commit fc8ccd5b8c)
2016-10-30 14:51:34 +01:00
Pawel Kowal 35cdb1a49b Fix #5959, contrasting texture for toggled button
(cherry picked from commit d3a8087659)
2016-10-17 20:46:10 +02:00
Fabio Alessandrelli 359b5f3b25 Expose more 2D/3D physics options in project settings
(cherry picked from commit 1d09c27ba4)
2016-10-09 17:33:47 +02:00
Pawel Kowal 4ca83c635f Add scrolling to Tree control in Drag and Drop mode
(cherry picked from commit 9e5aaa27bc)
2016-10-09 17:17:04 +02:00
Pedro J. Estébanez c44757c2b7 Expose light shadow color to canvas item shaders
(cherry picked from commit 0960887625)
2016-09-18 23:11:08 +02:00
Zher Huei Lee 0de7860511 DynamicFont caches now accounts for texture flags
CacheID added for future-proofing
2016-08-02 15:36:11 +01:00
Zher Huei Lee af6ef01c69 Added extra spacing support for DynamicFont
Side effect is that label min-size will now take into account
kerning.
2016-08-02 11:05:20 +01:00
Zher Huei Lee 7b165e8ac2 Added texture mipmaps and filtering to DynamicFont 2016-08-02 08:01:51 +01:00
Rémi Verschelde 08ba6086be World2D: Fix typo in default_density deprecation check 2016-07-28 19:03:32 +02:00
Juan Linietsky bafcabb157 Merge pull request #5832 from Algrin6/patch-1
Fixes defects in Curve2D and Curve3D
2016-07-24 11:44:42 -03:00
Saracen f86b698765 SurfaceTool add_index method exposed to scripts. 2016-07-22 04:52:41 +01:00
Juan Linietsky 124e3591a5 Some optimizations and limits for extreme zoom in and out in editor, fixes #5820 2016-07-21 10:11:53 -03:00