Commit graph

2142 commits

Author SHA1 Message Date
Rémi Verschelde
7bf9787921 SCons: Format buildsystem files with psf/black
Configured for a max line length of 120 characters.

psf/black is very opinionated and purposely doesn't leave much room for
configuration. The output is mostly OK so that should be fine for us,
but some things worth noting:

- Manually wrapped strings will be reflowed, so by using a line length
  of 120 for the sake of preserving readability for our long command
  calls, it also means that some manually wrapped strings are back on
  the same line and should be manually merged again.

- Code generators using string concatenation extensively look awful,
  since black puts each operand on a single line. We need to refactor
  these generators to use more pythonic string formatting, for which
  many options are available (`%`, `format` or f-strings).

- CI checks and a pre-commit hook will be added to ensure that future
  buildsystem changes are well-formatted.

(cherry picked from commit cd4e46ee65)
2020-06-10 15:30:52 +02:00
Phischermen
12786bcbdb Fix crash when creating new text file with no name
(cherry picked from commit cdb29447b4)
2020-06-10 15:30:52 +02:00
Aaron Franke
0b6a410890 Change the default editor camera rotation to position it in +X +Y +Z
(cherry picked from commit 6c2df6792b)
2020-06-10 15:30:52 +02:00
Hugo Locurcio
eb6c7ec09c Add an editor tooltip to document gizmo visibility options
See discussion in
https://github.com/godotengine/godot-proposals/issues/716.

(cherry picked from commit 138a4eecb3)
2020-06-10 15:30:52 +02:00
Marcus Brummer
f8463df11a Re-apply basis of newly added node (via drag-n-drop) in editor viewport 2020-06-07 19:34:17 +02:00
johan
48a4f7e3a7 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

(cherry picked from commit fea6ca20c9)
2020-06-05 12:44:45 +02:00
Aaron Franke
7021991cd9 Change OK text in snap dialog to OK
(cherry picked from commit 8f85858224)
2020-06-04 12:16:39 +02:00
Hugo Locurcio
6ea9ca14f0 Allow mouse zooming without hovering the texture in the TileSet editor
This partially addresses
https://github.com/godotengine/godot-proposals/issues/968.

(cherry picked from commit d10a5b2928)
2020-06-04 12:09:40 +02:00
Hugo Locurcio
6bbfed6400 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.

(cherry picked from commit def2059d67)
2020-06-04 12:09:40 +02:00
Rémi Verschelde
fa0cf25e19 Add shortcut for Pan Mode (G)
And change TileMap Bucket Fill shortcut to (B).

Fixes #8582.

(cherry picked from commit 28b33718b0)
2020-06-04 12:09:39 +02:00
Hugo Locurcio
e226947e21 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.

(cherry picked from commit 0c0ee427d2)
2020-06-04 12:09:38 +02:00
Dominik 'dreamsComeTrue' Jasiński
cf311f3e79 Fix moving 2D node with mouse after using arrow keys
Fixes: #38894
(cherry picked from commit 03b54f8a35)
2020-05-25 16:33:58 +02:00
JFonS
9828c6bc86 Keep mouse inside 3D viewport rotation widget
Hide and keep the mouse in place when the user oribts the scene via the 3D
rotation widget.

(cherry picked from commit 051f02a3a0)
2020-05-11 11:01:13 +02:00
Thakee Nathees
7d931bad58 rotation gizmo visible = false; when camera preview
(cherry picked from commit 60d67f13da)
2020-05-11 11:01:13 +02:00
janglee
d16abbdee4 Improved go-to definition (Ctrl + Click)
Co-Authored-By: Bojidar Marinov <bojidar.marinov.bg@gmail.com>
(cherry picked from commit be7a353c70)
2020-05-11 09:33:21 +05:30
Yuri Roubinsky
1f89c3bfeb (3.2) Some fixes for canvas item visual shader inputs 2020-05-05 12:21:25 +03:00
MrRevington
fcb6bd7611 Add AtlasTexture support in SpriteFrames Editor - Add Frames from a Sprite Sheet
(cherry picked from commit 13770ac08d)
2020-05-01 10:57:28 +02:00
Hugo Locurcio
cfd6bc7267 Don't focus the selection after using Align Transform With View
It made minor adjustments difficult as the camera moved every time
Align Transform With View was used.

This closes #36738.

(cherry picked from commit a636631e33)
2020-05-01 10:56:58 +02:00
Tom Evans
1f970670b7 Fixed shuffling editor help tabs
The indexes for the ScriptEditorItemData entries were not getting
updated after sorting. This would cause a page to be open but with a
different tab selected. Whenever _update_script_names was called next,
it would correct this indexing. Now we correct it immediately following
the tab sort.

(cherry picked from commit fe53c1b0bd)
2020-05-01 10:56:58 +02:00
Rémi Verschelde
8d93303483
Merge pull request #37863 from ExpiredPopsicle/culling5
Fixed false positives in the culling system.
2020-04-30 08:05:11 +02:00
Kiri Jolly
bac44ee19f Fixed false positives in the culling system.
This fixes numerous false positives coming out of the culling system.

AABB checks are now a full separating-axis check against the frustum, with the points of the frustum being compared to the planes of the box just as the points of the box were being compared to the planes of the frustum. This fixes large objects behind the camera not being culled correctly.

Some systems that used frustums that were (sometimes mistakenly?) unbounded on one or more side have been modified to be fully enclosed.
2020-04-28 17:14:06 -07:00
Hugo Locurcio
93555d9ccc Add editor freelook navigation scheme settings
Depending on what one is trying to achieve, a different freelook mode
may be more desirable.

This closes #34034.

(cherry picked from commit 8a48fb3517)
2020-04-27 10:12:55 +02:00
dankan1890
a5bbd13794 Fixed output prints " Signal 'node_removed' is already connected " when the editor settings window is closed.
Close #38012

(cherry picked from commit ef08e64afb)
2020-04-23 11:13:33 +02:00
jfons
add8d1b9df Update Joint gizmos automatically
(cherry picked from commit 3e77b6d49d)
2020-04-23 11:07:32 +02:00
Hugo Locurcio
679474c576 Tweak the built-in script naming for resources with custom names
This makes the script name appear before the scene file name,
which ensures it's always visible even if the list of scripts is too
narrow to display the full name.

This only impacts built-in scripts with custom resource names.
Unnamed resources will still use `<scene_file>::<id>` naming
in the list of scripts.

(cherry picked from commit e90beade15)
2020-04-16 12:57:22 +02:00
Eric M
e2c9cbb79f Added selection outline to locked nodes.
(cherry picked from commit 7f5fb73146)
2020-04-16 12:57:22 +02:00
Vasiliy
cf135e3723 Add "preview_on_sphere" setting of material editor plugin
(cherry picked from commit 48b144afb7)
2020-04-16 12:03:02 +02:00
Tomasz Chabora
472b0e0d34 Properly handle node remove via undo
(cherry picked from commit 37ffb40047)
2020-04-16 11:56:50 +02:00
Andrea Catania
a51e78528f Fixed IK rotation issue
(cherry picked from commit 277696d6c5)
2020-04-16 11:42:07 +02:00
Hugo Locurcio
b5d41bb517 Remove Request Docs button in the script editor due to various issues
The Request Docs button is partly responsible for layout overflow
issues on narrow displays, such as #31133.

It also tended to attract spam and low-effort issues that were
difficult to act upon. A "Send Docs Feedback" menu option has been added
to replace it.

(cherry picked from commit 2f6f029a75)
2020-04-16 11:16:08 +02:00
Rémi Verschelde
218ae1e7a2
Merge pull request #37595 from ExpiredPopsicle/18809_flickering_ortho_fix
Othographic camera in-editor now uses Z near/far instead of hardcoded value
2020-04-10 17:16:49 +02:00
dankan1890
657f12edcc TextureRegion: fixed Autoslice not created/updated properly.
(cherry picked from commit 671e97d254)
2020-04-06 18:17:19 +02:00
Kiri Jolly
26912c15e6 Othographic camera in-editor now uses Z near/far settings instead of a hardcoded value
Fixes #18809.

The in-editor ortho camera used a far clipping plane of 8192 units, and was
placed 4096 units away from the camera cursor.

This was far enough to cause culling issues from floating point precision loss
on objects smaller than one unit.

This change modifies the near/far clipping planes of the ortho camera to use
those specified in the editor (and currently used by the perspective camera).
The frustum is still centered around the camera cursor location, as it was
before.
2020-04-04 16:16:11 -07:00
simpuid
a10a21f407 Fixes transform gizmo position when node has default transform
Changes made:
* Added dirty bit for SpatialEditorSelectedItem's last_xform
* SpatialEditorViewport checks that dirt bit too before skipping the selection

(cherry picked from commit 19825436d4)
2020-03-25 11:38:53 +01:00
johan
31fb54742b Editor 2D: Change pixel alignment strategy, fix jittering in high zoom
Alignment of scene pixels on screen pixel ensure a crisp rendering of small features (such as text). Unfortunately, alignment of top left pixel on screen adds a lot of jittering when zooming at high zoom factor.

This change allow to snap the top left scene pixel on the closest screen pixel (not only the top-left most), and we do so only when the scale factor is an integer.

(cherry picked from commit 1c02906a6f)
2020-03-25 11:38:53 +01:00
JFonS
4d85f70015 Update all editor viewports after settings changes
(cherry picked from commit 55b478afd9)
2020-03-25 11:30:49 +01:00
JFonS
784ff23adc Fix rotation gizmo for empty Spatials
The AABB for an empty Spatial has 0 size, since the stored and
compared Transform was scaled by the AABB size, it would completely
destroy the rotation information. If there is no rotation
information, the gizmo doesn't update when the rotation changes.

(cherry picked from commit a0af3094b4)
2020-03-25 11:30:49 +01:00
volzhs
644d49b156 Update snap setting only with OK
restore previous values with cancel

(cherry picked from commit 667a981d4d)
2020-03-25 11:30:48 +01:00
jfons
5b4251695a Add rotation widget to 3D viewport 2020-03-09 09:40:10 +01:00
Hugo Locurcio
6488570251 Fix a typo in the "Create Single Convex Collision Sibling" option
(cherry picked from commit 7348dfb5b7)
2020-03-04 12:40:14 +01:00
Hugo Locurcio
73240f81d0 Decrease the script editor's default split width to 70
This also makes its value change to match the editor scale.

(cherry picked from commit ac3c93077c)
2020-03-04 12:40:14 +01:00
janglee
56437cddeb Make orthogonal view mode persistent in new scene
Fixes #36339.

(cherry picked from commit d3c580f0bc)
2020-02-20 07:59:45 +01:00
Hugo Locurcio
06344ac10d Increase the width of the "Connections to method" dialog
This closes #36245.

(cherry picked from commit 5c659dd399)
2020-02-18 14:20:18 +01:00
Michael Alexsander
ba15e5355b Fix problems with concave shapes in the TileSet editor
(cherry picked from commit eeb972faef)
2020-02-14 16:07:58 +01:00
Tomasz Chabora
f0c89048d8 Allow to use arrow keys with TOOL_MOVE
(cherry picked from commit 18918b4efa)
2020-02-14 16:07:17 +01:00
Hugo Locurcio
e834e35ea8 Change the Pick Tile and Select default shortcuts in the TileMap editor
The new default keys were chosen to match common graphics editing
software. A modifier is no longer required to use the Select tool,
making it faster to use.

This closes #34170.

(cherry picked from commit 88213b54ba)
2020-02-14 16:04:39 +01:00
Hugo Locurcio
93b99f2c89 Update the zoom percentage when using Frame Selection in the 2D editor
This closes #36019.

(cherry picked from commit 3e95b79b65)
2020-02-14 16:03:49 +01:00
Yuri Roubinsky
77deae41fb Few enchancements for shader editor
(cherry picked from commit 24368206ca)
2020-02-14 16:00:45 +01:00
Hugo Locurcio
3eb9780179 Re-add a way to generate a single convex shape from the editor
It was removed after the implementation of VHACD. Generating a single
shape can lead to better performance, so it may still be desired.

This also adds tooltips for several options in the Mesh menu.

This closes #35692.

(cherry picked from commit 90af009f2e)
2020-02-14 15:58:03 +01:00
Haoyu Qiu
3c7a013d8d Adds pan and zoom gestures to TextureRegion editor
(cherry picked from commit d1b1edba84)
2020-02-14 15:57:18 +01:00