Commit graph

2126 commits

Author SHA1 Message Date
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
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