Commit graph

3152 commits

Author SHA1 Message Date
Tomasz Chabora
f12f5b36b5 Make radius & height in CapsuleShape2D independent 2021-08-11 17:34:27 +02:00
Yuri Roubinsky
0eb97c11cf Few improvements for constants in visual shader 2021-08-11 13:14:16 +03:00
Rémi Verschelde
c00303ff55
Merge pull request #47378 from aaronfranke/use-input-enums
Use key enum instead of plain integers for input code
2021-08-11 11:20:45 +02:00
Rémi Verschelde
e81427e959
Merge pull request #51497 from Chaosus/vs_fix_addnode_zoomed
Fix incorrect position of the created VisualShader nodes on zoomed graph
2021-08-11 10:19:21 +02:00
Yuri Roubinsky
8249ae8085 Fix incorrect position of the created VisualShader nodes on zoomed graph 2021-08-11 10:53:26 +03:00
Aaron Franke
fa3a32a2d6
Use Key enum instead of plain integers 2021-08-10 16:26:55 -05:00
PouleyKetchoupp
4da3a87f7d Remove infinite inertia and ray shapes from CharacterBody
Infinite inertia:
Not needed anymore, since it's now possible to set one-directional
collision layers in order for characters to ignore rigid bodies, while
rigid bodies still collide with characters.

Ray shapes:
They were introduced as a work around to allow constant speed on slopes,
which is now possible with the new property in CharacterBody instead.
2021-08-10 12:10:26 -07:00
foxydevloper
e62ad6ad80 Improve drag and drop by supporting more file types & node types
Adds support for dragging in all files of type Texture2D for 2D.
Adds support for dragging in all files of type Mesh for 3D.
Replaces adding texture as Light2D with PointLight2D.
Add more node types that textures can be added as
- TextureButton
- CPUParticles2D
2021-08-10 13:05:17 -04:00
fox
20201b56c2 Improve naming of a couple shortcuts 2021-08-10 13:01:07 -04:00
Rémi Verschelde
dce488d8f7
Merge pull request #49417 from Bhu1-V/gsoc-cmd-plt
Command Palette For Godot
2021-08-10 18:55:22 +02:00
Aaron Franke
339687e04f
Organize methods in Viewport and explicitly name 3D methods with 3D 2021-08-10 09:10:34 -05:00
Rémi Verschelde
16d73fefdb
Merge pull request #50682 from aaronfranke/basis-looking-at
Move code for looking_at to Basis
2021-08-10 11:28:12 +02:00
Aaron Franke
430ad75963
Some work on double support 2021-08-09 17:43:48 -05:00
Aaron Franke
84f720966c
Use doubles for time in many other places 2021-08-09 14:05:42 -05:00
Yuri Roubinsky
72a9ca1505 Added small offset to the content of nodes in VisualShader 2021-08-09 15:19:27 +03:00
Bhuvan Vemula
a0a019a998 Added EditorCommandPalette 2021-08-09 17:41:50 +05:30
Yuri Roubinsky
5e5cd2495d Added editor dialog for easily creating shaders. 2021-08-07 21:02:13 +03:00
Rémi Verschelde
a7f96e07d0
Merge pull request #51326 from LightningAA/minor_view_rotation_gizmo_improvements-4.0
Minor visual improvements to the viewport rotation gizmo (again)
2021-08-07 12:41:25 +02:00
AndreaCatania
e4e4a02d3d Removes const from set functions on the Gizmos 2021-08-07 09:15:57 +02:00
Lightning_A
e1ad11f453 Minor visual improvements to the viewport rotation gizmo (again) 2021-08-06 14:39:13 -06:00
Rémi Verschelde
dcf2a62b05
Merge pull request #51164 from TokageItLab/fix-gizmo-transform-scaling
Fixed gizmo forced implicit normalization and inconsistent rotation
2021-08-05 16:42:33 +02:00
Rémi Verschelde
4cf12d7895
Merge pull request #51215 from akien-mga/shortcut-rename-property-to-event
Shortcut: Rename `shortcut` property to `event`
2021-08-05 15:52:20 +02:00
Rémi Verschelde
342a0d45cf
Merge pull request #51250 from LightningAA/minor_view_rotation_gizmo_improvements-4.0
Minor visual improvements to the view rotation gizmo
2021-08-05 14:59:37 +02:00
Rémi Verschelde
de2c2be19b
Shortcut: Rename shortcut property to event
Having a property which has the same name as its class leads to confusing
situations (e.g. `BaseButton` has a `shortcut` property of type `Shortcut`
which has a `shortcut` property of type `InputEvent`).

Also renames `is_event` to `matches_event`, and `is_valid` to `has_valid_event`
to better reflect what the methods check.
2021-08-05 13:48:43 +02:00
Lightning_A
37b943be42 Minor improvements to the view rotation gizmo 2021-08-04 13:19:17 -06:00
Yuri Sizov
b27989ff67 Improve user communications in the theme editor 2021-08-04 18:26:36 +03:00
Fabio Alessandrelli
80fc90e82a
Merge pull request #50454 from Ev1lbl0w/gsoc21-dap
Implemented initial DAP support
2021-08-03 17:12:37 +02:00
Rémi Verschelde
57a5186b08
Merge pull request #51006 from foxydevloper/drag-drop-naming
Name nodes added when drag & dropping an image by `name_casing`
2021-08-03 09:38:03 +02:00
Rémi Verschelde
a7f24080a2
Merge pull request #51118 from SirQuartz/patch-39
Make the "View" menu in the 3D viewport stay open when selecting a checkbox
2021-08-03 09:35:17 +02:00
Yuri Roubinsky
a34a91a30b Added more input/output built-ins to visual shaders 2021-08-03 09:32:40 +03:00
Rémi Verschelde
a6374c6675
Merge pull request #50703 from Chaosus/vs_remove_subparticles_from_start
Removes EmitParticle node from the start functions in visual shader
2021-08-03 08:14:15 +02:00
Silc 'Tokage' Renew
4822499d70 Fixed gizmo forced uniform scale and inconsistent rotation 2021-08-03 14:17:22 +09:00
Yuri Roubinsky
bd6b7c4b0f
Merge pull request #51144 from Chaosus/vs_version
Makes dictionary instead of string for visual shader version
2021-08-02 21:55:50 +03:00
Rémi Verschelde
c620ede327
Merge pull request #50122 from Paulb23/code_edit_auto_brace_completion 2021-08-02 20:44:39 +02:00
Yuri Roubinsky
94c6817b51 Makes dictionary instead of string for visual shader version
Update doc/classes/VisualShader.xml

Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2021-08-02 21:34:19 +03:00
Rémi Verschelde
5360c2012c
Merge pull request #51004 from groud/tilemap_layers
Implements TileMap layers and move TileSetPlugins's functions to the TileMap node instead
2021-08-02 17:20:32 +02:00
Gilles Roudière
ad8b5cd5a4 Implements TileMap layers and move TileSetPlugins's functions to the TileMap node instead 2021-08-02 13:54:39 +02:00
Rémi Verschelde
33fd41472c
Merge pull request #49783 from aaronfranke/real-editor-plugins
Use real_t in editor plugins
2021-08-02 12:50:54 +02:00
Rémi Verschelde
face3203be
Merge pull request #50430 from goostengine/ctrl-enter-commit
VCS: Allow to stage and commit all files with Ctrl + Enter
2021-08-02 12:20:10 +02:00
Ev1lbl0w
7bccd5487e
Implemented initial DAP support
Implemented "output" event

Refactored "seq" field generation

Prevent debugging when editor and client are in different projects

Removed unneeded references to peer on the parser

Refactored way to detect project path

Implemented "setBreakpoints" request

Fix double events when terminating from client

Refactored "stopped" event

Implemented "stopped" with breakpoint event

Implemented "stackTrace", "scopes" and "variables" request

Report incoming number of stack dump variables

Implemented proper reporting of scopes and variables from stack frames

Prevent editor from grabbing focus when a DAP session is active

Implemented "next" and "stepIn" requests

Implemented "Source" checksum computing

Switched expected errors from macros to silent guards

Refactored message_id

Respect client settings regarding lines/columns behavior

Refactored nested DAP fields

Implement reporting of "Members" and "Globals" scopes as well

Fix error messages not being shown, and improved wrong path message
2021-08-02 10:43:35 +01:00
Aaron Franke
dbad475fc7
Use real_t in editor plugins
Also use const more often and delete dead code in CanvasItemEditor
2021-08-01 21:48:34 -05:00
Aaron Franke
9f3ae0adcd
Move code for looking_at to Basis 2021-08-01 12:49:02 -05:00
Paulb23
809a32c045 Clean up and complete CodeEdit inspector and docs 2021-08-01 12:24:19 +01:00
Paulb23
dd5a37f556 Move symbol lookup into CodeEdit 2021-08-01 12:06:33 +01:00
Paulb23
12f0053555 Move auto brace completion to CodeEdit 2021-08-01 12:06:33 +01:00
Yuri Roubinsky
bb5729fd35 Prevent warning spam to console when dragging a CanvasItem in container 2021-08-01 13:01:46 +03:00
Nicholas Huelin
3ffd75107d
Make the "View" menu in 3D view toolbar stay open when selecting a checkbox
This pull request fixes an issue where the "View" menu in the 3D view toolbar would close when you selected either the "View Origin" or "View Grid" checkboxes. This was inconvenient and wasted time by making you have to reopen the menu in order to get to other settings anytime you changed this.
2021-07-31 16:33:38 -04:00
Rémi Verschelde
20fa3ec093
Merge pull request #51110 from pycbouh/editor-put-the-colon-back-in
Put multiple colons back into translated strings
2021-07-31 22:05:43 +02:00
Yuri Sizov
969ba687ef Put multiple colons back into translated strings 2021-07-31 20:08:07 +03:00
Haoyu Qiu
284c6c81eb Make action names translatable 2021-07-31 22:19:51 +08:00
Rémi Verschelde
92c5c46da7
Merge pull request #51041 from foxydevloper/new-resources-snake-case
Name new resource files with `snake_case`
2021-07-30 15:44:29 +02:00
Rémi Verschelde
e95e33f251
Merge pull request #35891 from Calinou/editor-viewport-highlight-context-menus
Highlight context menu items at the top of the 2D/3D viewports
2021-07-30 15:18:48 +02:00
Hugo Locurcio
e92297cc3d
Make the focus outline translucent for editor viewports
This makes the focus outline less distracting on the
2D and 3D editor viewports.
2021-07-30 14:20:54 +02:00
Rémi Verschelde
74aa7e26e9
Merge pull request #51011 from foxydevloper/drag-drop-root-default 2021-07-30 09:02:09 +02:00
foxydevloper
ae7a74625d Name new resource files with snake_case 2021-07-29 20:53:33 -04:00
foxydevloper
f641327dcf Make drag and drop into viewport add to root node by default
When dragging and dropping a texture, mesh, or scene from the FileSystem into the
2D or 3D viewport, it will be added as a child of the current scene's root node.
2021-07-29 15:47:42 -04:00
kleonc
8a48cb466e SpriteFramesEditor: preserve source texture margins when creating frames from AtlasTexture 2021-07-29 20:18:39 +02:00
foxydevloper
07a8f0fe38 Name nodes added from drag & drop by name_casing 2021-07-29 00:29:24 -04:00
Nicholas Huelin
28f45e923c
Fix duplicate shortcut in TileMap Editor
This pull request fixes an issue where the paint and erase tools in the TileMap editor had the same shortcut (E). The erase tool having "E" be its shortcut makes more sense than the paint tool having that be its shortcut. So I changed the paint tool's shortcut to be "D" since nothing else uses it and it's short for "draw", it's also right next to "S" on the keyboard which happens to be the selection tool.
2021-07-28 17:33:17 -04:00
Hugo Locurcio
026aea681d
Improve the 2D editor ruler display
- Use the ° symbol instead of "deg" to reduce clutter.
- Round the displayed lengths to only one decimal instead of two
  to further reduce clutter.
- Don't make the `px` suffix localizable, as it isn't localizable
  anywhere else in the editor.
2021-07-28 16:04:48 +02:00
Rémi Verschelde
7f0a83c129
Merge pull request #50597 from Calinou/3d-editor-improve-manipulation-gizmo
Improve the 3D editor manipulation gizmo
2021-07-28 15:33:24 +02:00
Rémi Verschelde
9f5436c799
Merge pull request #50826 from Calinou/editor-improve-mesh-uv-preview
Improve MeshInstance3D UV preview in the editor
2021-07-28 15:30:29 +02:00
Hugo Locurcio
81d2d2b41a
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-27 16:45:02 +02:00
Rémi Verschelde
0f7b7bcbce
Merge pull request #50836 from Calinou/3d-editor-camera-preview-add-shortcut
Add shortcut to toggle the 3D editor's camera preview
2021-07-27 13:34:10 +02:00
Rémi Verschelde
41013e4f9a
Merge pull request #50933 from JFonS/gizmo_rework_improvements 2021-07-27 13:19:46 +02:00
jfons
d7b58ebc9c Fixes to editor subgizmos
* Fixed subgizmo editing on scaled nodes.
* Added more clarifications on the coordinate space of subgizmos.
* Given input priority to the transform gizmo over subgizmo selection.
2021-07-27 12:55:57 +02:00
Yuri Roubinsky
88e3d13416 Fix icon colors in 3d editor on theme changing 2021-07-26 22:50:09 +03:00
Rémi Verschelde
fab3412139
Merge pull request #50899 from akien-mga/refref
Use Ref<T> references as iterators where relevant
2021-07-26 19:45:04 +02:00
Rémi Verschelde
92299989bd
Use Ref<T> references as iterators where relevant
And const when possible.
2021-07-26 19:27:11 +02:00
SaracenOne
fbda490d0f Removing bounding box calculations from 3D scene drag and drop and collide against physics rather than visual geometry. 2021-07-26 17:38:48 +01:00
Rémi Verschelde
8f6c16e4a4
Merge pull request #50847 from reduz/implement-binary-shader-compilation
Implement Binary Shader Compilation
2021-07-26 17:09:48 +02:00
reduz
cf3f404d31 Implement Binary Shader Compilation
* Added an extra stage before compiling shader, which is generating a binary blob.
* On Vulkan, this allows caching the SPIRV reflection information, which is expensive to parse.
* On other (future) RenderingDevices, it allows caching converted binary data, such as DXIL or MSL.

This PR makes the shader cache include the reflection information, hence editor startup times are significantly improved.
I tested this well and it appears to work, and I added a lot of consistency checks, but because it includes writing and reading binary information, rare bugs may pop up, so be aware.
There was not much of a choice for storing the reflection information, given shaders can be a lot, take a lot of space and take time to parse.
2021-07-26 08:40:39 -03:00
Rémi Verschelde
5707c5d0ff
Merge pull request #48620 from Calinou/editor-3d-hide-selection-box-no-gizmos
Hide the 3D editor selection box when View Gizmos is disabled
2021-07-26 12:44:50 +02:00
kobewi
bba76e45ff Fix undo for bucket tool in tile map 2021-07-26 11:24:34 +02:00
Hugo Locurcio
75dc0d1869
Add shortcut to toggle the 3D editor's camera preview
A Camera3D 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:53:38 +02:00
Rémi Verschelde
ff0b5f8fa1
Merge pull request #50809 from akien-mga/iterators-const-references 2021-07-25 12:52:58 +02:00
Rémi Verschelde
ac3322b0af
Use const references where possible for List range iterators 2021-07-25 12:22:25 +02:00
luz paz
3564c16cb8
Fix various typos with codespell
Found via `codespell -q 3 -S ./thirdparty,*.po,./DONORS.md -L ackward,ang,ans,ba,beng,cas,childs,childrens,dof,doubleclick,fave,findn,hist,inout,leapyear,lod,nd,numer,ois,ony,paket,seeked,sinc,switchs,te,uint`
2021-07-25 11:21:51 +02:00
Hugo Locurcio
8cdfd2e706
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.
2021-07-25 01:11:24 +02:00
Rémi Verschelde
2bf903e98d
Merge pull request #50791 from foxydevloper/select-mode-tooltip-improvation
Improve select tool's tooltip for 2D and 3D
2021-07-24 23:45:44 +02:00
Aaron Franke
4e6efd1b07
Use C++ iterators for Lists in many situations 2021-07-23 17:38:28 -04:00
foxydevloper
6b90e2df6c 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
2021-07-23 17:30:45 -04:00
Rémi Verschelde
4c3d5850de
Merge pull request #50748 from JFonS/gizmo_rework
Node3D gizmo improvements
2021-07-23 21:55:16 +02:00
jfons
cfb555a081 Node3D gizmo improvements
* Clean-up of node_3d_editor_plugin.{h,cpp}: removed unused code, fixed some bugs.
* Moved node_3d_editor_gizmos.{h,cpp} to editor/plugins.
* Added support for multiple gizmos per node. This means custom gizmos will no longer override the built-in ones and that multiple gizmos can be used in more complex nodes.
* Added support for handle IDs. When adding handles to a gizmo, an ID can be specified for each one, making it easier to work with gizmos that have a variable number of handles.
* Added support for subgizmos, selectable elements that can be transformed without needing a node of their own. By overriding _subgizmo_intersect_frustum() and/or _subgizmo_intersect_ray() gizmos can define which subgizmos should be selected on a region or click selection. Subgizmo transformations are applied using get/set/commit virtual methods, similar to how handles work.
2021-07-23 21:01:10 +02:00
kobewi
2846dbf239 Don't set metadata_label font if it doesn't exist 2021-07-23 16:29:49 +02:00
Rémi Verschelde
8cddd3b2c0
Merge pull request #50768 from Calinou/editor-asset-library-urls-clarify
Clarify the purpose of the default asset library URLs in the editor
2021-07-23 15:40:01 +02:00
Rémi Verschelde
995093f59d
Merge pull request #37760 from KoBeWi/rect_edit_level_up
Allow for easier editing of rect CollisionShape2D
2021-07-23 14:38:04 +02:00
Hugo Locurcio
eac8ba6ce8
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.
2021-07-23 13:02:04 +02:00
Lightning_A
8ad00087ce Fix TexturePreview crashing 2021-07-22 13:43:34 -06:00
Yuri Roubinsky
80bd8171d0 Removes EmitParticle node from the start functions in visual shader 2021-07-21 17:56:01 +03:00
Gilles Roudière
5d34a81e52 Implement atlas merging and tile proxies 2021-07-21 12:36:37 +02:00
Rémi Verschelde
d4bbdb8367
Merge pull request #50521 from aaronfranke/iseqapprox
Use `is_equal_approx` in more places
2021-07-21 11:16:19 +02:00
Aaron Franke
78b0a7da03
Use is_equal_approx in more places 2021-07-21 00:32:37 -04:00
foxydevloper
429382b7e5 Fix hidden seperators when horizontal frames is 1 2021-07-20 19:01:08 -04:00
Rémi Verschelde
c82daaed48
Merge pull request #38317 from verdog/get-cam-2d-4.0
add viewport.get_camera_2d()
2021-07-20 22:19:06 +02:00
Michael Alexsander
be1d5b0e73 Minor enhancements for the TileMap editor 2021-07-20 11:20:14 -03:00
Rémi Verschelde
a0d13995c8
Merge pull request #50621 from KoBeWi/feel_good_scroll
Add scrolling to tile atlas view
2021-07-20 13:04:32 +02:00
kobewi
1bb2340652 Add scrolling to tile atlas view 2021-07-20 12:36:01 +02:00
Rémi Verschelde
313c88ef39
Merge pull request #50631 from timothyqiu/add-item-type
Improve add item type UI in theme editor
2021-07-20 12:05:49 +02:00
Rémi Verschelde
1af58e046e
Merge pull request #50500 from LightningAA/simplify-subviewport-preview-editor-theme
Remove unnecessary `get_editor_theme()` in `SubViewportPreview`
2021-07-20 11:19:07 +02:00