Commit graph

6816 commits

Author SHA1 Message Date
Hugo Locurcio b31f6f78a3
Display 2 decimals instead of 1 in editor frametime labels
When comparing different graphics settings or optimizations,
this makes precise measurements and frametime comparisons easier.

This also makes the editor FPS display use `pad_decimals()`
for consistency with the implementation in `master`.
2021-11-09 17:20:59 +01:00
Rémi Verschelde 1f8497d281
Merge pull request #53411 from RandomShaper/ubershaders_3.x 2021-11-09 13:12:44 +01:00
Pedro J. Estébanez 4c710780d4 Implement async shader compilation plus caching for GL ES 3
Async. compilation via ubershader is currently available in the scene and particles shaders only.

Bonus:
- Use `#if defined()` syntax for not true conditionals, so they don't unnecessarily take a bit in the version flagset.
- Remove unused `ENABLE_CLIP_ALPHA` from scene shader.
- Remove unused `PARTICLES_COPY` from the particles shader.
- Remove unused uniform related code.
- Shader language/compiler: use ordered hash maps for deterministic code generation (needed for caching).
2021-11-09 12:19:12 +01:00
Hugo Locurcio 4d35049dc7
Add keyboard shortcuts for grouping and locking nodes, change grid toggle
- Locking nodes can now be done by pressing Ctrl + L, and unlocking with
  Ctrl + Shift + L.
- Grouping nodes is now done by pressing Ctrl + G, and ungrouping with
  Ctrl + Shift + G (similar to Inkscape).
- Toggling the grid is now done by pressing the `#` key
  (also similar to Inkscape). This change was needed as Ctrl + G
  now groups selected nodes.

Different shortcuts are used for the lock/unlock and group/ungroup
actions, so that the shortcuts are idempotent.
2021-11-08 23:38:54 +01:00
Hugo Locurcio b8de40c065
Tweak animation editor icon colors for easier visual grepping
This makes the Linear and Cubic icons in particular easier to
distinguish from each other.

The Cubic interpolation icon's curve was also changed to be
more distinguishable from the Linear icon's curve.
2021-11-08 21:58:11 +01:00
Rémi Verschelde 4b4e92b3d4
Merge pull request #52944 from RandomShaper/property_pin_control_natural_3.x 2021-11-08 18:53:25 +01:00
Pedro J. Estébanez 4dba25b3ff Add property value pinning 2021-11-08 17:42:27 +01:00
Rémi Verschelde 70b521af79
Merge pull request #53013 from Calinou/editor-debugger-bottom-panel-error-warning-highlight-3.x 2021-11-08 13:15:46 +01:00
Rémi Verschelde 5f87d5ebea
Merge pull request #54385 from Calinou/colorpicker-overbright-indicator-tweak-icon-3.x 2021-11-08 13:15:35 +01:00
Pedro J. Estébanez 76b7d23a10 Unify determination of default property values 2021-11-08 11:17:49 +01:00
Rémi Verschelde 0b694eb8e7
i18n: Sync classref translations with Weblate
German (de) is now above the threshold for inclusion.
2021-11-03 15:00:52 +01:00
Rémi Verschelde 74bcf37f90
i18n: Sync editor translations with Weblate
Latvian (lv) is now above the threshold for inclusion.
2021-11-03 14:56:44 +01:00
Yuri Sizov 5ff11a2c5c Add a flag to EditorResourcePicker to differentiate selection contexts 2021-11-02 14:15:14 +03:00
Chained Lupine 44a532e99e
Fix crash in ResourceImporterTexture::_save_stex if webp disabled
Fixes #51535.

(cherry picked from commit 79d4edfca7)
2021-11-02 09:28:46 +01:00
Rémi Verschelde e4996887ca
Merge pull request #48625 from The-O-King/compression_options 2021-11-02 08:58:22 +01:00
Omar El Sheikh 203295f17d Added Mesh Compression Import Options
Fleshed out the "Optimize Mesh" options found in the mesh import UI
Gave a checkbox to every vertex attribute that can be compressed

Surfaced option to enable/disable Octahedral compression for
normal/tangent vectors

Also surfaces the vertex position compression option which previously
inaccessible because the defaults did not compress vertex positions

Supports all current importers (obj, fbx, collada, gltf)
2021-11-01 12:54:28 -04:00
Rémi Verschelde 8580cfb122
EditorSpinSlider: Add arg name for _value_input_gui_input binding 2021-11-01 15:02:44 +01:00
Hugo Locurcio cb441dd9eb
Tweak overbright indicator icon to be more visible on white background
An outline is now present on all sides to ensure it's more visible
when the "new" color (on the right of a ColorPicker) is overbright.
2021-10-29 16:20:40 +02:00
Rémi Verschelde 87c80f529f
clang-format: Enable BreakBeforeTernaryOperators
clang-format keeps breaking the way it handles break *after* ternary operators,
so I give up and go with the only style they seem to actually test.
2021-10-28 14:50:33 +02:00
Rémi Verschelde 1b65550ec7
clang-format: Various fixes to comments alignment from clang-format 13
All reviewed manually and occasionally rewritten to avoid bad auto formatting.
2021-10-28 14:50:32 +02:00
Rémi Verschelde 42d385b312
clang-format: Disable alignment of operands, too unreliable
Sets `AlignOperands` to `DontAlign`.

`clang-format` developers seem to mostly care about space-based indentation and
every other version of clang-format breaks the bad mismatch of tabs and spaces
that it seems to use for operand alignment. So it's better without, so that it
respects our two-tabs `ContinuationIndentWidth`.
2021-10-28 13:23:38 +02:00
Hugo Locurcio d831836b09
Improve appearance of the editor Debugger bottom panel menu
- Make the Debugger bottom panel menu more prominent when
  there are errors or warnings by adjusting the text color.
- Add some spacing to the right of the error/warning icon
  for better visual appearance.
2021-10-27 17:01:10 +02:00
Max Hilbrunner e29126914d
Save all 64 bits of get_ticks_msec() in more cases
(cherry picked from commit 5dc02eb8b0)
2021-10-26 18:23:31 +02:00
Yuri Sizov 7fe0dab69b Add focus font color to Button and derivatives 2021-10-26 17:40:51 +03:00
Rémi Verschelde c3bdcb4516
Merge pull request #53706 from Calinou/action-editor-list-physical-key-first 2021-10-24 23:33:44 +02:00
Rémi Verschelde 4010bb9af0
i18n: Sync editor translations with Weblate 2021-10-23 12:28:40 +02:00
Robin Arys 0bbdfd420a
Fix newly created files not sorted correctly
(cherry picked from commit e69d40cad9)
2021-10-23 12:12:36 +02:00
Robin Arys 5bc44b53f6
Fix support for multiple base types in the quick load dialog
(cherry picked from commit bb7888debb)
2021-10-23 12:09:23 +02:00
Haoyu Qiu bd39b8649e
Update view name after processing orbit view shortcuts
(cherry picked from commit 392d529247)
2021-10-23 11:52:20 +02:00
Rémi Verschelde 7648dd2da9
Merge pull request #53162 from Duroxxigar/3.x-copy-group-name 2021-10-21 11:22:38 +02:00
Duroxxigar bf2449ca92 Backport ability to copy group name 2021-10-21 03:54:44 -04:00
Rémi Verschelde 8425c58991
i18n: Only include editor translations above a threshold
This reduces the size of the editor binaries significantly, as we otherwise
embed all WIP translations, including ones with very low completion ratios,
and end up paying for the size of all `msgid`s for each locale.

Cf. https://github.com/godotengine/godot-proposals/issues/3421 for details.

The thresholds used are:
- 30% for the editor interface (should already include most common strings
  while more obscure ones like UndoRedo action names might be untranslated).
- 10% for the class reference: this is a HUGE resource and 10% is already
  a lot of useful content, especially if focused on the most used APIs.

For 3.x, we also exclude languages that require complex text layout support
to be displayed properly.

This currently reduces the size of the editor binary by 17% on Linux.

The list will be synced manually every now and then.
2021-10-20 14:39:21 +02:00
Rémi Verschelde 0fb135d598
Merge pull request #53779 from m4gr3d/restrict_project_data_dir_config_3x 2021-10-18 22:58:51 +02:00
Rémi Verschelde 2a7e1d0aac
i18n: Sync editor translations with Weblate 2021-10-18 11:58:51 +02:00
Ryan Roden-Corrent 76255d89af
Implement camera orbiting shortcuts.
Fixes godotengine/godot-proposals#2051.
Relates to godotengine/godot-proposals#1215.

Implements shortucts for adjusting the camera rotation in 15-degree
increments, similar to Blender.

I did not add corresponding menu entries for these, as I didn't feel
like they would be too useful from a menu, and didn't want to make the
menu too long.

(cherry picked from commit cb15ec20bb)
2021-10-18 11:24:37 +02:00
Rémi Verschelde a5093d64ac
SCons: List .gen.cpp sources explicitly to avoid globbing errors
Whenever we change the name (or remove) generated cpp files with the `.gen.cpp`
extension, users run into build issues when switching between branches (i.e.
switching before and after the name change/removal). This is because we glob
`*.cpp` so if a now-obsolete file from a previous build is present, we'll
include it too, potentially leading to bugs or compilation failure (due to
missing headers or invalid code).

So globbing patterns in `add_source_files` will now skip files ending with
`.gen.cpp`, which should instead be passed explicitly where they're used.

(cherry picked from commit c133480531)
2021-10-16 10:59:14 +02:00
Hugo Locurcio 52b16f0984
Increase object snapping distances in the 3D editor
- Increase drag-and-drop snapping to 50 units
  (from 10 units).
- Increase Snap Object to Floor maximum height to 500 units
  (from 20 units).
- Increase Snap Object to Floor negative margin to 1 unit
  (from 0.2 units).

(cherry picked from commit 7a3d0b79b4)
2021-10-15 12:51:42 +02:00
Matthew Newall 3149eabdc0
Fixed editor attempting to save a blank scene with save all scenes
(cherry picked from commit e10d0d76bc)
2021-10-15 12:51:38 +02:00
Zae ee4c533ca6 [3.x] Fix EditorSpinSlider freezes editor when tabbing focus rapidly. 2021-10-15 16:52:45 +08:00
Fredia Huya-Kouadio 2b6678c851 Restrict the project data directory configuration. 2021-10-13 13:56:01 -07:00
Rémi Verschelde 779a5e5621
Change editor FPS limit for unfocused mode back to 20 FPS
This was changed in 7991d0fb22 but seems to cause issues
for some projects when using the profiler.

Fixes #51222.
2021-10-12 16:56:09 +02:00
Hugo Locurcio f769e9a864
List Physical Key before Key in the action map input editor
Physical Key should be used for most game inputs as it allows
keys to work on non-QWERTY layouts out of the box.
This is especially important for WASD movement layouts.

In contrast, remapped (non-physical) keys are mainly useful in
non-game applications, where shortcuts are expected to match a
precise letter rather than a location on the keyboard.
2021-10-12 11:57:08 +02:00
Fredia Huya-Kouadio d1808f0a7f Make the project data directory customizable. 2021-10-11 14:42:40 -07:00
Yuri Sizov b02c61ddb1 Ignore OS specific values (constants, project settings, properties)
Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
2021-10-10 23:40:32 +03:00
Zae 5e92619a64
Fix EditorFileSystem not checking .gdignore in existed directory
(cherry picked from commit 70cf3cbd60)
2021-10-10 12:27:51 +02:00
mujpao 64d70d28d4
Fix right clicking sub nodes after renaming parent
(cherry picked from commit f25a698f80)
2021-10-10 12:27:51 +02:00
Haoyu Qiu e7b67fe8ee
Fix make sub-resource crash in AnimationTreeEditor
(cherry picked from commit 274ed82283)
2021-10-10 12:27:51 +02:00
Hugo Locurcio 35d76733b0
Add a "dirty" marker to the editor import dock for unsaved changes 2021-10-10 01:06:05 +02:00
Rémi Verschelde 7843c871d0
Fix missing argument names in FileSystemDock bindings 2021-10-09 00:31:22 +02:00
bruvzg 583c6d303c
Change in-editor documentation style to be closer to online docs.
(cherry picked from commit 1e3c02d590)
2021-10-07 12:48:23 +02:00