Commit graph

506 commits

Author SHA1 Message Date
Bram Stolk
4bc513edbc Add missing initializations for Node3DEditor.
Do not try to format fields with garbage values in _snap_update()
Initialize grid_enable[] before use.
Initialize previewing_camera before use.
These are all cases found live, with valgrind.
Fixes #76925
2023-05-11 08:16:04 -07:00
Hendrik Brucker
dc46163b12 Improve editor state persistence 2023-05-11 04:17:03 +02:00
Manik Sharma
3ce0ebb242 Make environment energy adjustable as a float in 3D editor's preview environment 2023-05-05 09:01:46 +05:30
Manik Sharma
5e1cb39101 Make sun energy adjustable as a float in the 3D editor's preview sun 2023-05-04 10:34:07 +05:30
Rémi Verschelde
8f7b09916d
Merge pull request #76026 from YuriSizov/editor-running-up-that-gui
Extract editor run toolbar into its own component
2023-04-26 12:15:29 +02:00
smix8
808af8e837 Split Node3DGizmos into dedicated files
Splits Node3DGizmos into dedicated files.
2023-04-20 20:12:47 +02:00
Yuri Sizov
8a74d8438f Extract editor run toolbar into its own component
- Simplify and update its logic.
- Simplify EditorScript.
- Improve EditorNode and other relevant includes.
- Fix scene-based path in the movie writer when
reloading a scene.
2023-04-19 17:12:28 +02:00
Rémi Verschelde
fff0ee0fc4
Merge pull request #75822 from YeldhamDev/no_multi_zero
Remove unnecessary zero multiplications
2023-04-11 19:40:40 +02:00
Rémi Verschelde
c5d9470c7c
Merge pull request #75765 from YuriSizov/editor-node-optimize-includes
Improve includes of `EditorNode` (and everything else)
2023-04-11 19:40:24 +02:00
kobewi
b0eadcfbce Initialize editor values on first launch 2023-04-09 09:52:18 +02:00
Michael Alexsander
f057d755ab Remove unnecessary zero multiplications 2023-04-08 09:31:05 -03:00
Yuri Sizov
4154039832 Improve includes of EditorNode (and everything else)
Also start organizing editor-specific GUI components
into a dedicated folder, `editor/gui`.
Also move `editor_file_server` next to the rest of debugger classes.
2023-04-07 18:59:49 +02:00
kobewi
45b47d5584 Properly remember snapping options per-project 2023-03-09 21:12:26 +01:00
Ryan Roden-Corrent
d3d1223b97
Don't unset local_coords on starting transform.
This fixes a bug introduced by 806425621c, where dragging the gizmo no longer respected local transforms.

I'm not sure why I called set_local_coords_enabled(false) in _compute_edit. Removing this line seems to fix gizmo-dragging local transforms, without breaking anything else.

I also noticed that confirming a transform leaves the gizmo axis lines on the screen. This is fixed by calling update_transform_gizmo after clearing the edit mode/instant flags, so update_transform_gizmo knows not to render any axes.
2023-03-08 07:13:37 -05:00
Rémi Verschelde
c3c425c25f
Merge pull request #71156 from EricEzaM/71113-cancelling-node-selection-with-escape-breaks-shape-editing-undo
Fix cancelling selection (pressing escape) while gizmo editing making uncommitted changes.
2023-03-07 12:03:42 +01:00
Rémi Verschelde
e404a7a8ee
Merge pull request #59443 from rcorre/blender-xform-local-space
Disable local space for blender transforms.
2023-03-07 12:00:17 +01:00
Rémi Verschelde
d76c1c4f45
Merge pull request #73651 from hakro/editor-freelook-physical-shortcuts
Use physical shortcuts for freelook navigation in the editor
2023-03-03 11:02:53 +01:00
clayjohn
c69b14e96e Add warnings for unsupported features in mobile and gl_compatibility backends 2023-02-26 12:28:02 -08:00
bruvzg
cebfc02d6f
Revert "Reordering emitted signals in PopupMenu" and fix editor selection issue in the safer way. 2023-02-24 21:17:05 +02:00
Hakim
52de40310a Use physical shortcuts for freelook navigation in the editor 2023-02-21 10:56:14 +01:00
Rémi Verschelde
b2584629c8
Merge pull request #73195 from timothyqiu/weblate-comments
Improvements and fixes based on Weblate comments
2023-02-17 09:55:39 +01:00
Rémi Verschelde
56d78c32f7
Merge pull request #68558 from dzil123/remove_duplicate_wireframe
Node3DEditorViewport - Remove duplicate wireframe check and cleanup
2023-02-14 13:36:52 +01:00
Ryan Roden-Corrent
806425621c
Disable local space for blender transforms.
Having local_space enabled when starting a transform changed the
behavior of VIEW space transforms. Now we disable local_space when
starting a blender transform (there was already logic to restore the
setting after the transform ends).

This also hides the gizmo while performing a blender transform,
otherwise the user will see it snap back and forth between the local and
global alignment. I think the transform looks cleaner with the gizmo
hidden anyways.

Fixes #59392.
2023-02-13 18:09:44 -05:00
Haoyu Qiu
84aee17901 Improvements and fixes based on Weblate comments
* Description of `ui_text_submit` action should be "Submit Text" instead of "Text Submitted".
* Spell out "Animation" instead of using "Anim.".
* Treat "Max" as regular word instead of writing "Max.".
* Use generic "Set %s" for action name instead of a dedicated "Set target_position".
* Add translator comment for:
    * "Inclusive" and "Self" in the profiler.
    * Places where it needs the context about being an editor progress label.
    * "Duplicated Animation Name" since it's refering to the new name of a duplicated animation.
    * Disambiguation of "View Plane Transform", "Paste Selects" and "Display Normal".
* Fix wrong undo action name for renaming an input action.
* Fix missing end quote in a shader error message.
* In class reference:
    * Fix duplicated "if" in the description of `signf()`.
    * Fix mismatched example output in `String.operator %()`.
    * Fix typo in the description of `Decal.texture_emission`.
    * Unify description of `String.match()` and `StringName.match()`.
2023-02-13 15:22:18 +08:00
Silc Renew
1459b9c24c Fix scaled_orthogonal() & subgizmo global scaling 2023-02-04 00:46:04 +09:00
Silc Renew
9bd63acbd8 Fix scale tool with view plane is weird in 3D 2023-01-30 17:14:34 +09:00
Eric M
4074c647e4 Fix 3D editor Perspective/Ortho shortcut inconsistency 2023-01-21 23:18:13 +10:00
Rémi Verschelde
bcaf048f33
Merge pull request #71379 from KoBeWi/destruction_of_compatibility_function
Remove set_drag_forwarding_compat()
2023-01-18 17:40:13 +01:00
kobewi
b58111588a Add EditorUndoRedoManager singleton 2023-01-16 01:11:52 +01:00
kobewi
59ea36b87c Remove set_drag_forwarding_compat() 2023-01-14 15:16:51 +01:00
Juan Linietsky
e6a4debede Change set_drag_forwarding() to use callables.
* This solution is much cleaner than the one in 3.x thanks to the use of callables.
* Works without issues in any language (no need to worry about camel or snake case).
* Editor code uses a compatibility function (too much work to redo).

Fixes #59899
2023-01-10 14:09:24 +01:00
Eric M
871ddf80c0 Fix cancelling selection (pressing escape) while gizmo editing making uncommitted changes.
* Pressing escape while gizmo editing will discard the changes made during that edit 'session'
2023-01-10 21:30:07 +10:00
Juan Linietsky
2b815df3c1 Use BitField<> in core type masks
* All core types masks are now correctly marked as bitfields.
* The enum hacks in MouseButtonMask and many other types are gone. This ensures that binders to other languages non C++ can actually implement type safe bitmasks.
* Most bitmask operations replaced by functions in BitField<>
* Key is still a problem because its enum and mask at the same time. While it kind of works in C++, this most likely can't be implemented safely in other languages and will have to be changed at some point. Mostly left as-is.
* Documentation and API dump updated to reflect bitfields in core types.
2023-01-08 22:17:40 +01:00
Rémi Verschelde
1d14c054a1
Merge pull request #70907 from xiongyaohua/fix_path3d_gizmo_not_show
Remove side effect of the `handles` method
2023-01-05 15:01:29 +01:00
Rémi Verschelde
d95794ec8a
One Copyright Update to rule them all
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.

It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).

We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).

Also fixed "cf." Frenchism - it's meant as "refer to / see".
2023-01-05 13:25:55 +01:00
Yaohua Xiong
20f909219e Remove side effect of the handles method 2023-01-04 20:09:10 +08:00
Adam Scott
ea33001b95 Add safety-checks before some servers free() 2022-12-29 16:23:38 -05:00
Hugo Locurcio
a3eac5fc7c
Move transparent background project setting to a subsection
This prevents the project setting from being located directly within
a root category, which is confusing from an UX perspective in the
project settings editor.
2022-12-17 18:45:21 +01:00
Fredia Huya-Kouadio
3083455002 Update the visibility logic for the spatial editor navigation controls 2022-12-13 17:46:12 -08:00
Haoyu Qiu
f6ae2f2fd5 Use ObjectID as argument when referred-calling _request_gizmo
Fixes crash on project launch.
2022-12-10 18:52:10 +08:00
Rémi Verschelde
f9bd2ace0b
Merge pull request #68682 from timothyqiu/camera-gizmo-size
Make Camera3D gizmo the same aspect ratio as its viewport
2022-12-07 13:25:35 +01:00
Markus Sauermann
e18107a57c Fix Determining Window for Touchscreen
DisplayServer::screen_is_touchscreen will likely never utilize its
parameter p_screen.
This PR replaces this function by DisplayServer::is_touchscreen_available()
with the same functionality.
This solves the problem, that a SubViewport was used for determining
the screen, which resulted in error messages.
2022-12-07 09:54:29 +01:00
Rémi Verschelde
1db23e472b
Merge pull request #69525 from m4gr3d/polish_navigation_controls_opacity_main
Minor tweaks/polish to the navigation controls to prevent interference
2022-12-05 11:32:43 +01:00
Fredia Huya-Kouadio
eacb29c007 Minor tweaks/polish to the navigation controls to prevent interference:
- Reduce controls size
- Enable opacity on hover to increase visibility
2022-12-02 23:17:38 -08:00
Fredia Huya-Kouadio
18b924def7 Enable the navigation controls for touchscreen by default 2022-12-02 20:47:32 -08:00
Fredia Huya-Kouadio
1566f3d49f Add navigation control to the node3d editor viewport 2022-11-29 17:43:16 -08:00
trollodel
c90d0bd84f Use forward-declarations in big editor classes 2022-11-29 09:59:43 +01:00
Rémi Verschelde
6d2a7cb46d
Merge pull request #68709 from MewPurPur/instance-begone-part3
Remove more instances of 'instance' being used as a verb
2022-11-16 14:41:42 +01:00
VolTer
3b4f5f8a04 Remove more instances of 'instance' being used as a verb 2022-11-16 14:01:53 +01:00
Haoyu Qiu
6c5dc78f59 Make Camera3D gizmo the same aspect ratio as its viewport 2022-11-15 17:31:53 +08:00