Commit graph

6666 commits

Author SHA1 Message Date
Yuri Sizov 9b228f0f5d Put multiple colons back into translated strings 2021-07-31 20:18:24 +03:00
Haoyu Qiu a3b221e99f Make action names translatable 2021-07-31 22:19:47 +08:00
Hugo Locurcio 1ed24ca548
Highlight context menu items at the top of the 2D/3D viewports
This makes it easier to notice that some menu items only appear when
specific nodes are selected.

This change applies to both 2D and 3D editors, including both plugin-based
menus and the hardcoded 2D layout/animation contextual menus.
2021-07-31 01:50:50 +02:00
Rémi Verschelde 504f47eaec
Merge pull request #47222 from dreamsComeTrue/anim-track-improv
[3.x] Make Animation's SceneTreeDialog filter nodes properly
2021-07-30 23:42:55 +02:00
PouleyKetchoupp e0e9f575ae Refactor layer property editor grid
- Now able to display up to 32 layers in physics (still 20 for render)
- Adjustable grid size to fit available space in dock
- Expansion icon to display more layers vertically
- Layer numbers in cells to help with selection
2021-07-30 11:43:04 -07:00
Rémi Verschelde 9735f2803c
Merge pull request #46800 from The-O-King/normal_compression
[3.x] Implement Octahedral Map Normal/Tangent Attribute Compression
2021-07-30 17:34:47 +02:00
Omar El Sheikh d274284069 Octahedral Normal/Tangent Compression
Implement Octahedral Compression for normal/tangent vectors
*Oct32 for uncompressed vectors
*Oct16 for compressed vectors

Reduces vertex size for each attribute by
*Uncompressed: 12 bytes, vec4<float32> -> vec2<unorm16>
*Compressed: 2 bytes, vec4<unorm8> -> vec2<unorm8>

Binormal sign is encoded in the y coordinate of the encoded tangent

Added conversion functions to go from octahedral mapping to cartesian
for normal and tangent vectors

sprite_3d and soft_body meshes write to their vertex buffer memory
directly and need to convert their normals and tangents to the new oct
format before writing

Created a new mesh flag to specify whether a mesh is using octahedral
compression or not
Updated documentation to discuss new flag/defaults

Created shader flags to specify whether octahedral or cartesian vectors
are being used

Updated importers to use octahedral representation as the default format
for importing meshes

Updated ShaderGLES2 to support 64 bit version codes as we hit the limit
of the 32-bit integer that was previously used as a bitset to store
enabled/disabled flags
2021-07-30 10:29:09 -04:00
Hugo Locurcio 10ef55ce23
Use bullet points in the editor instead of dashes where relevant 2021-07-28 19:47:11 +02:00
Hugo Locurcio 8f891535d0
Improve MeshInstance3D UV preview in the editor
- Use background and line colors that match better with the
  rest of the editor.
- Use translucent lines to make overlapping lines visible.
- Tweak the error message to mention the UV layer in question
  when there is no UV for a defined layer.

(cherry picked from commit 8cdfd2e706)
2021-07-28 15:37:40 +02:00
Hugo Locurcio 8fc99ef680
Improve the 3D editor manipulation gizmo
- Allow some tolerance when clicking the plane move/scale,
  even if the click is actually slightly outside the plane
  (similar to Blender).
- Make the rotate manipulation circles visually thinner to be
  less distracting.
- Make the hovered color less saturated to be more distinguishable
  from the non-hovered state.
  - Don't set brightness above 1.0 to prevent the gizmo from glowing
    when hovered.

(cherry picked from commit 6cfcbbbb93)
2021-07-28 15:35:35 +02:00
Rémi Verschelde fddc370b2b
Merge pull request #50837 from Calinou/3d-editor-camera-preview-add-shortcut-3.x
Add shortcut to toggle the 3D editor's camera preview (3.x)
2021-07-27 13:34:35 +02:00
Rémi Verschelde b358a71a38
Merge pull request #50817 from KoBeWi/gg_ez_rects
[3.x] Allow for easier editing of rect CollisionShape2D
2021-07-27 13:34:29 +02:00
Rémi Verschelde 7d425d2c77
Merge pull request #50911 from lawnjelly/portals_editor_colors
Portals - Gizmo colors added to editor settings
2021-07-27 13:08:03 +02:00
SaracenOne 462231e297
Removing bounding box calculations from 3D scene drag and drop and collide against physics rather than visual geometry.
(cherry picked from commit fbda490d0f)
2021-07-27 11:58:36 +02:00
lawnjelly cb39b3d77c Portals - Gizmo colors added to editor settings
Make the portal and room gizmo colors user definable.
2021-07-26 20:09:22 +01:00
Rémi Verschelde 52df2940bc
i18n: Sync translations with Weblate
(cherry picked from commit c406c8512f)
2021-07-26 16:23:20 +02:00
Rémi Verschelde 2ae4748816
Revert "Fix Illegible text in audio bus editor 3.x"
This reverts commit d2cbf331ce.

Fixes #50890.
2021-07-26 16:14:17 +02:00
foxydevloper f2cdacd3a6
Improve select tool's tooltip
- Makes tips clearer and more consistent.
- Removes outdated "shift+v" that doesn't work
- Adds Ctrl+RMB for adding nodes at position
- Removes tip for non-existent Alt+Drag in 3D select tool

(cherry picked from commit 6b90e2df6c)
2021-07-26 13:30:56 +02:00
Hugo Locurcio 3462aa4aba
Add a tooltip for Inclusive and Self in the editor profiler
This also changes the display mode tooltips to reflect the fact that
times are now displayed in milliseconds instead of seconds.

(cherry picked from commit e837e04ef8)
2021-07-26 13:29:11 +02:00
Hugo Locurcio af3f83407f
Expose an ImportOrder enum in ResourceImporter
This avoids using magic numbers in code.

(cherry picked from commit 7f83977f37)
2021-07-26 13:26:58 +02:00
Rémi Verschelde 8ecb5d2047
Merge pull request #48621 from Calinou/editor-3d-hide-selection-box-no-gizmos-3.x
Hide the 3D editor selection box when View Gizmos is disabled (3.x)
2021-07-26 12:45:00 +02:00
Hugo Locurcio ba91c37efe
Add shortcut to toggle the 3D editor's camera preview
A Camera node still has to be selected to initially enable camera
preview, but another node can then be selected and the preview can
be disabled by pressing the shortcut key again.
2021-07-25 12:50:51 +02:00
Hugo Locurcio db04860653
Only print message about lightmap baking if it took at least 1 second 2021-07-24 22:06:46 +02:00
kobewi 10652cd342 Allow for easier editing of rect CollisionShape2D 2021-07-24 21:31:32 +02:00
Hugo Locurcio ce78e605b1
Clarify the purpose of the default asset library URLs in the editor
`localhost` was removed as it won't work out of the box. It can be added
by the user if they're working on the asset library itself.

This won't affect existing installations due to how the editor settings
are stored, but existing installations will keep working fine.

(cherry picked from commit eac8ba6ce8)
2021-07-24 01:01:14 +02:00
foxydevloper c7062f3bb8
Fix hidden seperators when horizontal frames is 1
(cherry picked from commit 429382b7e5)
2021-07-24 00:52:49 +02:00
kobewi d2034fc269
Fix Change Node Type after Add Node Here
(cherry picked from commit 31a81562a8)
2021-07-24 00:52:32 +02:00
kobewi 49f323410b
Don't set metadata_label font if it doesn't exist
(cherry picked from commit 2846dbf239)
2021-07-24 00:51:08 +02:00
Rémi Verschelde 7968208b0a
Merge pull request #47201 from LightningAA/delete-from-project-manager-3.x
[3.x] Add the ability to remove project contents from the remove project dialog
2021-07-23 22:17:55 +02:00
Rémi Verschelde 4ecd9af616
Revert "Fix duplicate selection in SceneTree (3.x)" 2021-07-23 10:56:03 +02:00
Rémi Verschelde b856841b99
Merge pull request #50745 from LightningAA/fix-texture-preview-crash-3.x
[3.x] Fix `TexturePreview` crashing
2021-07-22 23:33:18 +02:00
Lightning_A 8e90c7e829 Fix TexturePreview crashing 2021-07-22 13:42:22 -06:00
Rémi Verschelde 883bb2f4f6
Merge pull request #50561 from Calinou/fix-scene-tree-duplicate-selection-3.x
Fix duplicate selection in SceneTree (3.x)
2021-07-22 16:41:59 +02:00
Rémi Verschelde 2ac292a5ad
Merge pull request #50646 from SirQuartz/3.x
Fix Illegible text in audio bus editor 3.x
2021-07-22 13:20:35 +02:00
Rémi Verschelde b4282c8435
Merge pull request #50700 from KoBeWi/3.drop
[3.x] Assign value to property by dropping to scene tree
2021-07-22 12:42:13 +02:00
Rémi Verschelde 54ad72d08d
Merge pull request #50320 from nekomatata/optimize-node-path-check-3.x
[3.x] Optimize NodePath update when renaming or deleting nodes in the editor
2021-07-22 12:13:26 +02:00
Hugo Locurcio a528931c5e
Backport RootMotionView icon from the master branch
This makes RootMotionView display with a proper icon in the editor.
2021-07-22 07:36:08 +02:00
kobewi 559b3a59bb Assign value to property by dropping to scene tree 2021-07-21 15:40:19 +02:00
Hugo Locurcio 130a467839
Display the class name in the description
- Display a placeholder if no description is available.
- Display a message if the search didn't return any results.
2021-07-20 23:28:23 +02:00
Rémi Verschelde 843ab4e375
Merge pull request #50482 from lawnjelly/portals_autoplace 2021-07-20 21:26:36 +02:00
Lightning_A 04fbe18c06 Fix array reorder methods not being bound 2021-07-20 12:22:47 -06:00
lawnjelly 83f1377a8f Portals - lift roomlist restrictions and fix link bug
Allows users to have the RoomManager as the roomlist.

Fixes a couple of bugs dealing with situations where users attempt to link Portals to Rooms outside the roomlist.

Adds a PortalEditorPlugin allowing you to flip individual portals.
2021-07-20 19:05:16 +01:00
Lightning_A 5ca145ba5d Add the ability to reorder arrays from the inspector 2021-07-20 11:30:21 -06:00
Nick Huelin d2cbf331ce
Fix Illegible text in audio bus editor 3.x
This pull request fixes an issue where the text within the audio bus editor would be illegible. This version is tailored for 3.x.
2021-07-20 08:43:30 -04:00
Atlinx 6026de80e7
Add scaling to the curve editor's handles
This fixes issue #50617

(cherry picked from commit ac5f3a6733)
2021-07-20 13:05:12 +02:00
Haoyu Qiu 890dda4cb4
Minor enhancements for the resource options button
(cherry picked from commit 8c4cb53d21)
2021-07-20 13:05:12 +02:00
Hugo Locurcio 79d3a6c8df
Improve tooltips in the editor profiler to mention the script name
Co-authored-by: CrispyPin <crispin@tasa.se>
(cherry picked from commit 0098e9243c)
2021-07-20 13:05:11 +02:00
reduz ca223d71d8
Addes ability to load build sources from file.
* If not present, the dialog asks to load build sources from a file.
* The export templates check now also verifies that build sources are installed and skips the template check.

This makes Android development easier.

(cherry picked from commit 6639cc9853)
2021-07-20 13:05:10 +02:00
Nathan Franke 970a66a0fd
Do not update scene tree dock when node edited outside of it
(cherry picked from commit 022a061571)
2021-07-20 13:05:09 +02:00
Rémi Verschelde d12243370d
Merge pull request #50632 from timothyqiu/add-item-type-3.x
[3.x] Improve add item type UI in theme editor
2021-07-20 12:15:11 +02:00
Rémi Verschelde 559d02a216
Merge pull request #50095 from LightningAA/add-viewport-spy-3.x
[3.x] Add the ability to preview viewports from the inspector
2021-07-20 11:19:34 +02:00
Rémi Verschelde 78d6dc4d24
Merge pull request #50502 from Calinou/animation-track-editor-improve-scrolling-3.x
Improve scrolling actions in the animation track editor
2021-07-20 11:16:25 +02:00
Rémi Verschelde 7fe45cb25b
Merge pull request #50531 from pycbouh/editor-improve-template-downloader-3.x
[3.x] Improve the UI/UX of the Export Template Manager dialog
2021-07-20 11:00:45 +02:00
Haoyu Qiu 48af497e8c Improve add item type UI in theme editor 2021-07-20 16:55:54 +08:00
Rémi Verschelde 7d5c7e02c4
Merge pull request #50565 from foxydevloper/3.x-add-sort-button
Backport filesystem dock sorting to 3.x
2021-07-20 10:46:17 +02:00
Rémi Verschelde f9707e1a28
Merge pull request #50499 from LightningAA/zoom-out-alt-3.x
[3.x] Add shift + [1-5] keyboard shortcuts to zoom out
2021-07-20 09:17:52 +02:00
Aaron Franke 7dc2edc430
[3.x] Allow reading shaders from .gdshader files 2021-07-19 23:34:23 -04:00
Rémi Verschelde a5c62edc14
Merge pull request #50586 from pycbouh/editor-theme-type-clear
Clear the theme type filter/name on each dialog popup
2021-07-19 22:55:44 +02:00
Stanislav Labzyuk 10252d81a3 Implemented the ability to add shortcut for Project -> Reload Current Project. 2021-07-20 00:12:50 +07:00
foxydevloper 6926363efb Backport filesystem dock sorting to 3.x
Co-authored-by: Gilles Roudiere <gilles.roudiere@gmail.com>
2021-07-19 12:31:28 -04:00
Lightning_A cf8de3b316 Add viewport preview plugin and refactor TextureEditorPlugin 2021-07-18 14:49:45 -06:00
Yuri Sizov 9c2ff29c4d Clear the theme type filter/name on each dialog popup 2021-07-18 20:37:30 +03:00
Hugo Locurcio 8f448b5830
Fix duplicate selection in SceneTree
* It seems both cell_selected and multi_selected were being triggered,
* This caused inspector updating twice.
* cell_selected connection and callback were removed.

Co-authored-by: Juan Linietsky <reduzio@gmail.com>
2021-07-17 21:26:24 +02:00
Rémi Verschelde 9636deac55
Merge pull request #50508 from Calinou/add-drag-threshold-select-mode-3.x
Prevent accidental drags by adding drag distance threshold
2021-07-17 19:36:16 +02:00
Andrii Doroshenko (Xrayez) 7bedb68632 VCS: Allow to stage and commit all files with Ctrl + Enter 2021-07-17 13:00:27 +03:00
Rémi Verschelde d7f49c7709
Merge pull request #50519 from pycbouh/editor-theme-fixup-3.x
[3.x] Fix control picker in the Theme editor
2021-07-17 09:30:35 +02:00
Yuri Sizov 266c726dad Improve the UI/UX of the Export Template Manager dialog 2021-07-17 00:46:30 +03:00
Yuri Sizov 47592f96bc Make several actions in the Inspector dock more obvious 2021-07-16 23:27:00 +03:00
Yuri Sizov b11178b21e Fix control picker in the Theme editor 2021-07-16 21:36:54 +03:00
Lightning_A c4ff3ef891 Add shift + [1-5] keyboard shortcuts to zoom out 2021-07-16 12:15:44 -06:00
Hugo Locurcio 44b01751e6
Prevent accidental drags by adding drag distance threshold
Co-authored-by: fox <12120644+foxydevloper@users.noreply.github.com>
2021-07-16 06:04:25 +02:00
Hugo Locurcio a623eb5083
Improve scrolling actions in the animation track editor
- Implement timeline scrobbling using Alt + Mouse wheel anywhere in the
  animation track editor.
  - Snap settings are followed, and precise snapping can be obtained by also
    holding down Shift.
  - This modifier wasn't used by anything in the animation editor.
- Allow zooming by using Ctrl + Mouse wheel on the timeline itself.
  - Previously, this was only possible on the track area, not the timeline.
2021-07-15 22:29:36 +02:00
Rémi Verschelde 08d517243c
Merge pull request #50490 from Calinou/improve-2d-editor-zoom-3.x
Improve 2D editor zoom logic (3.x)
2021-07-15 19:04:38 +02:00
Hugo Locurcio 9cc65e1b9b
Automatically focus the Search field when displaying asset library
- Focus the project search box when switching from the Templates tab
  back to the Projects tab in the project manager.
- Add a context-specific placeholder for the asset library search box.
- Rename "Search" project filter box placeholder to the more
  descriptive "Filter projects". When performing a search on an
  existing selection, "Filter" is more accurate than "Search".
2021-07-15 18:47:38 +02:00
Hugo Locurcio 477dfc5174
Improve 2D editor zoom logic
- Add 1-5 shortcuts to zoom between 100% and 1600% quickly
  (similar to GIMP).
- When holding down Alt, go through integer zoom values if above 100%
  or fractional zoom values with integer denominators if below 100%
  (50%, ~33.3%, 25%, …).
2021-07-15 17:15:02 +02:00
lawnjelly 44f9a0f961 Portals - fix autolink sprawling, refine logs
It turned out the new autolinking feature was linking portals AFTER the static meshes had been added to rooms in the PortalRenderer. This meant that large meshes weren't being sprawled across these portals. The fix involves doing the autolinking BEFORE adding the static meshes.

Fixes a bug in the warning for portals being in the wrong direction, they should have only been checkout for outgoing portals. This was resulting in erroneous warnings.

Also the room conversion logs are refined to be more compact and informative.

A warning icon is also added in the gizmo for portals where autolink fails.
2021-07-15 13:04:05 +01:00
Rémi Verschelde 875045adde
Use modules_enabled.gen.h to improve inter dependency checks
- Fix build with gdscript module disabled. Fixes #31011.
- Remove unused `gdscript` compile option.
- Fix build with regex module disabled.
- Fix ImageLoaderSVG to forward declare thirdparty structs.

(cherry picked from commit f3726ee994)
2021-07-14 23:36:38 +02:00
Rémi Verschelde a3310c1da2
Merge pull request #46130 from lawnjelly/portals
Portal occlusion culling [3.4]
2021-07-14 13:38:01 +02:00
lawnjelly eb6f98ec55 Portal occlusion culling
Adds support for occlusion culling via rooms and portals.
2021-07-14 11:43:23 +01:00
Rémi Verschelde 6cff43e093
Merge pull request #50150 from Valeryn4/3.x-fix_lightmap_cpu 2021-07-14 12:19:53 +02:00
Hugo Locurcio e8c9877ad8
Fix casing of the "to" stop word in editor strings 2021-07-13 15:28:00 +02:00
Rémi Verschelde 7af4a94b72
i18n: Sync translations with Weblate
(cherry picked from commit 1c840a31a5)
2021-07-13 12:33:17 +02:00
Hugo Locurcio 9343ee5c2b
Automatically display the installer after downloading an asset
- To make things easier to follow, display the asset name in
  confirmation dialogs.
- Display the number of conflicting files in the asset extraction dialog.

This reduces the number of clicks required to install an asset.

(cherry picked from commit 2708fcf13d)
2021-07-13 11:19:46 +02:00
Haoyu Qiu 6179f76547
Merge similar editor strings
(cherry picked from commit 4383f8a790)
2021-07-13 10:20:03 +02:00
Andrii Doroshenko (Xrayez) 1747569019
Set minimum size for "Version Control" diff bottom panel
Allows to see version diffs without having to expand the bottom panel
manually when clicking on a changed file in the "Commit" dock.

(cherry picked from commit 0fce7aea88)
2021-07-13 10:20:03 +02:00
Andrii Doroshenko (Xrayez) 4fec6d4697
Make EditorVCSInterface proxy functions virtual in C++
Allows to implement VCS plugins via C++ modules without affecting
the existing script instance mechanism.

(cherry picked from commit 23c1b39570)
2021-07-13 09:46:49 +02:00
Eric M c696847f3d
Added 'Select Current' option when user is prompted to select main scene after clicking play
(cherry picked from commit 2296b57739)
2021-07-13 09:46:31 +02:00
PouleyKetchoupp 240c33708c Options to clean/simplify convex hull generated from mesh
Clean: remove duplicate and interior vertices (uses Bullet algorithm)
Simplify: modify the geometry for further simplification (uses VHACD
algorithm)

In the editor, single convex hull now uses the clean option.
Added a new editor entry to create a simplified convex hull, can be
useful for creating convex hull from highly tessellated triangle meshes.

Specific change for 3.x:
Add support for Vector<Vector3> and PoolVector<Vector3> in the convex hull generator.
2021-07-09 17:45:59 -07:00
PouleyKetchoupp 8185c5fe8a Optimize NodePath update when renaming or deleting nodes in the editor
Now the process uses a Map to lookup node pointers instead of iterating
over all modified node paths in a list and comparing them for each
property to check.

The process also avoids checking properties with empty node paths and
does an early exit on deleted nodes to avoid checking the node and its
descendants.

Also made a minor change in NodePath::rel_path_to() to avoid resizing a
Vector many times for long paths (with copy-on-write each time). Now
it's down to 2 resize calls in any case.
2021-07-09 11:43:05 -07:00
Rémi Verschelde 7f971089fb
FileDialog: Fix capitalization for overwrite prompt
Sorry I can't take it anymore, I wince every time I see it.
Already fixed in master :)
2021-07-08 01:05:45 +02:00
kobewi ff7cae4c4c Allow to create a node at specific position 2021-07-07 13:19:59 +02:00
Rémi Verschelde 31143baa57
Merge pull request #50223 from Calinou/editor-information-use-multiply-sign-3.x
Use the Unicode multiplication symbol for the viewport size display (3.x)
2021-07-07 10:03:25 +02:00
Hugo Locurcio 8592620a8e
Use the Unicode multiplication symbol for the viewport size display 2021-07-06 21:59:26 +02:00
Bartłomiej T. Listwon 6f3b03824a
Change search results limit in FileSystem dock from 128 to 10000
(cherry picked from commit 5aa88afa5d)
2021-07-06 13:38:11 +02:00
Haoyu Qiu f252622d82
Add numpad emulation in 3D viewport
(cherry picked from commit 4a26e61e89)
2021-07-06 11:20:30 +02:00
Hugo Locurcio 59c5c04e38
Allow using the 3D editor's View menu while previewing a camera
This is already allowed when using cinematic preview, but not
when previewing a Camera3D the usual way.

Many operations from the View menu still work while previewing
a camera, such as switching between debug draw modes and toggling
information panes.

(cherry picked from commit fab3d136e0)
2021-07-06 11:19:38 +02:00
PouleyKetchoupp 5a66ab1ef4
Coding style fix in editor NodePath update
Added r_ prefix for reference arguments that can be modified.

(cherry picked from commit 62ce81ec15)
2021-07-06 11:10:47 +02:00
PouleyKetchoupp daa0977c68
NodePath properly updated in the editor in more cases
Fix more cases of node path needing an update when nodes are renamed or
moved in the editor.

Built-in node properties:
Before, node paths were checked only for script export variables. Now
all properties are checked from the node, which includes built-in node
properties.
Allows proper node path updates for nodes like remote transform, physics
joints, etc.

Arrays and dictionaries:
Node paths nested in array and dictionary properties are now also
updated in the editor.

Also update the documentation to be clear about node path update in the
editor and at runtime.

Co-authored-by: latorril <latorril@gmail.com>
(cherry picked from commit 3e4e530523)
2021-07-06 11:10:47 +02:00
Hugo Locurcio 8c08b52871
Add icons for more file types in the editor asset installer
(cherry picked from commit 9698486605)
2021-07-06 11:10:47 +02:00
kobewi 245b9400ea
Support single quote when dropping files to script
(cherry picked from commit 5e593dda9b)
2021-07-06 11:10:47 +02:00