Commit graph

56 commits

Author SHA1 Message Date
Rémi Verschelde
140350d767
Style: Enforce braces around if blocks and loops
Using clang-tidy's `readability-braces-around-statements`.
https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2021-05-05 15:02:01 +02:00
Rémi Verschelde
a828398655
Style: Replaces uses of 0/NULL by nullptr (C++11)
Using clang-tidy's `modernize-use-nullptr`.
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html
2021-05-04 16:30:23 +02:00
Rémi Verschelde
b5e1e05ef2
Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2021-05-04 14:45:16 +02:00
Rémi Verschelde
49646383f1
Update copyright statements to 2021
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 🎆

(cherry picked from commit b5334d14f7)
2021-01-13 16:17:06 +01:00
Haoyu Qiu
4d727f1ee6 Allows to doc vararg method return type as void 2020-01-02 21:37:26 +08:00
Rémi Verschelde
a7f49ac9a1 Update copyright statements to 2020
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.
2020-01-01 11:16:22 +01:00
Alexander Holland
8f23f4b44e UndoRedo add version changed signal
added some functions to manage undo buttons
2019-06-26 16:32:34 +02:00
Rémi Verschelde
e0574e1d98 Fix typos with codespell
Using codespell 1.15.0.

Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
curvelinear
doubleclick
leapyear
lod
merchantibility
nd
numer
ois
ony
que
seeked
synching
te
uint
unselect
webp
EOF

$ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"
$ git diff // undo unwanted changes
```
2019-05-19 13:10:35 +02:00
Michael Alexsander Silva Dias
e63e3875d7 Fix 'UndoRedo' increasing its version on actions that should be merged 2019-04-04 14:37:45 -03:00
Juan Linietsky
9b5c6f539b Safer way to update animation if changed, fixes #26670 2019-03-06 10:22:38 -03:00
Juan Linietsky
8b4c4d9b2f Implement a more coherent (and way less hack) way to block animation updates, fixes #24618 2019-03-03 17:57:16 -03:00
Michael Alexsander Silva Dias
dcf6c4a368 Revert "Fix 'UndoRedo's 'MERGE_ALL' mode repeating instructions when quickly commiting actions"
This reverts commit 79f1d8b4fb.
2019-02-25 14:09:33 -03:00
Michael Alexsander Silva Dias
79f1d8b4fb Fix 'UndoRedo's 'MERGE_ALL' mode repeating instructions when quickly commiting actions
It seems that the merge operation validation is only useful to the 'MERGE_ENDS' mode, causing problems when in 'MERGE_ALL'.

Fixes #26118.
2019-02-21 15:36:45 -03:00
Juan Linietsky
4a24ba6e77 -Fixes to undo redo to avoid crash, closes #24251
-Changed Animation to have a special signal when tracks are changed, to avoid unnecesary track cache rebuilds in AnimationPlayer
-Added missing emit_changed whe modifying keys to Animation
-Changed AnimationPlayer to use the new refcounted connections instead of the previous hacky way to keep references
-Changed AnimationEditor to update the current track when keys are edited
-Fixed bug where undo/redo did not work with AnimationKeyEdit (was not being updated)
-Made sure UndoRedo does not mind deleted objects in undo/redo history, this would corrupt the history or clear it without need.
2019-02-14 10:22:34 -03: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
Rémi Verschelde
f11047aa81
Merge pull request #21856 from AlexHolly/fix-undo-not-showing-error
Fix undo redo not showing errors
2018-12-14 17:13:16 +01:00
Michael Alexsander Silva Dias
6ba94d5ca0 Add argument to UndoRedo's "clear_history()" to not increase the version 2018-11-18 19:46:35 -02:00
Juan Linietsky
9e85d17241 Clearing history increments version, else it does not generate an asterisk on modification if the scene was just saved. Fixes #18027.
Still I feel this line was commented for a reason. If you bisect a bug and find
this commit, let me know.
2018-11-16 16:20:10 -03: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
Alexander Holland
f5a8637e7a Fix undo redo not showing errors 2018-09-08 03:14:13 +02:00
Hein-Pieter van Braam
0e29f7974b Reduce unnecessary COW on Vector by make writing explicit
This commit makes operator[] on Vector const and adds a write proxy to it.  From
now on writes to Vectors need to happen through the .write proxy. So for
instance:

Vector<int> vec;
vec.push_back(10);
std::cout << vec[0] << std::endl;
vec.write[0] = 20;

Failing to use the .write proxy will cause a compilation error.

In addition COWable datatypes can now embed a CowData pointer to their data.
This means that String, CharString, and VMap no longer use or derive from
Vector.

_ALWAYS_INLINE_ and _FORCE_INLINE_ are now equivalent for debug and non-debug
builds. This is a lot faster for Vector in the editor and while running tests.
The reason why this difference used to exist is because force-inlined methods
used to give a bad debugging experience. After extensive testing with modern
compilers this is no longer the case.
2018-07-26 00:54:16 +02:00
Marcelo Fernandez
e9db8964e3 Add a message when there is nothing to Undo or Redo 2018-05-27 12:53:52 -03:00
Todd Ross
6e932c3108 obsolete UndoRedo max_steps; no users identified 2018-01-08 10:57:07 -06:00
geequlim
a6e0dcdcbf Add null checking for paramaters in Undoredo 2018-01-07 18:47:55 +08: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
b50a9114b1 Update copyright statements to 2018
Happy new year to the wonderful Godot community!
2018-01-01 14:40:47 +01:00
Geequlim
ae18b1f83f Expose more methods for UndoRedo 2017-09-13 12:18:51 +08: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
32dd9a9f66 ClassDB: Provide the enum name of integer constants 2017-08-20 22:07:43 +02:00
Ignacio Etcheverry
2f290038d6 Removes type information from method binds 2017-08-10 07:17:50 +02:00
Indah Sylvia
5ae78fdf6a Makes all Godot API's methods Lower Case 2017-08-07 18:24:35 +07:00
Rémi Verschelde
df61dc4b2b Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02: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
Juan Linietsky
87bb6cdc6f Ability to drag and drop around audio effects! 2017-01-24 00:19:31 -03:00
Juan Linietsky
3b019bf644 Ability to delete, drag and drop audio buses! 2017-01-23 23:12:41 -03:00
Rémi Verschelde
3890256fc5 Style: Cleanups, added headers, renamed files
Made sure files in core/ and tools/ have a proper Godot license header
when written by us. Also renamed aabb.{cpp,h} and object_type_db.{cpp,h}
to rect3.{cpp,h} and class_db.{cpp,h} respectively.

Also added a proper header to core/io/base64.{c,h} after clarifying
the licensing with the original author (public domain).
2017-01-16 08:04:23 +01: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
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
Juan Linietsky
828e1c092f Renamed the bind_native functions to bind_vararg, should make it show the documentation more clearly and also make it easier to bind to C# 2016-09-07 19:39:57 -03:00
Franklin Sobrinho
debf574df3 Implemented UndoRedo mergeable modes 2016-08-17 17:14:51 -03:00
Hubert Jarosz
4a4f247914
remove trailing whitespace 2016-03-09 00:00:52 +01:00
George Marques
5be9ff7b67 Update copyright to 2016 in headers 2016-01-01 11:50:53 -02:00
Juan Linietsky
f2183a5e09 replaced :var by :Variant in documentation, fixes #2897 2015-12-14 08:28:01 -03:00
Juan Linietsky
59961c9914 Live edit WORK IN PROGRESS
1) press the heart while the game is running
2) select a scene to live edit from the opened scenes
3) edit/add/remove nodes or resources, change their properties, etc.
4) watch changes reflected in running game, in all places this scene is
edited
5) It's not perfect obviously, but the aim of it is to try to reflect
your changes as best as possible in the running game.
2015-08-02 12:30:01 -03:00
Juan Linietsky
0805e83e59 small in place fixes 2015-06-22 23:44:13 -03:00
Juan Linietsky
29e644c20a Merge pull request #2144 from Krzycho666/UndoRedo_fix
added GDscript bidings for UndoRedo class
2015-06-22 23:42:13 -03:00
krzycho
fafcc52d1c added some missing biddings 2015-06-22 14:42:52 +02:00