Commit graph

170 commits

Author SHA1 Message Date
Anshul7sp1 91181c2086 Fixes small typos and grammar correction 2021-03-12 19:05:16 +05:30
reduz 083aa9b95e Refactor Process Mode
Implements https://github.com/godotengine/godot-proposals/issues/1835#issuecomment-727186192

* PauseMode is now ProcessMode, containing the following states:
	```
	PROCESS_MODE_INHERIT, // same as parent node
	PROCESS_MODE_NORMAL, // process only if not paused
	PROCESS_MODE_PAUSE_ONLY, // process only if paused
	PROCESS_MODE_ALWAYS, // process always
	PROCESS_MODE_DISABLED, // never process
	```
* NOTIFICATION_PAUSED and NOTIFICATION_UNPAUSED are received effectively when the node is paused and unpaused (not any longer when pause mode is set in SceneTree).
* Renamed some nodes that used ProcessMode/process_mode to specify a callback type to ProcessCallback to avoid clashes.
2021-02-18 20:39:55 -03:00
reduz 1aa2823fa3 Removed _change_notify
-For inspector refresh, the inspector now detects if a property change by polling a few times per second and then does update the control if so. This process is very cheap.
-For property list refresh, a new signal (property_list_changed) was added to Object. _change_notify() is replaced by notify_property_list_changed()
-Changed all objects using the old method to the signal, or just deleted the calls to _change_notify(<property>) since they are unnecesary now.
2021-02-10 19:31:24 -03:00
Rémi Verschelde e8f73124a7
Merge pull request #45845 from qarmin/cppcheck_scene_2
Initialize class variables with default values in scene/ [2/2]
2021-02-10 20:06:12 +01:00
Pedro J. Estébanez fbb37196fd Fix animation reset-on-save on inactive scene tabs 2021-02-09 21:41:48 +01:00
Rafał Mikrut 7961a1dea3 Initialize class variables with default values in scene/ [2/2] 2021-02-09 18:24:36 +01:00
Rafał Mikrut 003bb8e1a8 Initialize class variables with default values in scene/ [1/2] 2021-02-07 22:29:31 +01:00
Rémi Verschelde b5334d14f7
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 🎆
2021-01-01 20:19:21 +01:00
Rémi Verschelde 09212fba1e
Fix missed renamings from empty() to is_empty()
Those were missed in #44401 or added by later PRs.
2020-12-29 09:55:07 +01:00
Pedro J. Estébanez b7367ac426 Add animation reset track feature
As a bonus, to have consistency between use Beziers and create insert tracks, use Beziers also gets a default via editor settings that is used when the confirmation dialog is disabled, instead of just falling back to creating non-Bezier tracks.
2020-12-20 12:45:08 +01:00
reduz 127458ed17 Reorganized core/ directory, it was too fatty already
-Removed FuncRef, since Callable makes it obsolete
-Removed int_types.h as its obsolete in c++11+
-Changed color names code
2020-11-07 20:17:12 -03:00
Pedro J. Estébanez 826af5b28a Fix premature end of animation playing backwards 2020-10-10 21:37:28 +02:00
Duroxxigar 8bfeb9d6ae Added a more helpful error message when there is no current animation for the animation player 2020-10-06 01:21:23 -04:00
Rémi Verschelde 810aefb3ed
Merge pull request #40063 from RandomShaper/clean_blend_times
Ignore (clean) blend times for non-existent animations
2020-07-03 07:51:22 +02:00
Pedro J. Estébanez fdf1977e8f Ignore blend times for inexistent animations 2020-07-02 19:22:09 +02:00
Rémi Verschelde b65ebfc7e7
Merge pull request #36879 from ThakeeNathees/animation-autocomplete-bug-fix
Fix: animation autocomplete bug fixed
2020-07-02 09:06:47 +02:00
Tomasz Chabora 642d91381a Restore capture caches when missing 2020-06-05 23:26:25 +02:00
Rémi Verschelde 0ee0fa42e6 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
2020-05-14 21:57:34 +02:00
Rémi Verschelde 07bc4e2f96 Style: Enforce separation line between function definitions
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.
2020-05-14 16:54:55 +02:00
Rémi Verschelde 0be6d925dc Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
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.
2020-05-14 16:54:55 +02:00
Rémi Verschelde 69de7ce38c Style: clang-format: Disable AllowShortCaseLabelsOnASingleLine
Part of #33027.
2020-05-10 13:13:54 +02:00
Rémi Verschelde 69f36cea8c Revert "Emit signal when animation ends by seek"
This reverts commit bf1cc116e1.

This needs more discussion to avoid breaking some users' expectations.
See #38086 for arguments.
2020-05-04 16:09:19 +02:00
Aaron Franke 540156b387
[Core] Rename linear_interpolate to lerp 2020-04-29 04:02:49 -04:00
volzhs bf1cc116e1 Emit signal when animation ends by seek 2020-04-22 00:45:44 +09:00
Rémi Verschelde ea7b497065 Replace more occurrences of NULL with nullptr 2020-04-02 14:56:01 +02:00
lupoDharkael 95a1400a2a Replace NULL with nullptr 2020-04-02 13:38:00 +02:00
Juan Linietsky eaae4b6408 Renamed 2D and 3D nodes to make their types explicit
Fixes #30736.
2020-03-27 14:54:04 +01:00
Thakee Nathees b07e788ad9 animation autocomplete bug fixed 2020-03-07 14:52:53 +05:30
Rémi Verschelde f742dabafe Signals: Manually port most of remaining connect_compat uses
It's tedious work...

Some can't be ported as they depend on private or protected methods
of different classes, which is not supported by callable_mp (even if
it's a class inherited by the current one).
2020-02-28 14:24:09 +01:00
Rémi Verschelde 01afc442c7 Signals: Port connect calls to use callable_mp
Remove now unnecessary bindings of signal callbacks in the public API.
There might be some false positives that need rebinding if they were
meant to be public.

No regular expressions were harmed in the making of this commit.
(Nah, just kidding.)
2020-02-28 14:24:09 +01:00
Juan Linietsky 33b5c57199 Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.
- 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.
2020-02-25 12:55:53 +01:00
Juan Linietsky 3c0059650d Added StringName as a variant type.
Also changed all relevant properties defined manually to StringName.
2020-02-21 14:25:29 +01:00
Juan Linietsky 69c95f4b4c Reworked signal connection system, added support for Callable and Signal objects and made them default. 2020-02-20 08:24:50 +01:00
Juan Linietsky 3205a92ad8 PoolVector is gone, replaced by Vector
Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are
sugar for `Vector<Type>`.
2020-02-18 10:10:36 +01:00
Juan Linietsky 867d073b98 Changed logic and optimized ObjectID in ObjectDB and Variant, removed RefPtr. 2020-02-15 08:36:04 -03:00
Juan Linietsky cf8c679a23 ObjectID converted to a structure, fixes many bugs where used incorrectly as 32 bits. 2020-02-12 14:24:54 -03:00
Marcel Admiraal 5af3b4ca27 Remove duplicate ERR_PRINT macro. 2020-02-05 11:13:24 +01: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
Rémi Verschelde dec10dd776
Merge pull request #32051 from qarmin/some_error_explanation
Added some obvious errors explanations
2019-09-25 11:51:54 +02:00
qarmin 17732fe698 Added some obvious errors explanations 2019-09-25 10:28:50 +02:00
Juan Linietsky d81ddaf33e Added skin support and simplified APIs to override bone position. 2019-09-18 19:46:32 -03:00
Unknown 9d849c21cc fix animation freeze when playing animation from another AnimationPlayer
Donated by IMVU, Inc.

Fixes #31410
When we create an animation player with an animation from which we will start another AnimationPlayer's animation at the moment when that animation is already active - it will  be stopped.  When starting an animation with play() func all the 'outside' animations for animation player were removed (`_stop_playing_caches` func). This pr prevents this behaviour for the case when play is called for animation that's still active. This way the behaviour is the same between "Animation Playback track" and other tracks (tested with value track)
2019-08-19 13:51:08 +02:00
Tomasz Chabora af5e0fff66 Remove ERR_EXPLAIN from scene/* code 2019-08-09 13:54:52 +02:00
Rémi Verschelde 8591691b9b
Merge pull request #24249 from zorbathut/zorbathut/animimmediate
Implement AnimationPlayer call modes as per #23498.
2019-06-20 13:04:34 +02:00
Pedro J. Estébanez 88153fbb61 Fix 2D bones ignored by onion skinning
Fixes #27819.
2019-05-22 20:40:57 +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
Rémi Verschelde 9dc9434b1b
Merge pull request #24437 from mateusfccp/single_quotes_option
Add settings for single-quotes on completion
2019-04-30 14:58:33 +02:00
Juan Linietsky c00429c33b Removed some prints 2019-03-02 12:15:48 -03:00
Luiz e27bbb075a Fix AnimationPlayer jumping to the beggining after ending on editor. 2019-02-20 14:58:53 -04:00
Luiz 5ec4f14a24 Fix AnimationPlayer bug where it wouldn't reset its position when finished 2019-02-14 15:32:29 -03:00