Commit graph

256 commits

Author SHA1 Message Date
Anilforextra cc51b045da Construct values only when necessary. 2021-09-23 22:26:07 +05:45
Rémi Verschelde 88b347dc27
Merge pull request #51920 from jmb462/missing-sname-macro-optimization-in-some-functions 2021-09-23 13:14:20 +02:00
Haoyu Qiu 1032c8535b Fix 3D view name typo 2021-09-22 10:30:48 +08:00
Rémi Verschelde e3ebe8b976
Merge pull request #52886 from bruvzg/rtl_fixes
Fix RTL layout Label text, VBox child, 3D node editor controls, and popup menu alignment.
2021-09-21 10:16:56 +02:00
bruvzg 99dc2ec9e1 Fix RTL layout Label text, VBox child, 3D node editor controls, and popup menu alignment. 2021-09-21 10:35:23 +03:00
Hugo Locurcio e2718b7717
Tweak the 3D editor inertia defaults for better responsiveness
The default orbit sensitivity was decreased to account for this change.
Rotational inertia (orbit + freelook) was disabled by default due to
known issues.

This also removes the need for separate manipulation inertia settings,
as the default settings are more responsive.
2021-09-20 16:32:37 +02:00
jfons 6747126c14 Fix error spam on quit 2021-09-20 13:10:19 +02:00
Wilson E. Alvarez f3a564f9a5
Rename Listener2D/Listener3D to AudioListener2D/AudioListener3D 2021-09-16 17:51:51 -04:00
Camille Mohr-Daurat 3581b893ed
Merge pull request #52681 from nekomatata/rename-rigid-body
Rename RigidBody to RigidDynamicBody and SoftBody to SoftDynamicBody
2021-09-16 11:20:21 -07:00
PouleyKetchoupp 85819b199a Rename RigidBody to RigidDynamicBody and SoftBody to SoftDynamicBody 2021-09-16 09:55:20 -07:00
Hugo Locurcio 05697ee848
Display a editor gizmo icon for Listener3D
The icon was present in `editor/icons/`, but it was never implemented
in the editor gizmos code.

This also removes some unused gizmo drawing code (overridden methods
that are no longer called anywhere).
2021-09-16 10:56:45 +02:00
Krystof Klestil 44aa26ad66 Fix issues with scaling Node3Ds 2021-09-15 00:10:20 +02:00
JFonS c334989e00
Merge pull request #51821 from Calinou/builtin-shaders-add-comments
Add comments at the top of each built-in shader to ease debugging
2021-08-25 11:37:57 +02:00
reduz 5cecdfa8af Entirely removes BIND_VMETHOD in favor of GDVIRTUAL
* `_gui_input`, `_input`, `_unhandled_input` and `_unhandled_key_input` are now regular C++ virutal functions.
* Everything else converted to GDVIRTUAL
* BIND_VMETHOD is gone, always use the new syntax from now on.

Creating `_gui_input` method and using the binder to register events will no longer work, simply override the virtual function now.
2021-08-23 08:10:13 -03:00
jmb462 54de7114c5 Add missing SNAME macro optimization for StringName in some functions 2021-08-20 14:50:24 +02:00
Hugo Locurcio a139e58f8c
Add comments at the top of each built-in shader to ease debugging
When a shader error is printed about a built-in shader, the origin
of the shader will now be recognizable immediately by looking at
the top of the printed shader code.
2021-08-18 03:09:22 +02:00
Rémi Verschelde d673353a58
Merge pull request #51736 from JFonS/minor_fixes_n3ep
Minor fixes to Node3DEditorPlugin
2021-08-16 18:31:22 +02:00
jfons 49361034f9 Minor fixes to Node3DEditorPlugin
* Change EditorNode3D::update_all_gizmos() to start at the edited scene
  root instead of the whole editor root.
* Call update_all_gizmos() only once at start instead of evrey time a
  gizmo plugin is added.
* Add missing null check.
2021-08-16 12:59:12 +02:00
Haoyu Qiu 42579a346b Fix i18n of 3D view name
Make the full view name translatable as a whole instead of combining
from sub-strings.
2021-08-14 15:24:02 +08:00
Rémi Verschelde 62c6347a27
Merge pull request #51035 from foxydevloper/drag-drop-more-support
Improve drag and dropping files into viewport by supporting more types
2021-08-13 14:57:10 +02:00
Rémi Verschelde 1d7a358588
Merge pull request #51399 from RevoluPowered/improve_editor_grid_performance_4.0
[4.0] Implement editor grid performance improvements
2021-08-11 18:21:19 +02:00
Gordon MacPherson 536386eb69 Implement editor grid performance improvements
Benefits:
- Knows the size of the mesh to prevent push back taking longer
- No longer updates grid every frame, only if the camera has moved 10 units or more.
- Considerably less power draw
- Will redraw when you swap from orthographic to perspective and vice versa.
2021-08-11 16:40:03 +01:00
Aaron Franke fa3a32a2d6
Use Key enum instead of plain integers 2021-08-10 16:26:55 -05: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
Aaron Franke 339687e04f
Organize methods in Viewport and explicitly name 3D methods with 3D 2021-08-10 09:10:34 -05:00
Aaron Franke 84f720966c
Use doubles for time in many other places 2021-08-09 14:05:42 -05: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
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
Silc 'Tokage' Renew 4822499d70 Fixed gizmo forced uniform scale and inconsistent rotation 2021-08-03 14:17:22 +09: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
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
Haoyu Qiu 284c6c81eb Make action names translatable 2021-07-31 22:19:51 +08: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
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
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
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
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 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
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 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