Commit graph

180 commits

Author SHA1 Message Date
Tomasz Chabora
4efe401a9c Don't warp mouse when selecting tracks 2020-09-28 13:13:28 +02:00
Michael Alexsander
5643d2e3fe Small naming and tooltip tweaks 2020-07-23 20:17:43 -03:00
Stijn Hinlopen
526e060b73 Resize dialogs (FileDialog, EditorFileDialog, Reparent, SceneTreeDialog and resource depency dialogs). 2020-07-14 14:35:22 +02:00
Stijn Hinlopen
929b98d24b Remove String::find_last (same as rfind) 2020-07-03 15:26:22 +02:00
Hugo Locurcio
31b7f02a29
Remove ToolButton in favor of Button
ToolButton has no redeeming differences with Button;
it's just a Button with the Flat property enabled by default.
Removing it avoids some confusion when creating GUIs.

Existing ToolButtons will be converted to Buttons, but the Flat
property won't be enabled automatically.

This closes https://github.com/godotengine/godot-proposals/issues/1081.
2020-06-19 20:49:49 +02:00
Rémi Verschelde
84d9e10f88
Merge pull request #36409 from fire/skeleton-custom-inspector
Custom Skeleton3DEditorPlugin
2020-05-27 11:04:37 +02:00
Tomasz Chabora
f4c6bb568e Reverse mouse wheel in animation track editor 2020-05-25 01:30:05 +02:00
K. S. Ernest (iFire) Lee
f7fdc87789 Custom Skeleton3DEditorPlugin
Co-authored-by: Marios Staikopoulos <marios@staik.net>
2020-05-22 09:54:34 -07: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
dcd1151d77 Enforce use of bool literals instead of integers
Using clang-tidy's `modernize-use-bool-literals`.
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-bool-literals.html
2020-05-14 13:45:01 +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
fdf58a5858 Rename InputFilter back to Input
It changed name as part of the DisplayServer and input refactoring
in #37317, with the rationale that input no longer goes through the
main loop, so the previous Input singleton now only does filtering.

But the gains in consistency are quite limited in the renaming, and
it breaks compatibility for all scripts and tutorials that access
the Input singleton via the scripting language. A temporary option
was suggested to keep the scripting singleton named `Input` even if
its type is `InputFilter`, but that adds inconsistency and breaks C#.

Fixes godotengine/godot-proposals#639.
Fixes #37319.
Fixes #37690.
2020-04-28 15:19:49 +02:00
Michael Alexsander
b081e954cc Fix crash when changing time value of multiple animation keys at once via inspector 2020-04-23 21:45:50 -03:00
Rémi Verschelde
8d02dadaaa
Merge pull request #37602 from Janglee123/reversed-zoom-scale-animtion-player
Reversed timeline zoom slider of AnimationPlayer
2020-04-10 11:55:33 +02:00
janglee
3f23e1d600 Reversed timeline zoom slider
Fixes #37409
2020-04-07 16:14:23 +05:30
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
Juan Linietsky
b3080bc2f4 Popups have also been converted to windows
Controls using the old modal API have been replaced to use popups.
2020-03-26 15:49:44 +01:00
Juan Linietsky
c7b4dcae2f Open sub-windows as embedded if the OS does not support them 2020-03-26 15:49:43 +01:00
Juan Linietsky
441f1a5fe9 Popups are now windows also (broken!) 2020-03-26 15:49:42 +01:00
Juan Linietsky
4758057f20 Working multiple window support, including editor 2020-03-26 15:49:40 +01:00
Juan Linietsky
8e6960a69e Refactored input, goes all via windows now.
Also renamed Input to InputFilter because all it does is filter events.
2020-03-26 15:49:39 +01:00
Juan Linietsky
9e08742de8 Added a Window node, and made it the scene root.
Still a lot of work to do.
2020-03-26 15:49:38 +01:00
Juan Linietsky
4396e98834 Refactored Input, create DisplayServer and DisplayServerX11 2020-03-26 15:49:32 +01:00
Rémi Verschelde
cb282c6ef0 Style: Set clang-format Standard to Cpp11
For us, it practically only changes the fact that `A<A<int>>` is now
used instead of the C++03 compatible `A<A<int> >`.

Note: clang-format 10+ changed the `Standard` arguments to fully
specified `c++11`, `c++14`, etc. versions, but we can't use `c++17`
now if we want to preserve compatibility with clang-format 8 and 9.
`Cpp11` is still supported as deprecated alias for `Latest`.
2020-03-17 07:36:24 +01:00
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
Andrea Catania
c9b86d54bf Fixed editor crash when the animation player has no root assigned. 2020-02-26 14:50:22 +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
Rémi Verschelde
65429f11a6 Signals: Make callbacks non-const, callable_mp can't handle it 2020-02-23 23:48:44 +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
3f335ce3d4 Texture refactor
-Texture renamed to Texture2D
-TextureLayered as base now inherits 2Darray, cubemap and cubemap array
-Removed all references to flags in textures (they will go in the shader)
-Texture3D gone for now (will come back later done properly)
-Create base rasterizer for RenderDevice, RasterizerRD
2020-02-11 11:53:26 +01:00
Rémi Verschelde
4ee8c5ad1f Merge pull request #33903 from gururise/anim_length_edit
change step size of anim length EditSpinSlider to match min anim length
2020-02-10 11:30:57 +01:00
Haoyu Qiu
0ca102d568 Fixes leak in Animation Track editor 2020-01-24 11:17:56 +08:00
Rémi Verschelde
4faaf6089a Remove unused #if 0'ed code 2020-01-21 21:41:54 +01:00
volzhs
3bcedd02b2 Fix inserting bezier curve in Animation editor 2020-01-10 06:22:10 +09: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
Haoyu Qiu
8cf941a8cb Makes more editor strings translatable
* Title of Sprite Editor convert preview dialogs
* Title of UV Channel Debug dialog
* Various editor warnings
* GridMap popup menu item "Paste Selects"
* Tileset editor shape button texts
* MeshLibrary update confirmation text
2019-12-30 10:36:31 +08:00
Rafał Mikrut
ed1c4bc77d Removed unused variables, add some constants numbers 2019-12-10 05:13:02 +01:00
gururise
caab6603d1 change step size of animation length EditSpinSlider to match minimum animation length 2019-11-25 12:30:10 -08:00
Tomasz Chabora
e9802d9b02 Fix animation key snapping at high zooms 2019-11-17 23:34:36 +01:00
PouleyKetchoupp
13c88878c4 Fixed cases where labels with autowrap can overflow the editor ui
Fixes #33155
2019-11-04 10:12:36 +01:00
Michael Alexsander
1594f22b4e Enhancements and fixes for the animation editor's copy track dialog 2019-10-21 12:40:23 -03:00
PouleyKetchoupp
bdb9149d7e Fixed missing argument for clear_selection signal in Bezier Curve editor
Also removed unused clear_selection signal in Animation Track editor (never emitted)

Fixes #32348
2019-09-25 19:35:21 +02:00
PouleyKetchoupp
87bb1515af Fixes in AnimationTrackEditor around bezier curves
- Undo add bezier track (#31695)
- Undo insert keys for several properties
- Insert keys for several properties using bezier curves (#31698)
- Insert keys for 2d rotation using bezier curve (#28429)
- Insert keys for existing bezier track (#31697)
- Auto-insert keys for bezier track (#31696)
- Number of tracks in insert keys confirmation message
2019-09-23 10:36:02 +02:00
Rémi Verschelde
9137a045ac
Merge pull request #32146 from YeldhamDev/key_bezier_int_real
Fix keying integer and float values from inspector not being able to use bezier curves
2019-09-20 17:35:03 +02:00
Rémi Verschelde
77ec3ec0a3
Merge pull request #32129 from YeldhamDev/fix_track_removal_errors
Fix errors in the animation editor when removing tracks via undo/redo
2019-09-20 17:28:15 +02:00
Michael Alexsander Silva Dias
c0acaab1aa Fix keying integer and float values from inspector not being able to use bezier curves 2019-09-15 08:59:43 -03:00
Michael Alexsander Silva Dias
5c2582ad34 Fix errors in the animation editor when removing tracks via undo/redo 2019-09-13 22:16:53 -03:00
Michael Alexsander Silva Dias
5f3a55acb7 Add informational messages to various editors 2019-09-04 12:37:11 -03:00
Hugo Locurcio
bd05d0e71b
Change mouse cursor when hovering a resize area in the animation editor
This also scales the default width of the track name column
on hiDPI displays.
2019-08-23 23:00:38 +02:00
Rémi Verschelde
40640a01dc
Merge pull request #31424 from Calinou/improve-animation-editor-timeline
Improve timeline drawing in the animation editor
2019-08-17 12:05:42 +02:00
Hugo Locurcio
a341c65f65
Improve timeline drawing in the animation editor
A small arrow-like icon is now drawn at the top of the timeline.
The timeline is now also wider as to be more visible.
2019-08-17 00:20:21 +02:00
Hugo Locurcio
108f9646f5
Add an outline to box selection rectangles for better visibility
This also refactors selection box color definitions
to avoid repetition.
2019-08-15 22:27:32 +02:00
Hugo Locurcio
4a28657cf5
Tweak range steps in the animation editor
This makes the step of the "frame" SpinBox larger, so that clicking
on the SpinBox arrows will make the number increase in a visible manner.
Previously, the full number was being cut off due to the SpinBox
being narrow.

This also makes the "step" SpinBox allow for more precise input.
2019-08-06 12:25:53 +02:00
Hugo Locurcio
8b12498f8b
Improve snapping in the animation editor
Snapping can now be toggled temporarily by holding the Ctrl key.
Toggling timeline snapping is now done with the "Snap" checkbox rather
than by setting the animation's "Step" setting to 0.

The timeline cursor can no longer exit the animation's boundaries
if the animation's "Step" is set to 0.
2019-08-06 01:44:10 +02:00
Michael Alexsander Silva Dias
3d9df3b2ed Fix undo problems with method and transform tracks in the animation editor 2019-07-24 11:29:51 -03:00
Michael Alexsander Silva Dias
97e18f03db Make possible to edit multiple keys in an animation again 2019-07-22 20:12:01 -03:00
Rémi Verschelde
9f5b77acc9
Revert "Expose "meta" to the Inspector" 2019-07-22 12:03:57 +02:00
Rémi Verschelde
3aeca70659
Merge pull request #30697 from bojidar-bg/6067-pale-customtype-script
Make custom types more subtle and more useful
2019-07-20 11:49:52 +02:00
Bojidar Marinov
4f72178868
Make custom types more subtle and more useful
Implements #6067 (aaronfranke's idea)
Fixes #26980
2019-07-19 22:33:58 +03:00
Rémi Verschelde
2ca3e47d66
Merge pull request #22642 from YeldhamDev/inspector_metadata
Expose "meta" to the Inspector
2019-07-19 14:39:23 +02:00
Hugo Locurcio
acbd0fea97
Use CheckBoxes in the editor instead of CheckButtons when applicable
CheckButtons should only be used if toggling them has an
immediate effect. Otherwise, CheckBoxes should be used.
2019-07-04 17:32:59 +02:00
jens
0f6c572db6 Make easier to select keys that are at position 0 in AnimationPlayer editor
Fixes #26151.

Co-Authored-By: Michael Alexsander Silva Dias <michaelalexsander@protonmail.com>
2019-07-03 12:56:36 -03:00
Rémi Verschelde
eaaff9da31
Merge pull request #29941 from qarmin/redundant_code_and_others
Remove redundant code, possible NULL pointers and others
2019-06-27 01:05:18 +02:00
qarmin
4e5310cc60 Some code changed with Clang-Tidy 2019-06-26 15:08:25 +02:00
Rémi Verschelde
b3d772ed83 Display invalid value keys in AnimationTrackEdit
Godot 2.1 and 3.0 had this feature but it was lost in the rewrite
of the animation editor in 3.1.
Drop unused KeyValid icon, since all valid keys now have a custom
type icon.
2019-06-23 19:52:49 +02:00
Rémi Verschelde
bf7a6f9c46
Merge pull request #29899 from Chaosus/select_all_tracks
Added button to select all tracks in track copy dialog
2019-06-19 20:04:54 +02:00
Chaosus
be7bd97cb0 Added button to select all tracks in track copy dialog 2019-06-19 15:10:48 +03:00
Chaosus
47e24dd1ee Fix animation keys selection with SHIFT/CTRL 2019-06-19 13:34:22 +03:00
Rémi Verschelde
cd22551d2d i18n: Sync translation template with current source 2019-06-16 22:08:53 +02:00
Michael Alexsander Silva Dias
bb1c5f5525 Enhancements for the audio bus editor 2019-06-09 00:23:08 -03:00
volzhs
fe98a31743 Sync Animation editor with Inspector 2019-05-31 06:50:14 +09:00
volzhs
e16e5012ca Revert "Fix AnimationPlayer editor length and step synchronization"
This reverts commit ca80ebe9f6.
2019-05-31 04:43:46 +09:00
Michael Alexsander Silva Dias
fad0338beb Make animation editor change tracks positions instead of swapping them 2019-05-27 22:03:26 -03:00
Michael Alexsander Silva Dias
757a1de58d Fix "Node not found:" error message when adding tracks 2019-05-25 15:30:53 -03:00
Rémi Verschelde
04ee4f45e5
Merge pull request #24771 from timoschwarzer/animation-player-editor-pos-drag-fix
Fix AnimationPlayer editor length and step synchronization
2019-05-24 15:21:47 +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
Timo Schwarzer
ca80ebe9f6
Fix AnimationPlayer editor length and step synchronization 2019-05-06 21:39:24 +02:00
Ben Hickling
a7ef836c69 Fixed a few issues with the bezier animation track editor, fixed the Travis CI errors, added TTR to bezier value labels and rounded them to 3 decimal points 2019-04-30 10:41:23 +01:00
Rémi Verschelde
e98ccaefe8
Merge pull request #28323 from homer666/animationplayer-imported-anim-warning
Warn when opening imported anim in Animation editor
2019-04-30 10:15:30 +02:00
homer666
e5c8e4019b Warn when opening imported anim in AnimationPlayer 2019-04-30 04:46:45 +10:00
homer666
62e0262951 Update edited keyframe's snap mode properly 2019-04-28 09:31:53 +10:00
Hein-Pieter van Braam
ad744cefb0
Merge pull request #28361 from homer666/animationplayer-fps-mode-fixes
AnimationPlayer FPS mode fixes
2019-04-25 23:09:47 +03:00
Rémi Verschelde
9fc84061dd i18n: Sync translation template with current source
(cherry picked from commit 23cf9f3b6f)
2019-04-25 14:31:13 +02:00
homer666
e3b7f9e1ca AnimationPlayer FPS mode fixes 2019-04-24 10:52:10 +10:00
homer666
659162ab98 Fix AnimationPlayer snap mode dropdown behaviour 2019-04-18 14:43:48 +10:00
Hugo Locurcio
c0959f00a0
Scale animation track editor line widths on hiDPI displays 2019-04-15 14:11:31 +02:00
Juan Linietsky
296c74072c Implement autokeying in Animation editor. 2019-04-15 00:49:03 -03:00
Juan Linietsky
8f762aefcd Oops I missed a line, continuation to 0d41f8f. 2019-04-15 00:05:27 -03:00
Juan Linietsky
0d41f8fb00 Avoid crash on changing snap mode when no animation exists, closes #28031 2019-04-15 00:02:17 -03:00
Juan Linietsky
caaa492133 Also show length in FPS when using FPS mode for AnimationPlayer editor 2019-04-14 23:48:53 -03:00
Juan Linietsky
4203266923 Add support for FPS snap in Animation Editor. 2019-04-14 16:43:38 -03:00
Anish
d6e4a08c61 Prevents a Null Reference in deleting Animations.
A null Animation would cause a crash by accessing restricted memory.
Solved by checking if the animation track is null before using the
animation.

Fixes: #26829
2019-03-11 17:04:02 +05:30
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
3ef8238c1c Make translatable some undo/redo operations in the editor 2019-02-21 16:41:01 -03:00