Commit graph

6666 commits

Author SHA1 Message Date
Hugo Locurcio 65063dbe0a
Tweak the 2D game camera override tooltips to match 3D
(cherry picked from commit bdca0daadc)
2021-07-06 11:10:44 +02:00
Rémi Verschelde b35e61ba85
Script editor: Rename 'Clone Down' to 'Duplicate Selection'
Fixes #36670.

(cherry picked from commit d41f4aca77)
2021-07-06 11:10:44 +02:00
Питанов Валера 47b9afa3e9 fix lightmap cpu crashes 2021-07-06 01:45:04 +10:00
Rémi Verschelde 5601d86a27
Merge pull request #49915 from Calinou/bakedlightmap-print-time-request-attention-3.x
Print time taken and request attention when lightmaps are done baking
2021-07-01 09:49:21 +02:00
Rémi Verschelde 0e5d249a39
i18n: Sync translations with Weblate
(cherry picked from commit 30bb133e01)
2021-06-29 14:56:54 +02:00
Hugo Locurcio b268fdc980
Use Ctrl + G to toggle the 3D editor grid visibility by default
The 2D editor grid toggle shortcut has been changed to use
`KEY_MASK_CMD` for consistency. This means it will now use Cmd
on macOS instead of Ctrl.

(cherry picked from commit 2cc053c64b)
2021-06-29 14:02:23 +02:00
AndreaCatania eb3ddbc050
Remove early return from gizmo intersect_ray
Remove early returns from `EditorNode3DGizmo::intersect_ray` that is preventing to have gizmos that use Mesh collision + Segment collision + Icon.

(cherry picked from commit 2c12297ee1)
2021-06-29 14:02:22 +02:00
Pedro J. Estébanez cd96e30fee
Remove side effects of scene save
(cherry picked from commit 598fd51277)
2021-06-29 13:13:06 +02:00
kleonc 4ae0310cec
AnimationMultiTrackKeyEdit Allow editing easing if it's possible for all edited tracks
(cherry picked from commit 1d890e16f7)
2021-06-29 13:12:34 +02:00
Lightning_A 898d404f66
Add "Suggest a Feature" to the help dialog.
Links to Godot Proposals's readme.

(cherry picked from commit 70fb239a25)
2021-06-29 13:11:47 +02:00
Hugo Locurcio 8beb57476f
Add keyboard shortcuts to the project manager
- Ctrl + N: New Project
- Ctrl + I: Import Project
- Ctrl + S: Scan for Projects
- Ctrl + E: Edit Project
- Ctrl + R: Run Project
- F2: Rename Project
- Delete: Remove Project
  - Already implemented previously, but moved to use `ED_SHORTCUT()`.

Note that depsite using `ED_SHORTCUT()`, these shortcuts won't appear
in the Editor Settings' Shortcuts dialog and won't be remappable since
the project manager code isn't run in the editor.

(cherry picked from commit 9bda49e030)
2021-06-29 13:11:47 +02:00
Hugo Locurcio bf22de76f7
Allow selecting frames by holding down the mouse in SpriteFrames editor
This complements the existing (Ctrl +) Shift + Left mouse button
multiple frame (de)selection.

(cherry picked from commit 5e8eb20ad6)
2021-06-29 13:11:46 +02:00
Hugo Locurcio d9a2e34357
Print time taken and request attention when lightmaps are done baking
Since lightmap baking can take a very long time, printing the time
spent can be useful for users tweaking the lightmap settings
to optimize bake times.

Completing lightmap baking will also request attention, which is
useful if you're doing something else while waiting for lightmaps
to bake.
2021-06-25 20:58:05 +02:00
Hugo Locurcio 065972a631
Tweak script export text in the export dialog to be more explicit 2021-06-24 10:01:41 +02:00
Hugo Locurcio a9c0c5484f
Add support for contrast-adaptive sharpening in 3D (GLES3 only)
This is an older, easier to implement variant of CAS as a pure
fragment shader. It doesn't support upscaling, but we won't make
use of it (at least for now).

The sharpening intensity can be adjusted on a per-Viewport basis.
For the root viewport, it can be adjusted in the Project Settings.

Since `textureLodOffset()` isn't available in GLES2, there is no
way to support contrast-adaptive sharpening in GLES2.
2021-06-21 15:37:31 +02:00
Yuri Sizov 7120be9ff5 Overhaul the theme editor and improve user experience
Backport of #49388, #49772.
2021-06-21 01:37:54 +03:00
Yuri Sizov 014cb0c33a Refactor Theme item management in the theme editor
Backport of #46593, #46808, #49227
2021-06-20 20:34:37 +03:00
Hugo Locurcio a6a6ad5c08
Add custom debug shape thickness and color options to RayCast
This backports the improved RayCast debug drawing functionality
from the `master` branch.

`ArrayMesh.clear_surfaces()` was also backported from the `master`
branch and exposed because the new debug drawing code requires it.
2021-06-19 06:01:25 +02:00
Marcel Admiraal 7e03bd1671 Remove duplicate WARN_PRINTS macro 2021-06-18 12:57:59 +01:00
Hugo Locurcio 415c1ccaaa
Add a "save on focus loss" editor setting (disabled by default)
This performs a Ctrl + S action every time the editor window loses focus,
saving both scenes and scripts as needed.

(cherry picked from commit f10c30a9ed)
2021-06-17 12:51:21 +02:00
Hugo Locurcio 7991d0fb22
Decrease the editor FPS limit when unfocused from 20 to 10
This provides better power savings compared to the previous value.
This also speeds up project execution slightly while the editor
is running in the background.

The setting hint can now go as low as 1 FPS (1 million microseconds
per frame), for those who really need the best possible power savings.
This will make previewing animated shaders or particles impossible
when the editor window isn't focused though.

(cherry picked from commit 6f6a09cce2)
2021-06-17 12:48:50 +02:00
K. S. Ernest (iFire) Lee 37fdd656c0
ERR_FAIL_NULL check file access
Null in ResourceImporterTexture::_save_stex

(cherry picked from commit b74bc42a43)
2021-06-17 12:47:55 +02:00
Paweł Fertyk 7520e57947
Remove trailing slash from recent dir if needed
(cherry picked from commit 709e71ae9c)
2021-06-17 12:47:55 +02:00
Haoyu Qiu 6c07784dba
Validate parameters when adding plugins
(cherry picked from commit 1a9e3edd30)
2021-06-17 12:47:54 +02:00
Hugo Locurcio dd70aea77c
Fix game camera override tooltips being swapped
Previously, the wrong tooltip was shown.

This also tweaks the tooltips' texts to be clearer and remove
references to "game" (since Godot is used for more than just games).

(cherry picked from commit d1c5dd5b68)
2021-06-17 12:47:54 +02:00
Andrii Doroshenko (Xrayez) 9a087da5d1
Use "Delete" in FileSystemDock on all platforms
The consensus is that the per-platform strings are not so useful in the
first place, so it's better to revert back to "Delete" for every platform.

(cherry picked from commit 77daadac1d)
2021-06-17 12:47:54 +02:00
Andrii Doroshenko (Xrayez) 6aed7e349f
Separate version hash from version number in editor and project manager
When copy-pasting the version from About dialog to bug reports at GitHub,
this makes the version hash linkable to commits at GitHub.

(cherry picked from commit 293550f56a)
2021-06-17 12:47:53 +02:00
Hugo Locurcio 86c72acf4d
Improve radio checkboxes in the default editor theme
(cherry picked from commit 0f4df474c9)
2021-06-17 12:47:53 +02:00
Lightning_A 4f87bd2bc4
Add the ability to reload the current project
(cherry picked from commit a6984f8d28)
2021-06-17 12:47:53 +02:00
fox a61ec597a1
Make easing properties drawn with anti aliasing
(cherry picked from commit 36236843f6)
2021-06-17 12:47:53 +02:00
Hugo Locurcio f88dc1fd44
Fix editor constantly redrawing when freelook is active with still camera
The editor only needs to redraw when the camera is moving.

This helps preserver battery life on laptops when using freelook,
especially with the toggle mode (Shift + F).

(cherry picked from commit 21807f8d88)
2021-06-17 12:47:53 +02:00
daniel-mcclintock a34d5c31b7
Fix out of sync separate distraction-free mode
(cherry picked from commit 45fc6c4706)
2021-06-17 12:47:52 +02:00
Hugo Locurcio f45a2f4dea
Rename "Singleton" to "Global Variable" in the AutoLoad editor
The name "Singleton" was misleading because Godot does not actually
enforce a singleton pattern for autoloads. They can be instanced
multiple times.

"Global Variable" makes it more obvious that all the checkbox does
is expose the AutoLoad with a global variable for easy access.

(cherry picked from commit 1e53bac8b4)
2021-06-17 12:47:52 +02:00
Hugo Locurcio dd2fc60abc
Handle portrait mode monitors in the automatic editor scale detection
Using the smallest dimension of the width and height makes it possible
to support both landscape and portrait monitors.

(cherry picked from commit 728fa3ff71)

EditorSettings: Factor code to compute auto display scale

Also fixes typo introduced in https://github.com/godotengine/godot/pull/48597/files#r652636544.

(cherry picked from commit f862f9a056)
2021-06-17 12:47:52 +02:00
Haoyu Qiu 770de6f579
Don't use the abbrevation "Sep." in UI text
(cherry picked from commit 5046a7d1b1)
2021-06-17 11:49:31 +02:00
Rémi Verschelde 465ab36ddf
Merge pull request #49653 from madmiraal/remove-err_prints-3.x
[3.x] Remove duplicate ERR_PRINTS macro
2021-06-16 17:33:22 +02:00
Rémi Verschelde 9c92ecae21
i18n: Sync translations with Weblate
(cherry picked from commit a812779cc5)
2021-06-16 13:48:12 +02:00
Marcel Admiraal 5a58516231 Remove duplicate ERR_PRINTS macro 2021-06-16 11:56:25 +01:00
Rémi Verschelde b27179130e
Merge pull request #49644 from Calinou/remove-3d-camera-gizmo-icon-3.x
Remove the 3D camera gizmo icon (3.x)
2021-06-16 12:10:36 +02:00
Rémi Verschelde dd81884e6e
Merge pull request #49643 from Calinou/improve-editor-feature-profiles-3.x 2021-06-16 12:10:06 +02:00
Rémi Verschelde a373f1c0e8
Merge pull request #49642 from Calinou/tweak-changes-may-be-lost-color-3.x
Tweak the "Changes may be lost!" text color to match the icon's color (3.x)
2021-06-16 12:08:49 +02:00
Hugo Locurcio 28512bb389
Improve the editor feature profiles UX
- Add an help message when no profile is selected.
  - This replaces the class/property trees which are now hidden
    when no profile is selected.
- Display `(none)` as the current profile when no profile is
  currently active.
- Make the newly created/imported profile the current if it's the
  first profile to be added to the list.
- Make more strings localizable.
2021-06-16 07:04:13 +02:00
Hugo Locurcio 7c8a8d9bf5
Remove the 3D camera gizmo icon
The gizmo icon obstructed the line-based camera gizmo, which made it
difficult to see the actual camera orientation.

This also removes the unused SpatialStreamPlayer gizmo icon.
2021-06-16 07:03:11 +02:00
Hugo Locurcio fd65104ad5
Tweak the "Changes may be lost!" text color to match the icon's color 2021-06-16 06:35:27 +02:00
Hugo Locurcio f36c90b82f
Add a soft line length guideline to the script editor
The default value is 80. The hard line length guideline's default column
has been moved to 100 to account for the new soft line length guideline.

It can be disabled by setting its value to the same column as the
hard line length guideline.
2021-06-16 06:00:02 +02:00
Rémi Verschelde 990b6e7e95
Revert "[3.x] Fix SceneTreeDock::_selection_changed" 2021-06-16 02:34:33 +02:00
Rémi Verschelde 8028122c83
Merge pull request #49486 from unsignedFoo/49451-fix-selection-changed-multinodeeditor-3.x
[3.x] Fix SceneTreeDock::_selection_changed
2021-06-15 15:08:18 +02:00
Rémi Verschelde c45ce768b1
Merge pull request #47854 from mortarroad/3.x-lossless-webp
[3.x] Implement lossless WebP encoding
2021-06-11 19:35:47 +02:00
Morris Tabor 5de08ef1d6 Implement lossless WebP encoding 2021-06-11 18:48:04 +02:00
Yuri Sizov b622dfa956 Use EditorResourcePicker in the Inspector
Backported from #48854
2021-06-11 13:32:15 +03:00
Yuri Sizov 343ba504d3 Add EditorResourcePicker control based on the Inspector editor for Resources
Backported from #47260
2021-06-11 13:32:15 +03:00
Aitor Cereceto f0df770a56 Fix SceneTreeDock::_selection_changed
Now handles properly selecting one single node after
select multiple nodes (MultiNodeEditor)

Fixes #49451
2021-06-10 15:20:13 +02:00
Rémi Verschelde d84d5a9665
Merge pull request #49332 from megalobyte/doc-prev-search
[3.x] Fix previous search for built-in-docs
2021-06-09 11:11:15 +02:00
megalobyte 7408b33895 Fix previous search for built-in-docs 2021-06-08 23:11:42 -07:00
kobewi 6ce63017d5
Don't remap resources belonging to instance
(cherry picked from commit 8e8398209e)
2021-06-07 22:35:38 +02:00
kobewi 117e037235
Don't save built-in script when adding method
(cherry picked from commit a97546d4ea)
2021-06-07 12:14:47 +02:00
Aaron Franke ea476543ea
Rename tabs in the project manager
(cherry picked from commit 7813167196)
2021-06-07 12:13:27 +02:00
Rémi Verschelde 80e1585a6e
Style: Cleanup uses of double spaces between words
Or after punctuation. Tried to leave third-party stuff alone, unless it has
been heavily modified for Godot.

(cherry picked from commit c1c76850cb)
2021-06-07 12:06:59 +02:00
Rémi Verschelde 6580166f39
Merge pull request #48693 from Calinou/editor-import-invert-green-channel-3.x
Add "Normal Map Invert Y" import option for normal maps
2021-06-05 13:36:26 +02:00
Hugo Locurcio dbf75931d0
Add "Normal Map Invert Y" import option for normal maps
This can be used to invert a normal map's Y direction.

The existing Invert import option that inverts all RGB channels
is kept for compatibility with existing projects.
2021-06-04 18:10:34 +02:00
Marcel Admiraal 18825ad4ff Fix game controllers ignoring the last listed button 2021-06-03 15:45:05 +01:00
gongpha 0b8e079eec
New icons for Gradient and GradientTexture resources
(cherry picked from commit 0ed1915053)
2021-06-03 12:24:57 +02:00
trollodel 802ba1d07a
Preview the color animation in the animation editor
(cherry picked from commit 735c8396b0)
2021-06-03 12:24:57 +02:00
kleonc dfee7e71c7
TextureRegionEditor Fix not updating on editing region with autoslice cached
(cherry picked from commit 019c99e538)
2021-06-03 12:24:57 +02:00
Yuri Sizov c82cb25a93
Improve the layout and texts of the Editor Feature Profiles dialog
(cherry picked from commit 00bcfaed85)
2021-06-03 12:24:53 +02:00
bruvzg 36ca3fea96
[3.x] Fix visibility issue with zoom label 2021-06-03 12:32:11 +03:00
Rémi Verschelde b5c445c0c9
i18n: Sync translations with Weblate
(cherry picked from commit 0446cf487f)
2021-06-02 11:10:11 +02:00
Jonas Bernemann 4659b2ad4a Fix overflow in export template manager
Fixes the possible overflow of buttons after downloading the
current export template with using custom fonts or custom font size.

Fix #48826
2021-06-01 22:56:43 +02:00
Rémi Verschelde e0fb05ad30
Merge pull request #49237 from akien-mga/3.x-cherrypicks 2021-06-01 13:35:56 +02:00
Rémi Verschelde fb294606b5
Merge pull request #48771 from LightningAA/scrollcontainer-ensure-item-visible-3.x
[3.x] ScrollContainer: Expose `_ensure_focused_visible` to the scripting API and rename it to `ensure_control_visible`
2021-06-01 12:58:56 +02:00
Haoyu Qiu 0f780084f9
Wrap description TextEdit of plugin config dialog
(cherry picked from commit e83c2cd0c3)
2021-06-01 12:53:31 +02:00
nobuyuki_nyuu 057c9f601b
Bind CanvasItemEditor::_zoom_on_position and CanvasItemEditor::get_state to ClassDB
(cherry picked from commit a715887299)
2021-06-01 12:53:31 +02:00
Emre Aydin a6ff17c0a6
Fixed changing enabled classes resetting folding in manage editor features.
(cherry picked from commit 0f9913ce33)
2021-06-01 12:53:30 +02:00
Hugo Locurcio d71077f463
Improve the audio bus editor appearance
- Use the editor font color for notch lines and text instead of a more
  contrasted color.
- Reuse the editor theme's tooltip styling and apply it on theme change.
- Make the preview label display an explicit `+` sign for positive values.
- Prevent a zero value from displaying as `-0.0 dB` instead of `0.0 dB`.
- Scale notch lines on hiDPI displays.

(cherry picked from commit 534c990e41)
2021-06-01 12:53:30 +02:00
kobewi f7cfdfb1cc
Add preload() to resource path when holding Ctrl
(cherry picked from commit 4bee21bcc4)
2021-06-01 12:53:30 +02:00
Lightning_A 6f58e6ce2c ScrollContainer: Expose _ensure_focused_visible to the API
Was renamed to `ensure_control_visible`
2021-05-31 19:05:30 -10:00
K. S. Ernest (iFire) Lee 6ec9468e75 Backport gltf2 module from master. 2021-05-31 13:18:06 -07:00
Lyuma a330b6829f gltf: Fix mesh nodes which are also bones for 3.x
Fix issue when two skeletons end up directly parented.
Prevent animating TRS for skinned Mesh node.
Fix animating weights on meshes with targets but no weights.
2021-05-28 03:50:54 -07:00
Marcel Admiraal 72446bab1b Update EditorResourcePreview queue_*() documentation 2021-05-26 08:39:52 +01:00
Hugo Locurcio a38b447413
Highlight control flow keywords with a different color
This makes them easier to distinguish from other keywords.
2021-05-25 00:31:39 +02:00
Yuri Roubinsky 8d06dd4371
Fix doc theme not changing when its hidding
(cherry picked from commit 9a5cce35e6)
2021-05-24 12:57:05 +02:00
kobewi f78c276abe
Reset Shader Editor scroll when changing shader
(cherry picked from commit 0ac5be1e67)
2021-05-24 12:56:23 +02:00
kleonc 9f39f8339c Scale zoom values in the SpriteFrames editor for hiDPI displays 2021-05-23 14:25:57 +02:00
Rémi Verschelde 6f31af4c3c
Merge pull request #48977 from kleonc/sprite_frames-editor-zoom-3.x
[3.x] SpriteFramesEditorPlugin Added zooming
2021-05-22 23:52:09 +02:00
kleonc 6481a34478 SpriteFramesEditorPlugin Added zooming 2021-05-22 23:33:27 +02:00
Rémi Verschelde ac3417005d
Merge pull request #48533 from mortarroad/3.x-convex-hull-ported
[3.x] Port Bullet's convex hull computer to replace of QuickHull
2021-05-22 23:23:15 +02:00
Hugo Locurcio c164c07e85
Tweak pressed CheckBox appearance in the editor
This uses the accent color to match pressed CheckButtons after they
were updated. Checked checkboxes are now more prominent in the user's
peripheral vision, which can be useful at times. This also matches
how checkboxes look in most operating systems and web browsers.

(cherry picked from commit 0d27c4d809)
2021-05-22 18:37:56 +02:00
Morris Tabor ba396caefc Replace QuickHull with Bullet's convex hull computer.
The code is based on the current version of thirdparty/vhacd and modified to use Godot's types and code style.

Additional changes:
- backported and extended PagedAllocator to allow leaked objects
- applied patch from https://github.com/bulletphysics/bullet3/pull/3037
2021-05-22 08:16:43 +02:00
Haoyu Qiu a26bed52c0
Fix editor crash when exporting profiler data
(cherry picked from commit be79bdc8ab)
2021-05-21 13:41:27 +02:00
Hugo Locurcio 8063d69abd
List "Argument" for each extra bind argument in the connect dialog
This makes the dialog more explicit.

(cherry picked from commit 994dd314e0)
2021-05-21 13:41:27 +02:00
Hugo Locurcio 5e735a9c1f
Tweak highlight color in the editor Find in Files dialog
The new color is more visible against dark backgrounds.

(cherry picked from commit 82570dec90)
2021-05-21 13:41:27 +02:00
Lyuma a0b8c24d92
Fix incorrect skin deduplication when using named binds
(cherry picked from commit 60f620411e)
2021-05-21 13:41:27 +02:00
Lyuma ec6a3a0d0c
gltf: Fail gracefully when a mesh instance fails.
(cherry picked from commit 5a9eee6b1a)
2021-05-21 13:41:27 +02:00
K. S. Ernest (iFire) Lee d5b6cb4639
When one invalid image fails, it should only fail that single image.
Move to a more graceful degradation 3d asset import model.

(cherry picked from commit a81f4dd5a7)
2021-05-21 13:41:27 +02:00
jfons 2c400a7aae
Fix swapped front/rear directions in viewport rotation control.
(cherry picked from commit e70e33ddcf)
2021-05-21 12:55:25 +02:00
Hugo Locurcio 20f79287cd
Print a warning when importing a repeating NPOT texture in a GLES2 project
Repeating NPOT textures are not guaranteed to be displayed correctly
in GLES2, since the specification does not mandate support for it.

The warning is also displayed in GLES3 projects that are configured
to allow falling back to GLES2.
2021-05-20 20:38:47 +02:00
Rémi Verschelde d025f6f797
Merge pull request #48824 from aaronfranke/3.x-scd-minsize
Set a minimum size for status panel elements in ScriptCreateDialog
2021-05-20 18:03:45 +02:00
Ev1lbl0w 664f1828e2
Fix zip_root not being defined when importing by drag&drop
(cherry picked from commit 056deefa55)
2021-05-20 14:34:32 +02:00
Rémi Verschelde f479a7972f
Merge pull request #48883 from akien-mga/3.x-codespell-2.0.0
[3.x] Fix typos with codespell
2021-05-20 14:32:14 +02:00
Aaron Franke 573b7247bf
Set a minimum size for status panel elements in ScriptCreateDialog 2021-05-20 08:08:24 -04:00
Rémi Verschelde eb78f80f03
Fix typos with codespell
Using codespell 2.0.0.

Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
curvelinear
dof
doubleclick
fave
findn
GIRD
leapyear
lod
merchantibility
nd
numer
ois
ony
que
seeked
synching
te
uint
unselect
webp
EOF

$ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"
$ git diff // undo unwanted changes
```
2021-05-20 12:56:56 +02:00
Aaron Franke 1154b6264c
[3.x] Make is_equal_approx have explicit float and double versions 2021-05-20 06:50:09 -04:00
Hugo Locurcio a45db4c208
Fix crash when trying to save with no scenes and scripts open
This could occur when attempting to save project settings when
no scenes or scripts are open (which is common in a brand new project).

(cherry picked from commit 16876bec76)
2021-05-19 15:24:31 +02:00
Hugo Locurcio a9df687db6
Increase the TileSet editor's snap step to 1024
This also tweaks the autotile bitmaks mode property hint string.
2021-05-18 23:38:22 +02:00
Rémi Verschelde 72647cc55c
i18n: Sync translations with Weblate
(cherry picked from commit bcedd09742)
2021-05-18 12:09:38 +02:00
Rémi Verschelde 0a4eb472cf
Revert "Tweak lightmapper warning message to mention Rosetta emulation on macOS"
This reverts commit 47f869b731.

This is no longer needed after #48455.
2021-05-18 11:58:09 +02:00
Rémi Verschelde a246dceb51
FileSystem dock: Fix search shortcut
Follow-up to 533d3e7800 which used a shortcut
not defined in 3.x.
2021-05-17 13:32:44 +02:00
fox 533d3e7800
Make shortcut for focusing searchbar in filesystem dock
(cherry picked from commit 22e2e4334e)
2021-05-17 13:11:07 +02:00
kleonc 0a91c8e972
Fix crash after disabling plugin using set_force_draw_over_forwarding_enabled()
(cherry picked from commit 5a8314016a)
2021-05-17 13:09:14 +02:00
Hugo Locurcio 2eea00b036
Add "Support Godot Development" option to the editor's Help menu
(cherry picked from commit 3eae2f9c6d)
2021-05-17 13:06:11 +02:00
Pedro J. Estébanez 817ffc01e1
Make all file access 64-bit (uint64_t)
This changes the types of a big number of variables.

General rules:
- Using `uint64_t` in general. We also considered `int64_t` but eventually
  settled on keeping it unsigned, which is also closer to what one would expect
  with `size_t`/`off_t`.
- We only keep `int64_t` for `seek_end` (takes a negative offset from the end)
  and for the `Variant` bindings, since `Variant::INT` is `int64_t`. This means
  we only need to guard against passing negative values in `core_bind.cpp`.
- Using `uint32_t` integers for concepts not needing such a huge range, like
  pages, blocks, etc.

In addition:
- Improve usage of integer types in some related places; namely, `DirAccess`,
  core binds.

Note:
- On Windows, `_ftelli64` reports invalid values when using 32-bit MinGW with
  version < 8.0. This was an upstream bug fixed in 8.0. It breaks support for
  big files on 32-bit Windows builds made with that toolchain. We might add a
  workaround.

Fixes #44363.
Fixes godotengine/godot-proposals#400.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2021-05-16 17:52:31 +02:00
Rémi Verschelde 50f4c90205
i18n: Sync translations with Weblate
(cherry picked from commit f6c29d1cf5)
2021-05-14 13:23:57 +02:00
Yuri Sizov fc67ff3d0a
Keep custom editor theme when changing editor settings
(cherry picked from commit 56aedcee17)
2021-05-14 10:34:48 +02:00
Daniel Lungaro ede0d47ccd
Remove plugin from enabled if there's an error
inform user in warning message

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>

Refactor remove plugin from enabled

(cherry picked from commit 2bae31a4df)
2021-05-14 10:34:05 +02:00
llschuster 2a18909210
text-editor: fix Clicking warning doesn't center around line
(cherry picked from commit 6b55ec2ca9)
2021-05-13 23:22:54 +02:00
Yuri Sizov 01524c0430
Fix EditorPropertyEasing capturing drag events originated outside of it
(cherry picked from commit 31db95b048)
2021-05-13 23:22:06 +02:00
davidh ae2bc66eae Check for valid DynamicFontData before duplicate 2021-05-13 11:32:57 -05:00
Lightning_A 0c55ab1bb4 Add the ability to remove project contents from the remove project dialog 2021-05-11 11:06:37 -06:00
Hugo Locurcio 7027791959
Hide the 3D editor selection box when View Gizmos is disabled 2021-05-10 19:28:32 +02:00
Rémi Verschelde 6e920d0c14
TileSet: Fix signal disconnect error in some situation
Fixes second issue in #45938.

Co-authored-by: kleonc <9283098+kleonc@users.noreply.github.com>
2021-05-10 15:07:27 +02:00
Hugo Locurcio c318cf6ed2
Save the current script when pressing Ctrl + S if no scene is open
- Tweak the dialog messages to be more informative.
  - The "Saved N modified resources" dialog is not a warning per se,
    so make it more explicit.

(cherry picked from commit 39f9b92f54)
2021-05-09 17:47:38 +02:00
Kyle b47cd82f76
Add ctrl+shift+a to instance scene in scenetree dock
Adds another key shortcut to instance a scene in the scentree dock. Complements ctrl+a to add a node.

(cherry picked from commit ea5445655c)
2021-05-09 17:47:38 +02:00
Hugo Locurcio 8b06085249
Implement the %command% placeholder in the Main Run Args setting
This can be used to tell Godot to run an executable that will run Godot
rather than running Godot directly. This is useful to make Godot start
on the dedicated GPU when using a NVIDIA Optimus setup on Linux:
`prime-run %command%`

The `editor/run/main_run_args` setting declaration was moved to make it
visible in the ProjectSettings documentation.

(cherry picked from commit ce4aa07276)
2021-05-09 17:47:38 +02:00
Hugo Locurcio dc42ef2df9
Save the current script when adding a new method via signal connection
This makes it possible for external editors to pick up the changes.
Most modern editors should reload the file automatically,
but some older/lightweight editors may ask the user instead
(or only warn after trying to save in the external editor).

This closes #41283.

(cherry picked from commit 0ade686601)
2021-05-09 17:41:10 +02:00
Hugo Locurcio f4e653d88f
Improve the editor audio preview inspector appearance and functionality
- Make the timeline indicator thicker and with an indicator triangle,
  similar to the animation editor timeline.
- Add Space bar shortcut to play/pause the audio preview.
- Only seek when clicking or dragging with the left mouse button,
  not other mouse buttons.

(cherry picked from commit a50a81b703)
2021-05-09 17:41:09 +02:00
Hugo Locurcio 9f31877e15
Fix EditorPropertyResource focus outline being drawn behind the preview
(cherry picked from commit 0b47f1be8c)
2021-05-09 17:14:36 +02:00
Hugo Locurcio 30ec3870c9
Tweak the setting hint for the custom editor theme setting
The custom editor theme is only visible after restarting the editor.

(cherry picked from commit 027301fec7)
2021-05-09 17:14:36 +02:00
Kyle 629c3e2a0a
Remove extra separator
Removes an extra separator when Scene Tree Editing is disabled. Discussed in #48518

(cherry picked from commit e168baf433)
2021-05-09 17:14:36 +02:00
Kyle f711464030
Fixed cut/copy/paste visibility
Fixes #48514 by moving the visibility of these buttons into their own if statement that depends on if scene tree editing is allowed. Previously it was under the script editing setting which is unexpected as it works with nodes and the scene tree.

(cherry picked from commit 10d5d4d3cd)
2021-05-09 17:14:36 +02:00
Rémi Verschelde c8c8bcee50
Merge pull request #48540 from Calinou/editor-theme-allow-negative-contrast-3.x
Allow negative contrast values in the editor theme settings (3.x)
2021-05-09 16:38:02 +02:00
Pedro J. Estébanez 4da9a501f6 Add animation reset track feature
As a bonus, to have consistency between use Beziers and create insert tracks, use Beziers also gets a default via editor settings that is used when the confirmation dialog is disabled, instead of just falling back to creating non-Bezier tracks.
2021-05-09 09:40:16 +02:00
Hugo Locurcio e7e2ef0767
Allow negative contrast values in the editor theme settings
When using a negative contrast value, the base color will be lightened
to create the derivative colors instead of being darkened.

This can lead to better-looking themes, especially for light themes.
2021-05-07 18:14:52 +02:00
bruvzg dab4cf3ed6
Add physical_scancode (keyboard layout independent keycodes) to InputEventKey and InputMap.
Fix non-latin keyboard layout keycodes on Linux/X11 (fallback to physical keycodes).
2021-05-06 23:19:45 +03:00
Hugo Locurcio 42a4bd1ca2
Tweak the built-ins color highlighting in the shader editor
This makes built-ins easier to distinguish from keywords at a
quick glance.
2021-05-06 17:51:36 +02:00
Rémi Verschelde f34a8c7f0e
Merge pull request #47527 from Calinou/editor-translations-allow-multiple-selection-3.x
Allow selecting multiple files in the editor translation/remap dialogs (3.x)
2021-05-06 08:49:24 +02:00
Hugo Locurcio 35887a2afe
Allow selecting multiple files in the editor translation/remap dialogs
This makes it faster to add several translations.

The undo/redo messages were also tweaked to give better context.
2021-05-06 03:02:15 +02:00
Aaron Franke e82f56e3a9
Update size when updating ScriptCreateDialog 2021-05-05 18:10:17 -04:00
CaptainProton42 76f3f6949e
Fix 3D scene preview generation.
File system dock previews will now be generated for 3D scenes when no
editor feature profile is set.

(cherry picked from commit 16304aaa3b)
2021-05-05 15:28:12 +02:00
Rémi Verschelde 140350d767
Style: Enforce braces around if blocks and loops
Using clang-tidy's `readability-braces-around-statements`.
https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2021-05-05 15:02:01 +02:00
Rémi Verschelde 0bf06c25a3
Merge pull request #48450 from Calinou/version-click-to-copy-3.x
Make it possible to copy the Godot version identifier by clicking it (3.x)
2021-05-04 17:55:43 +02:00
Rémi Verschelde b4af1eba0a
Style: Enforce use of bool literals instead of integers
Using clang-tidy's `modernize-use-bool-literals`.
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-bool-literals.html
2021-05-04 16:39:13 +02:00
Hugo Locurcio 1ceb603de8
Make it possible to copy the Godot version identifier by clicking it
This closes #24317.
2021-05-04 16:38:17 +02:00
Rémi Verschelde a828398655
Style: Replaces uses of 0/NULL by nullptr (C++11)
Using clang-tidy's `modernize-use-nullptr`.
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html
2021-05-04 16:30:23 +02:00
Rémi Verschelde b5e1e05ef2
Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2021-05-04 14:45:16 +02:00
Rémi Verschelde 64a63e0861
Style: clang-format: Disable AllowShortCaseLabelsOnASingleLine 2021-05-04 14:45:15 +02:00
Rémi Verschelde 3d15f04668
Style: clang-format: Disable AllowShortIfStatementsOnASingleLine 2021-05-04 14:45:15 +02:00
Rémi Verschelde 6e600cb3f0
Style: Set clang-format Standard to c++14 2021-05-04 14:45:15 +02:00
Michael Alexsander ae99339e9f
Add comment highlighting to script thumbnails
(cherry picked from commit 46e0161737)
2021-05-03 21:39:44 +02:00
Mateo Kuruk Miccino 71a9932f38
FileSystem: Force update when we delete a folder from the editor and searching changes only if we change the directory successfully in the scan_fs_changes
(cherry picked from commit dc76938679)
2021-05-03 21:39:44 +02:00
kleonc 93cb416423
TileMapEditor Modulate autotile previews
(cherry picked from commit 3f1b95cfb1)
2021-05-03 21:39:44 +02:00
kleonc bf63878141
TileMapEditor::_bucket_fill Check autotile coordinates only if autotile is selected
(cherry picked from commit a1b903066e)
2021-05-03 21:39:44 +02:00
Hugo Locurcio 81ca8e4e7e
Add the About dialog to the project manager
The About button is located in the bottom-right corner of the
project manager.

This allows removing the copyright notice from the window title
(which looked a bit ugly in comparison to other applications).
2021-05-02 00:01:23 +02:00
Rémi Verschelde 48cc756f88
Merge pull request #37067 from zaksnet/multiple-editor-instances
Automatic remote debugger port assignment.
2021-05-01 12:57:35 +02:00
Zak c3cfb87548 Allow multiple editor instances to use different ports
Previously if more than one Godot editor was running then the debugger of one editor would not work because both editors were trying to connect on the same port.
This commit attempts to fix this by allowing the debugger to change the port at runtime in such cases.
2021-05-01 11:32:10 +02:00
bruvzg 301bedd5d4
Duplicate DynamicFontData resources in the editor preview generation thread to avoid race condition. 2021-04-29 23:27:52 +03:00
Rémi Verschelde 0c14d10522
Merge pull request #48296 from akien-mga/3.x-cherrypicks 2021-04-29 13:48:49 +02:00
Rémi Verschelde 880b830ca8
Merge pull request #46292 from hilfazer/nested_scene_instances_duplication 2021-04-29 13:31:27 +02:00
Rémi Verschelde 70ae90e0e8
Core: Drop custom copymem/zeromem defines
We've been using standard C library functions `memcpy`/`memset` for these since
2016 with 67f65f6639.

There was still the possibility for third-party platform ports to override the
definitions with a custom header, but this doesn't seem useful anymore.

Backport of #48239.
2021-04-29 12:34:11 +02:00
Aaron Franke d304187357
Warn when creating a script with the same name as the parent class
(cherry picked from commit 5a9037f828)
2021-04-29 12:23:33 +02:00
Michael Alexsander 917630107c
Select non-perfect matches if necessary in the Search Help dialog
(cherry picked from commit 77597ea47c)
2021-04-29 11:41:51 +02:00
Michael Alexsander b406e904ec
Fix EditorInspector not updating its theme on rare occasions
(cherry picked from commit efa3927b49)
2021-04-29 11:40:13 +02:00
lupoDharkael a5842a8362
Save resource: implement extension priority
give .res less priority and .tres more priority as preferred
extensions.

(cherry picked from commit f2e906496b)
2021-04-29 11:27:56 +02:00
Rafał Mikrut 06976c3e84 [3.x] Fix crashes when using _input functions 2021-04-27 16:51:29 +02:00
ray90514 bf645099a1
Fix multi-selection doesn't correctly show in the inspector
(cherry picked from commit 16decbc0ee)
2021-04-26 13:15:29 +02:00
Hugo Locurcio e2934a04e2
Allow Center Selection to work without any selection in 2D/3D editors
When there is no selection, the camera will center around the
world origin.

This helps people get back to the world center if they haven't added
any nodes yet.

(cherry picked from commit fc055e1993)
2021-04-26 13:15:28 +02:00
kobewi b824895065
Allow to drop files on filtered scene tree
(cherry picked from commit 4e64c9fd4d)
2021-04-26 13:15:28 +02:00
Hugo Locurcio 4881d96ef0
Display scene file extensions in the editor only if there's ambiguity
This also simplifies the Editor Settings as the extension is now
automatically shown to avoid ambiguity.

(cherry picked from commit 218d124755)
2021-04-26 13:15:28 +02:00
kobewi 645842e0e8
Save project after opening
(cherry picked from commit 76240515d8)
2021-04-26 13:15:28 +02:00
Kyle cc419fcf8f
Fixes ctrl-click function line centering
When ctrl-clicking in the code editor, the view will now be centered on the function result.

Also replaces a circumstance where goto_line_centered should be used.

(cherry picked from commit 2b775bd698)
2021-04-26 13:07:59 +02:00
Shatur95 41e7cefaa4
Move duplicated code into a function
(cherry picked from commit a1cfc1032c)
2021-04-26 13:07:59 +02:00
Hugo Locurcio 58393b544b
Tweak error messages for the Save Branch as Scene editor option
See https://github.com/godotengine/godot-proposals/issues/2433.

(cherry picked from commit 4c8f458c90)
2021-04-26 13:07:59 +02:00
Ev1lbl0w c2b85ed865
Allow Godot to import .ZIP files with non-regular structure
(cherry picked from commit 9b1db715fd)
2021-04-26 13:07:58 +02:00
Nathan Franke 1001bea7ac
Collapse Resource Preview Properly
(cherry picked from commit 98c46cbf26)
2021-04-26 13:07:58 +02:00
Lightning_A a853cf25f6
Remove current export template version from "Installed Versions"
**Not tested** (I don't have an easy way to test currently). Resolves https://github.com/godotengine/godot-proposals/issues/2394 .

(cherry picked from commit c562c6943f)
2021-04-26 12:52:15 +02:00
Hugo Locurcio 7cb77a859a
Add a menu action to open C++ source on GitHub in the editor debugger
This helps user find back the source code where the error/warning
was emitted from.

(cherry picked from commit 5bc746e60a)
2021-04-26 12:52:15 +02:00
Sushi 79f48642a8
Fix: Selection Only in Find/Replace now preserves selection
(cherry picked from commit a4d5664858)
2021-04-26 12:52:15 +02:00
Hugo Locurcio a989e08839
Improve error messages for missing export presets when using --export
- Display a specific error message if the project doesn't have an
  `export_presets.cfg` file.
- Display a list of detected export presets if an invalid export
  preset name is supplied.

(cherry picked from commit 09f38ea215)
2021-04-26 12:20:28 +02:00
Hugo Locurcio 94e0d02079
Strip leading/trailing whitespace for project name in the project manager
This affects creating projects and renaming them.

(cherry picked from commit 86455d0c58)
2021-04-26 12:20:28 +02:00
Rémi Verschelde 32c1bada99
Merge pull request #47827 from Chaosus/vs_fix_default_input_overriding_3.2
[3.x] Prevents default values of VSNodeCustom from overriding by a script
2021-04-23 22:06:08 +02:00
Bhuvan Vemula 1c1ec81455
instance-scene: make parent as edited_scene if no parent selected.
(cherry picked from commit 9eb3546f38)
2021-04-23 21:52:21 +02:00
Hugo Locurcio 47f869b731
Tweak lightmapper warning message to mention Rosetta emulation on macOS 2021-04-22 15:57:52 +02:00
Rémi Verschelde 305c364c13
i18n: Sync translations with Weblate 2021-04-21 09:40:43 +02:00
Rémi Verschelde d91b780cf8
Merge pull request #48058 from lyuma/legacy_names_gltf_3.3
Add an import setting use_legacy_names for 3.3 compatibility.
2021-04-21 08:57:12 +02:00
Lyuma d92a172879 Add an import setting use_legacy_names.
During the development of 3.3, internationalization features were added to allow arbitrary bone and node names.
However, doing so will break all references and existing animation clips for projects upgraded from 3.2
This adds an import setting, enabled by default, but disabled for newly generated .import files which restores the old behavior.
2021-04-20 22:48:52 -07:00
kleonc 7a776d68b6
ProjectSettingsEditor: Make "Type" OptionButton item ids match corresponding Variant::Type enum values.
(cherry picked from commit f8f12d0564)
2021-04-20 20:12:52 +02:00
Rémi Verschelde 2335da5af2
Merge pull request #47742 from mortarroad/3.x-fix-gltf-bone-names-space
[3.3] fix gltf importer regression from b032067e42, causing different BoneAttachment names
2021-04-20 20:12:41 +02:00
Hugo Locurcio 8e54573dfc
Add a tooltip to document performance issues of the Remote scene tree
(cherry picked from commit 6d2f5ee244)
2021-04-14 13:29:59 +02:00
Yuri Roubinsky ac91e2ca0d [3.2] Prevents default values of VSNodeCustom from overriding by a script 2021-04-12 14:52:19 +03:00
kobewi f72c91e0b1
Expose edit_node() for editor plugins
(cherry picked from commit 72014a7a2e)
2021-04-12 09:24:37 +02:00
Aaron Franke 9b928cbd9e
Show a message when trying to zoom farther than the limit
(cherry picked from commit b8f66d58b6)
2021-04-12 00:23:43 +02:00
Haoyu Qiu 14cea66f23
Fixes Node3D rotation in select mode on macOS
(cherry picked from commit 879a290ed9)
2021-04-12 00:23:43 +02:00
Rémi Verschelde f3476b66c4
Merge pull request #47213 from timothyqiu/project-icon-size-3.x
[3.x] Fix project icon size in Project Manager
2021-04-12 00:08:40 +02:00
Haoyu Qiu bfa5adb84f Fix 3D selection box size for Spatial 2021-04-11 19:01:37 +08:00
Morris Tabor d9e9aec9b9 fix gltf importer regression from b032067e42, causing different BoneAttachment names 2021-04-09 10:25:45 +02:00
Yuri Sizov ea5b3dda93
Expose editor scale to the plugin API
(cherry picked from commit ea31af68ba)
2021-04-06 10:18:20 +02:00
Hugo Locurcio 566213e08d
Add a subtle background to editor scrollbars
This makes it possible to see whether a scrollbar grabber is at the top
or at the bottom of a scrollbar. Also, if a scrollable area is very
large, this makes it easier to notice that the area can be scrolled
(since the grabber is proportionally very small).

The scrollbar grabbers were also made thicker and slightly more opaque
for better visibility, especially in peripheral vision.

(cherry picked from commit b60b6ddba4)
2021-04-06 10:04:51 +02:00
Rémi Verschelde 5cfdb86660
i18n: Sync translations with Weblate 2021-04-05 16:30:04 +02:00
megalobyte 724a18cf72
Use double when setting the default step size
Casting it as a float was causing issues with the progress bar

(cherry picked from commit d0f3817876)
2021-04-05 12:01:18 +02:00
AndreaCatania bd5663e2cf
Fixes editor crash on closing
Fixes editor crash when the gizmo is destroyed and the `SceneTree` is already freed.

(cherry picked from commit 79f55fcded)
2021-03-31 12:47:54 +02:00
Rémi Verschelde cca2637b9b
i18n: Sync translations with Weblate 2021-03-30 00:03:07 +02:00