Commit graph

2173 commits

Author SHA1 Message Date
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
Eric Rybicki
63daa19538 Use a new approach to fix bone pose override not being reset when IK animation is stopped.
This reverts PR #35460 & commit 551c37167b.

(cherry picked from commit bb0358dd8d)
2020-02-14 15:55:47 +01:00
Haoyu Qiu
012f8ffb36 Shortens minimum height of script editor windows
(cherry picked from commit 6785e199bb)
2020-02-06 13:02:08 +01:00
Haoyu Qiu
ca537dea76 Fixes invalid read when using fill tool in empty tilemap 2020-01-27 20:39:49 +08:00
Tan Wang Leng
ee2f406c73 Fix wrong guideline values shown during dragging
Suppose that the user wants to use some guidelines in 2D mode. The
user has enabled "Use Pixel Snap", and configured the "Grid Step" to
1px.

On some zoom levels, when dragging the guidelines step by step, some
offsets shows the wrong value. The offsets that are wrong vary - it is
affected by the zoom level, so some zoom levels do not display this
problem.

For example, a user may see this while dragging the guideline:

0px   1px   1px   3px   4px   5px   5px   7px   8px

whereby 2px and 6px are missing.

This is due to a floating-point error. The values are printed as
(truncated) integers, but they are actually decimals, so they were
actually 1.9999 and 5.9999 for the missing cases.

Let's fix that by rounding up the values before printing them to get rid
of the errors.

This fixes #35010.
2020-01-24 23:52:43 +08:00
Haoyu Qiu
b420618c46 Fixes scrollbar positions on HiDPI display
* TextureRegion editor
* Ploygon2D UV editor
2020-01-23 08:55:52 +08:00
Rémi Verschelde
37897dba80
Merge pull request #35406 from lawnjelly/ortho-shadow
Replace CameraMatrix::get_viewport_size with get_viewport_half_extents, shadow culling with ortho camera and other affected issues
2020-01-22 22:02:09 +01:00
Rémi Verschelde
91b0be18dc
Merge pull request #35421 from williamd1k0/improve-top-animation-menu
Use an icon in the top Animation Key menu
2020-01-22 21:21:15 +01:00
William Tumeo
cb3fcba99f Use an icon in the top Animation Key menu 2020-01-22 17:06:40 -03:00
lawnjelly
eaf8e5ce52 Change CameraMatrix::get_viewport_size to get_viewport_half_extents
Fixes #26637.
Fixes #19900.

The viewport_size returned by get_viewport_size was previously incorrect, being half the correct value. The function is renamed to get_viewport_half_extents, and now returns a Vector2.

Code which called this function has also been modified accordingly.

This PR also fixes shadow culling when using ortho cameras, because the correct input for CameraMatrix::set_orthogonal should be the full HEIGHT from get_viewport_half_extents, and not half the width.

It also fixes state.ubo_data.viewport_size in rasterizer_scene_gles3.cpp to be the width and the height of the viewport in pixels as stated in the documentation, rather than the current value which is half the viewport extents in worldspace, presumed to be a bug.
2020-01-22 18:22:00 +00:00
Rémi Verschelde
4faaf6089a Remove unused #if 0'ed code 2020-01-21 21:41:54 +01:00
Eric Rybicki
99346e9654 Fix asset library video play overlay not being centered on the thumbnail 2020-01-21 08:04:32 +01:00
Rémi Verschelde
709665b15d
Merge pull request #35379 from dankan1890/quick_fix
TextureRegionEditor: Corrected typo
2020-01-20 21:34:02 +01:00
dankan1890
a2170dcd40 TextureRegionEditor: Corrected typo 2020-01-20 20:58:42 +01:00
Rémi Verschelde
c3fd1012de
Merge pull request #35351 from ericrybick/32342-Resize-snapping-lines-bug
Fix editor drawing snapping lines for wrong edge/corner when resizing elements with smart snapping enabled
2020-01-20 12:57:44 +01:00
Eric Rybicki
b91b26d073 Fix editor drawing snapping lines for wrong edge/corner when resizing elements with smart snapping enabled
fixes #32342
2020-01-20 08:03:20 +01:00
Rémi Verschelde
e8dc581bfc
Merge pull request #35303 from timothyqiu/hidpi-anitreeplayer
Fixes AnimationTreePlayer editor UI on HiDPI
2020-01-19 10:21:20 +01:00
Rémi Verschelde
d7072e9cd4
Merge pull request #35273 from dankan1890/quick_fix
AssetLibrary layout fix
2020-01-19 10:13:31 +01:00
Rémi Verschelde
7522aa80c2
Merge pull request #35295 from N0hbdy/animation-editor-line-edit-fix
Fix AnimationTree Editor by using CONNECT_DEFERRED on LineEdit
2020-01-19 09:32:00 +01:00
Haoyu Qiu
2db685da09 Fixes AnimationTreePlayer editor on HiDPI
* The minimum editor size
* The position of buttons and status text
2020-01-19 10:20:53 +08:00
Hugo Locurcio
c9aca9ef81
Clamp the editor scale to 1 when resetting zoom in the 2D editor
This closes #35294.
2020-01-18 22:26:21 +01:00
N0hbdy
3fffb1c031 Fix AnimationTree Editor by using CONNECT_DEFERRED on LineEdit
Not having this causes the LineEdit to be deleted while still processing
signals, which can cause a crash during focus changes.

Fixes 35293
2020-01-18 12:12:13 -08:00
dankan1890
29daba5b0c AssetLibrary when the download size is unknown:
hidden progress bar
added in the description the downloaded bytes
Fixes #35267
2020-01-18 21:07:51 +01:00
Yuri Roubinsky
41acb1f6ba Fix minimap updating in shader tab 2020-01-18 12:31:33 +03:00
Hugo Locurcio
8bce0b6176
Mark alternate editor display modes as disabled in the GLES2 renderer
This partially addresses #27018.
2020-01-17 16:06:47 +01:00
Rémi Verschelde
05e042b06f
Merge pull request #34879 from Phischermen/canvas-item-editor-local-space-mode
Fix issue regarding rotating Canvas Items in editor
2020-01-16 23:10:41 +01:00
andrycodestuffs
d0b3cb89f7 Fixed unknown symbol drawn instead of tabs in breakpoints/bookmarks lists
Tab characters were not rendered properly in the breakpoints and
bookmarks lists of the script editor if the bookmarked line was a
comment, resulting in unknown ASCII symbols “�”.

Fixes #34046.

Also changed formatting a bit to enclose the code in backticks (like in
Markdown) instead of quotes.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2020-01-16 13:50:30 +01:00
Haoyu Qiu
43ad6e8c96 Fixes AssetLib crash when JPG module is disabled
JPG module is optional, so check it's existence before using.
2020-01-15 22:16:12 +08:00
Michael Alexsander
34bf81fa7c Cleanup unnecessary code from before the scrollbar overlapping fixes 2020-01-14 18:19:12 -03:00
Rémi Verschelde
8f103b1b69
Merge pull request #34801 from Calinou/add-3d-viewport-crosshair
Add a crosshair to the 3D viewport
2020-01-14 21:02:35 +01:00
Phischermen
becd1fd1d8 Fix issue regarding rotation
Canvas items will now rotate correctly no matter what their global scale happens to be.
2020-01-14 07:26:34 -08:00
Michael Alexsander
e69593842e Fix more scrollbar anchorings 2020-01-14 08:25:55 -03:00
Michael Alexsander
712cd8a97e Fix more instances of overlapping scrollbars 2020-01-13 22:49:17 -03:00
Hugo Locurcio
2b9f34b867
Add a crosshair to the 3D viewport
The crosshair makes freelook navigation a bit easier, while making it
clearer that it's possible to select nodes by clicking while in
freelook mode.

The crosshair is only displayed while in freelook mode.
It uses an icon designed to be visible on any background.
2020-01-13 22:30:34 +01:00
Rémi Verschelde
4a95186b4b Animation editor: Set resource name when duplicating
Fixes #25156.
2020-01-13 13:22:06 +01:00
Hugo Locurcio
929dfe1bcc
Clamp the editor scale to 1 for 2D zoom operations
Some people set the editor scale below 1 to fit more content on
screen, even if their display doesn't have a particularly low DPI.

This closes #35059.
2020-01-13 12:16:27 +01:00
Hugo Locurcio
2f56146242
Increase the size of the item list editor popup
This makes it easier to edit large amounts of items.

This partially addresses
https://github.com/godotengine/godot-proposals/issues/368.
2020-01-12 18:19:39 +01:00
Haoyu Qiu
65e2230f6e Fixes min size of various editor plugins on HiDPI
* AnimationTree
* AudioStream
* ResourcePreloader
* ShaderEditor
* VisualShaderEditor
2020-01-12 15:24:15 +08:00
Rémi Verschelde
4b83bbd463
Merge pull request #34937 from YeldhamDev/scriptdiag_disable_load
Add option to disable loading scripts in ScriptCreateDialog
2020-01-10 08:18:51 +01:00
Michael Alexsander
34f1dbaf28 Fix TileSet editor's workspace size sometimes not changing correctly on region change 2020-01-10 00:57:49 -03:00
Michael Alexsander
8708d44a50 Add option to disable loading scripts in ScriptCreateDialog 2020-01-09 13:09:23 -03:00
Haoyu Qiu
93aa3a0126 Fixes TextureRegion editor drag handle for HiDPI
Before this fix, it's easy to miss the drag handle on a HiDPI monitor.
2020-01-09 13:45:53 +08:00
Rémi Verschelde
41c8ec991f
Merge pull request #34802 from xelivous/power-of-two-is-good
Change the 2D editor's snap to 8x8 by default
2020-01-08 08:51:58 +01:00
Michael Alexsander
f9d11120f7 Minor fixes for ScriptCreateDialog 2020-01-08 02:02:34 -03:00
Haoyu Qiu
cca03b57ff Fixes scaled scrolling of TextureRegion editor 2020-01-05 19:52:21 +08:00
Hugo Locurcio
948cb84e37
Take the editor scale into account for 2D zoom operations
The zoom level displayed is now relative to the editor scale.
This means that with an editor scale of 200%, the 100% zoom level
will actually be 200% as it's multiplied by the editor scale.
This prevents things from looking too small when opening a project
on an hiDPI display.

This matches the behavior found in most image editors out there.
2020-01-04 18:43:52 +01:00
Haoyu Qiu
78e9ca58af Makes more strings translatable 2020-01-04 13:46:38 +08:00
xelivous
64ae7feaa4 Change the 2D editor's snap to 8x8 by default 2020-01-03 19:23:49 -06:00
Rémi Verschelde
c0ece451e3
Merge pull request #34720 from Calinou/light-gizmo-color-by-light
Tint 3D light gizmos using the light's color
2020-01-02 13:59:10 +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
Hugo Locurcio
ac18665c88
Tint 3D light gizmos using the light's color
This makes navigation more convenient in the 3D viewport, especially
when using the unshaded display mode.
2020-01-01 00:54:25 +01:00
Rémi Verschelde
870b5ba2dc
Merge pull request #34695 from timothyqiu/show-in-file-system
Checks script path before show in filesystem
2019-12-30 18:15:29 +01:00
Rémi Verschelde
e37ad996a1
Merge pull request #34625 from timothyqiu/i18n
Makes more editor strings translatable
2019-12-30 17:28:11 +01:00
Rémi Verschelde
e1e2ffcfa1
Merge pull request #34613 from timothyqiu/edscale-again
Fixes Theme Editor minimum height on HiDPI monitor
2019-12-30 16:39:41 +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
Haoyu Qiu
9ae39be64f Checks script path before show in filesystem 2019-12-30 09:49:52 +08:00
Haoyu Qiu
7f18560f3c Fixes Theme Editor minimum height on HiDPI monitor
* Applies `EDSCALE` to the minimum size
2019-12-26 15:51:23 +08:00
Haoyu Qiu
078c0d75f2 Cleans up headers included in editor_node.h 2019-12-24 21:46:05 +08:00
Rémi Verschelde
f7d8dd79e9
Merge pull request #34441 from KoBeWi/wrapping_things_up
Fix code editor not always centering to bookmarks
2019-12-22 12:34:03 +01:00
Haoyu Qiu
0693718164 Makes more editor strings translatable
* "Add" button text in Groups Editor
* "Receiver Method" in Connect Signal Dialog
* "Play Mode" in Animation State Machine Editor
* "Mesh Library" button text in Mesh Library editor plugin
* Compose Array node button texts in Visual Script
* Various button texts in TileSet Editor
* Various Run Script errors
2019-12-21 20:58:17 +08:00
Rémi Verschelde
981c6aa102
Merge pull request #34445 from JFonS/fix_13364
Fix selection on 3D viewport with half resolution
2019-12-19 14:47:34 +01:00
JFonS
8da8518ba3 Fix selection on 3D viewport with half resolution 2019-12-19 12:53:20 +01:00
Rémi Verschelde
8189f23e8c
Merge pull request #34437 from Chaosus/fix_toggle_scripts4
Fix ScriptTextEditor encapsulation
2019-12-19 12:19:29 +01:00
Yuri Roubinsky
c89df816c1 Fix ScriptTextEditor encapsulation 2019-12-19 09:30:40 +03:00
Haoyu Qiu
72f392a135 Fixes Curve Editor margin 2019-12-19 11:02:26 +08:00
Tomasz Chabora
b8bbf5a55f Fix code editor not always centering to bookmarks 2019-12-18 21:58:47 +01:00
volzhs
2fa9585bdf Fix error log when selecting child of Containers 2019-12-19 00:04:10 +09:00
Yuri Roubinsky
03928c5b36 Fix toggle scripts panel to allow using shortcut in other areas 2019-12-17 17:23:29 +03:00
Yuri Roubinsky
bb7b614da1 Prevent showing toggle scripts panel switch in shader editor 2019-12-17 11:19:43 +03:00
Rémi Verschelde
01a6223226
Merge pull request #34364 from Chaosus/toggle_scripts_panel
Moves switch for show scripts panel from File menu to status bar
2019-12-17 07:58:21 +01:00