Commit graph

2355 commits

Author SHA1 Message Date
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
Yuri Roubinsky
cb9cbf840d Added Texture2DArray support to visual shaders 2020-06-19 18:02:05 +03:00
Sl3dge78
d731f43794 Autofilled path gets set properly on animation subresources 2020-06-19 01:22:36 +02:00
Rémi Verschelde
4e0f31a67c
Merge pull request #39638 from mrushyendra/editor_preview
Fix editor texture preview for certain specific dimensions
2020-06-18 11:59:45 +02:00
Maganty Rushyendra
c7a8dc7bb9 Fix editor texture preview for certain specific dimensions
Ensures no error is issued when attempting to preview a resource that
may be scaled down to <1 pixel when resizing to fit the thumbnail.
2020-06-18 17:21:42 +08:00
Rémi Verschelde
a8fce16b2f
Merge pull request #39626 from bojidar-bg/x-tileset-editor-crash
Fix a random crash in the TileSet editor
2020-06-18 09:55:03 +02:00
Bojidar Marinov
7850d0316f
Fix a random crash in the TileSet editor
Occurred when selecting polygon collision mode, then drawing a single point, then selecting rectangle mode, and finally trying to select a rectangle.
2020-06-17 22:08:51 +03:00
Hugo Locurcio
4a542e0007
Restore previous mouse position when leaving the editor freelook mode
- Remove the crosshair as it no longer serves a purpose (the cursor will
  now appear where the user "expects" it to).

This closes https://github.com/godotengine/godot-proposals/issues/1076.
2020-06-17 20:02:46 +02:00
Rémi Verschelde
9d23391072
Merge pull request #39517 from Calinou/editor-display-freelook-speed-zoom
Display freelook speed and zoom in units in the 3D editor viewport
2020-06-16 12:44:25 +02:00
Hugo Locurcio
eaae50fe4a Display freelook speed and zoom in units in the 3D editor viewport
Now that the 3D editor grid is infinite and adjusts its step automatically,
this helps people get a better sense of scale when moving around in the
3D viewport.

This also fixes the indicator bar drawing on hiDPI displays.
2020-06-16 10:46:01 +02:00
Rémi Verschelde
8db8577f10
Merge pull request #39126 from TwistedTwigleg/GSOC_2020_Working_Branch
Skeleton and Skeleton inspector low-level changes
2020-06-16 09:30:22 +02:00
TwistedTwigleg
24905becb2 Made low level changes to the Skeleton3D class and Skeleton3D inspector. Changes listed below:
* Added helper functions to Skeleton3D for converting transforms from bone space to global space, and vice versa.
* Updated the Skeleton3D class reference.
* Changed the icon used for bones in the Skeleton3D inspector to use BoneAttachement3D's icon.
* Changed the Skeleton3D inspector to use EditorPropertyTransform and EditorPropertyVector3 when possible.
* Placed the Transform/Matrix for each bone in a sub-section, so it is visually similar to the Node3D inspector.
2020-06-15 17:18:06 -04:00
Sawrr
d7a3395332 Unhide Skeleton3D menu button 2020-06-14 16:58:10 -04:00
Phischermen
cdb29447b4 Fix crash when creating new text file with no name 2020-06-09 12:59:59 -07:00
Rémi Verschelde
ae21b5ddad
Merge pull request #39372 from aaronfranke/editor-cam-rot
Change the default editor camera rotation to position it in +X +Y +Z
2020-06-09 14:11:30 +02:00
Rémi Verschelde
67f56ff73a
Merge pull request #39365 from Calinou/editor-gizmos-visibility-tooltip
Add an editor tooltip to document gizmo visibility options
2020-06-08 08:24:55 +02:00
Marcus Brummer
41af859c68 Re-apply basis of newly added node (via drag-n-drop) in editor viewport 2020-06-07 22:09:41 +02:00
Aaron Franke
6c2df6792b
Change the default editor camera rotation to position it in +X +Y +Z 2020-06-07 13:36:04 -04:00
Hugo Locurcio
138a4eecb3
Add an editor tooltip to document gizmo visibility options
See discussion in
https://github.com/godotengine/godot-proposals/issues/716.
2020-06-07 18:31:17 +02:00
johan
fea6ca20c9 2D Editor: modified zoom increment to the twelveth root of two
- properly visit power of 2 factors (50%, 100%, 200%...)
- index based zoom values to prevent floating point issues
- Fix 2d editor not able to reach min and max zoom values
2020-06-04 21:48:55 -04:00
Rémi Verschelde
f1d9d50da1
Merge pull request #39154 from dreamsComeTrue/sync-script-change-remember
Preserving "Sync Scene Changes" & "Sync Script Changes" with Project Settings
2020-06-04 11:11:35 +02:00
Rémi Verschelde
9a44dd6e1e
Merge pull request #39167 from Calinou/tileset-editor-zoom-mouse-wheel-anywhere
Allow mouse zooming without hovering the texture in the TileSet editor
2020-06-03 22:48:39 +02:00
Rémi Verschelde
8fc6766d72
Merge pull request #39165 from Calinou/tilemap-editor-zoom-mouse-wheel
Implement zooming using Ctrl + Mouse wheel in the TileMap editor
2020-06-03 22:48:22 +02:00
Rémi Verschelde
176e6a0be3
Merge pull request #39262 from aaronfranke/ok
Change OK text in snap dialog to OK
2020-06-03 22:47:18 +02:00
Rémi Verschelde
b1b49d966d
Merge pull request #39009 from Calinou/improve-script-editor-warnings-text
Improve the text appearance in the script editor warnings panel
2020-06-03 22:44:37 +02:00
Hugo Locurcio
def2059d67
Implement zooming using Ctrl + Mouse wheel in the TileMap editor
This was previously implemented in the GridMap editor. This makes
the same feature available in the TileMap editor.
2020-06-03 22:17:13 +02:00
Hugo Locurcio
d10a5b2928
Allow mouse zooming without hovering the texture in the TileSet editor
This partially addresses
https://github.com/godotengine/godot-proposals/issues/968.
2020-06-03 22:16:36 +02:00
Aaron Franke
8f85858224
Change OK text in snap dialog to OK 2020-06-03 10:55:03 -04:00
Dominik 'dreamsComeTrue' Jasiński
72501ae104 Preserving "Sync Scene Changes' and "Sync Script Changes" with Project Settings
Fixes: #38739
2020-06-03 12:28:00 +02:00
Andrii Doroshenko (Xrayez)
9bb070b030 Move RayShape2D implementation into its own translation unit 2020-06-01 01:52:07 +03:00
Rémi Verschelde
1620669f4e
Merge pull request #39051 from Xrayez/geometry-split
Split `Geometry` singleton into `Geometry2D` and `Geometry3D`
2020-05-29 12:10:37 +02:00
Andrii Doroshenko (Xrayez)
69d5de632e Split Geometry singleton into Geometry2D and Geometry3D
Extra `_2d` suffixes are removed from 2D methods accoringly.
2020-05-27 14:28:34 +03:00
Rémi Verschelde
9dc96c0dd8
Merge pull request #39062 from akien-mga/du-pain-et-des-jeux
Add shortcut for Pan Mode (G)
2020-05-27 12:55:34 +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
Rémi Verschelde
28b33718b0 Add shortcut for Pan Mode (G)
And change TileMap Bucket Fill shortcut to (B).

Fixes #8582.
2020-05-26 15:31:32 +02:00
Hugo Locurcio
0c0ee427d2
Improve the text appearance in the script editor warnings panel
- Make the Ignore button's position identical across all warnings
  by moving it to the left.
- Change the Ignore button's text and color to make it more obvious
  that it can be clicked.
- Use the editor font instead of the default project font to match
  the rest of the editor.
2020-05-24 14:30:44 +02:00
Aaron Franke
8879625879
Dynamic infinite 3D grid
Well, infinite for all intents and purposes.
2020-05-22 19:43:59 -04: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
Dominik 'dreamsComeTrue' Jasiński
03b54f8a35 Fix moving 2D node with mouse after using arrow keys
Fixes: #38894
2020-05-21 14:50:35 +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
710b34b702 Style: Fix missing/invalid copyright headers 2020-05-14 16:54:54 +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
1f6f364a56 Port member initialization from constructor to declaration (C++11)
Using `clang-tidy`'s `modernize-use-default-member-init` check and
manual review of the changes, and some extra manual changes that
`clang-tidy` failed to do.

Also went manually through all of `core` to find occurrences that
`clang-tidy` couldn't handle, especially all initializations done
in a constructor without using initializer lists.
2020-05-14 10:01:56 +02:00
Fabio Alessandrelli
d79e28c302 Support multiple debug protocols. 2020-05-12 15:09:13 +02:00
Rémi Verschelde
83b630b8c2 thirdparty: Cleanup after #38386, document provenance and copyright
Also renamed `delaunay.h` to `delaunay_2d.h` to match the class name.
2020-05-11 14:50:06 +02:00
Juan Linietsky
1bea8e1eac New lightmapper
-Added LocalVector (needed it)
-Added stb_rect_pack (It's pretty cool, we could probably use it for other stuff too)
-Fixes and changes all around the place
-Added library for 128 bits fixed point (required for Delaunay3D)
2020-05-10 15:59:09 -03:00
Rémi Verschelde
94721f5ab8 Revert "Renamed plane's d to distance"
This reverts commit ec7b481170.

This was wrong, `d` is not a distance but the `d` constant in the
parametric equation `ax + by + cz = d` describing the plane.
2020-05-10 16:47:11 +02:00
Rémi Verschelde
69de7ce38c Style: clang-format: Disable AllowShortCaseLabelsOnASingleLine
Part of #33027.
2020-05-10 13:13:54 +02:00