Commit graph

8161 commits

Author SHA1 Message Date
Rémi Verschelde e248d2629a
Merge pull request #50662 from SirQuartz/patch-25
Fix visual script icons
2021-07-21 00:23:52 +02:00
Nick Huelin e50ab50169 Fix visual script icons
This pull request fixes an issue where the visual script icons weren't representative of their data.
2021-07-20 17:23:42 -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
foxydevloper 1d0a437b2d Make "remove action" translatable in Input Map 2021-07-20 14:07:42 -04:00
Rémi Verschelde bb037de95c
Merge pull request #50649 from KoBeWi/🐛
Fix Change Node Type after Add Node Here
2021-07-20 17:24:27 +02:00
Rémi Verschelde 67d3195c60
Merge pull request #50648 from foxydevloper/remove-weird-prints
Remove leftover prints when using shader global variables
2021-07-20 17:23:39 +02:00
kobewi 31a81562a8 Fix Change Node Type after Add Node Here 2021-07-20 16:47:57 +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
Rémi Verschelde 8b1c60c1a3
Merge pull request #50505 from Calinou/editor-create-dialog-display-class-name
Display the class name in the description
2021-07-20 11:15:38 +02:00
Haoyu Qiu 4501df3727 Improve add item type UI in theme editor 2021-07-20 16:56:52 +08:00
Rémi Verschelde d7811c72ed
Merge pull request #50593 from SirQuartz/patch-24
Fix Illegible text in audio bus editor
2021-07-20 10:48:11 +02:00
Rémi Verschelde 394191c02f
Merge pull request #50605 from Calinou/tweak-shader-code-style
Use C++11 raw literals for shader code to improve readability
2021-07-20 10:05:13 +02:00
Rémi Verschelde 87d8927ab0
Merge pull request #50624 from foxydevloper/translate-more-strings
Make various strings translatable
2021-07-20 09:45:17 +02:00
Rémi Verschelde 2f060df059
Merge pull request #50498 from LightningAA/zoom-out-alt-4.0
Add shift + [1-5] keyboard shortcuts to zoom out
2021-07-20 09:01:30 +02:00
Rémi Verschelde 14c2f5d2a5
Merge pull request #50627 from Atlinx/fix_50617
Add scaling to the curve editor's handles
2021-07-20 08:56:58 +02:00
Rémi Verschelde 1ba87f0c82
Merge pull request #50618 from reduz/implement-more-specialization-constants
Implement more rendering options as specialization constants
2021-07-20 08:54:21 +02:00
Rémi Verschelde a09088ac8f
Merge pull request #50607 from bruvzg/add_bold_fonts
[Editor Fonts] Add Noto Sans Bold font variant for supported languages.
2021-07-20 07:21:40 +02:00
reduz 9293bc3935 Implement more rendering options as specialization constants
* Shadow quality settings now specialization constant.
* Decal and light projector filters can be set.
* Changing those settings forces re-creation of the pipelines.

These changes should help improve performance related to shadow mapping, and allows improving performance by sacrificing decal and light projector quality.
2021-07-19 21:51:29 -03:00
Atlinx ac5f3a6733 Add scaling to the curve editor's handles
This fixes issue #50617
2021-07-19 20:27:28 -04:00
foxydevloper 42d740d641 Make various strings translatable 2021-07-19 18:30:52 -04:00
Rémi Verschelde 617327118b
Merge pull request #50599 from Calinou/editor-profiler-improve-tooltip
Improve tooltips in the editor profiler to mention the script name
2021-07-19 22:57:39 +02:00
Rémi Verschelde bf4e6987bc
Merge pull request #50582 from timothyqiu/resource-extra-button
Minor enhancements for the resource options button
2021-07-19 22:55:26 +02:00
bruvzg e5b956dc2d [Editor Fonts] Add Noto Sans Bold font variant for supported languages. 2021-07-19 23:08:05 +03:00
foxydevloper 91bd7b9b2c Remove random prints for some shader actions 2021-07-19 15:24:04 -04:00
Stanislav Labzyuk 1de8ff8393 Implemented the ability to add shortcut for Project -> Reload Current Project. 2021-07-20 00:18:52 +07:00
Rémi Verschelde b1eee24e26
Merge pull request #50517 from KoBeWi/🌳💣
Assign value to property by dropping to scene tree
2021-07-19 18:08:47 +02:00
Haoyu Qiu 8c4cb53d21 Minor enhancements for the resource options button 2021-07-19 22:58:47 +08:00
Rémi Verschelde dfc1ec7fb9
Merge pull request #50606 from Chaosus/textedit_fix_guttertype
Fixed typos in `TextEdit::GutterType` enum
2021-07-19 16:40:42 +02:00
kobewi 5faf51a5aa Assign value to property by dropping to scene tree 2021-07-19 16:16:50 +02:00
Yuri Roubinsky 1597045b09 Fixed typos in TextEdit::GutterType enum 2021-07-19 11:18:54 +03:00
Hugo Locurcio abc38b8d66
Use C++11 raw literals for shader code to improve readability
In files that have lots of branching, `\t` was replaced with a
tab character instead.
2021-07-19 08:19:50 +02:00
reduz 6631f66c2a Optimize StringName usage
* Added a new macro SNAME() that constructs and caches a local stringname.
* Subsequent usages use the cached version.
* Since these use a global static variable, a second refcounter of static usages need to be kept for cleanup time.
* Replaced all theme usages by this new macro.
* Replace all signal emission usages by this new macro.
* Replace all call_deferred usages by this new macro.

This is part of ongoing work to optimize GUI and the editor.
2021-07-18 21:20:02 -03:00
Hugo Locurcio 0098e9243c
Improve tooltips in the editor profiler to mention the script name
Co-authored-by: CrispyPin <crispin@tasa.se>
2021-07-19 01:43:58 +02:00
Hugo Locurcio 6cfcbbbb93
Improve the 3D editor manipulation gizmo
- Allow some tolerance when clicking the plane move/scale,
  even if the click is actually slightly outside the plane
  (similar to Blender).
- Make the rotate manipulation circles visually thinner to be
  less distracting.
- Make the hovered color less saturated to be more distinguishable
  from the non-hovered state.
  - Don't set brightness above 1.0 to prevent the gizmo from glowing
    when hovered.
2021-07-19 00:46:27 +02:00
Nick Huelin a45713ccdd Fix Illegible text in audio bus editor
This pull request fixes an issue with the audio bus editor where the text would be illegible regardless of the theme being used.
2021-07-18 17:53:52 -04:00
Lightning_A 8aaa41ec97 Remove unnecessary get_editor_theme() in SubViewportPreview 2021-07-18 14:48:37 -06:00
kobewi 110236f761 Fix crash in EditorSpinSlider 2021-07-18 01:04:27 +02:00
Juan Linietsky 6263f58d69
Merge pull request #50559 from reduz/fix-scene-tree-duplicate-selection
Fix duplicate selection in SceneTree
2021-07-17 15:58:41 -03:00
Rémi Verschelde 51a10feb9d
Merge pull request #50509 from Calinou/editor-tweak-select-mode-drag-threshold
Tweak editor select mode drag threshold for better usability
2021-07-17 19:37:11 +02:00
reduz 7d20d78847 Fix duplicate selection in SceneTree
* It seems both cell_selected and multi_selected were being triggered,
* This caused inspector updating twice.
* cell_selected connection and callback were removed.

This may be a bug in Godot 3.x too, recommend checking.
2021-07-17 13:35:28 -03:00
Juan Linietsky deeec8894a
Merge pull request #50530 from reduz/create-popups-on-demand
Create many types of popups on demand
2021-07-17 12:28:41 -03:00
reduz a3fb76cd45 Create many types of popups on demand
* LineEdit popups created on demand.
* TextEdit popups created on demand.
* SpinSlider popups created on demand.
* ResourcePicker popups created on demand.

Improves editor responsiveness.
2021-07-17 10:57:14 -03:00
Yuri Sizov 4bcdbf1280 Fix focus behavior in the Add Item Type dialog of the Theme editor 2021-07-17 13:20:10 +03:00
Andrii Doroshenko (Xrayez) d64e7a7299 VCS: Allow to stage and commit all files with Ctrl + Enter 2021-07-17 12:56:54 +03:00
Yuri Sizov d82ec336d9 Fix control picker in the Theme editor 2021-07-16 21:32:58 +03:00
Lightning_A e3e8c234e4 Add shift + [1-5] keyboard shortcuts to zoom out 2021-07-16 12:20:08 -06:00
Hugo Locurcio ac52178850
Tweak editor select mode drag threshold for better usability
- Use a smaller drag threshold (8 pixels instead of 10 pixels).
- Scale the 2D editor drag threshold with the zoom to make it
  work the same regardless of the current zoom level.
2021-07-16 06:17:40 +02:00
Hugo Locurcio 195065db78
Display the class name in the description
- Display a placeholder if no description is available.
- Display a message if the search didn't return any results.
2021-07-16 01:14:01 +02:00
Rémi Verschelde 008a3f23ff
Merge pull request #41788 from EricEzaM/PR/proj-settings-fix
Improve UI for creating and editing plugins.
2021-07-15 19:11:06 +02:00
reduz 6639cc9853 Addes ability to load build sources from file.
* If not present, the dialog asks to load build sources from a file.
* The export templates check now also verifies that build sources are installed and skips the template check.

This makes Android development easier.
2021-07-15 10:14:08 -03:00
Rémi Verschelde 912792cfe6
Merge pull request #47825 from nathanfranke/fix-super-annoying-bug-lol
Do not change scene on save when debugging
2021-07-15 14:24:55 +02:00
Rémi Verschelde 6ddaebc091
Merge pull request #47538 from LightningAA/inspector-reorder-array-4.0
Add the ability to reorder array elements from the inspector
2021-07-15 14:01:31 +02:00
Nathan Franke 022a061571
Do not update scene tree dock when node edited outside of it 2021-07-15 05:42:34 -05:00
Rémi Verschelde f79958a30e
Merge pull request #50468 from akien-mga/cleanup-header-includes
Misc cleanup of header includes
2021-07-15 09:24:34 +02:00
Rémi Verschelde b3349e4c68
Merge pull request #47245 from LightningAA/add-viewport-spy-4.0
Add the ability to preview viewports from the inspector
2021-07-15 08:53:43 +02:00
Rémi Verschelde 06568bbfdf
Misc cleanup of header includes
Was looking for misuse of module headers without checking that the module is
actually enabled and got carried away...
2021-07-15 00:46:43 +02:00
fox 2623ee7a94 Fix wrong behavior of alt+rmb and list tool for locked nodes 2021-07-14 09:23:37 -04:00
Rémi Verschelde 536825d004
Rename Curve3Texture to CurveXYZTexture
Neither name is a perfect match but `Curve3Texture` looked too similar to
`CurveTexture` and `Curve3D`, which made things confusing when picking a
texture type or browsing the API reference.
2021-07-14 00:30:58 +02:00
Rémi Verschelde b61b30e6ff
Merge pull request #50420 from KoBeWi/counter_headers
Add header theme type variations to labels
2021-07-13 17:57:03 +02:00
Rémi Verschelde a4af76077a
Merge pull request #50418 from Calinou/fix-to-stop-word-casing
Fix casing of the "to" stop word in editor strings
2021-07-13 16:26:21 +02:00
kobewi f4b361dd15 Add header theme type variations to labels 2021-07-13 15:42:09 +02:00
Rémi Verschelde 8747f25653
Merge pull request #50381 from reduz/implement-disable-classes
Implement the ability to disable classes
2021-07-13 15:31:38 +02:00
Hugo Locurcio a3fbd68781
Fix casing of the "to" stop word in editor strings
This also fixes a C# documentation example that had one of its
strings incorrectly converted.
2021-07-13 15:29:06 +02:00
Rémi Verschelde b44b277f6f
Merge pull request #50169 from pycbouh/theme-type-variations 2021-07-13 15:13:00 +02:00
reduz 5ad4f26659 Implement the ability to disable classes
* This PR adds the ability to disable classes when building.
* For now it's only possible to do this via command like:
  `scons disable_classes=RayCast2D,Area3D`
* Eventually, a proper UI will be implemented to create a build config file to do this at large scale, as well as detect what is used in the project.
2021-07-13 09:25:14 -03:00
Rémi Verschelde f17341d61b
i18n: Sync translations with Weblate
(cherry picked from commit 1c840a31a5)
2021-07-13 13:15:34 +02:00
Rémi Verschelde aab6dc301c
Merge pull request #50086 from Geometror/label-improve-layout-options
Improvements to Label's layout options
2021-07-13 13:10:42 +02:00
Rémi Verschelde a371551533
Merge pull request #47667 from Calinou/assetlib-auto-install-prompt
Automatically display the installer after downloading an asset
2021-07-13 11:17:53 +02:00
Rémi Verschelde 51b0aed4b7
Merge pull request #48252 from Calinou/improve-2d-editor-zoom 2021-07-13 10:46:30 +02:00
Rémi Verschelde d5cbd6cdb3
Merge pull request #50410 from timothyqiu/similar-msg
Merge similar editor strings
2021-07-13 08:44:38 +02:00
Rémi Verschelde 6a47de653a
Merge pull request #50341 from goostengine/vcs-diff-min-size
Set minimum size for "Version Control" diff bottom panel
2021-07-13 08:30:06 +02:00
Haoyu Qiu 4383f8a790 Merge similar editor strings 2021-07-13 13:44:52 +08:00
Lightning_A b09f681768 Add viewport preview plugin
Also includes a minor refactor of TextureEditorPlugin.
2021-07-12 20:04:46 -06:00
Yuri Sizov 4ee0e6ddf5 Add type variations to Theme 2021-07-13 02:26:28 +03:00
Rémi Verschelde fc00a83901
Merge pull request #50262 from nekomatata/convex-hull-simplification
Options to clean/simplify convex hull generated from mesh
2021-07-12 22:15:40 +02:00
Rémi Verschelde 30d4732623
Merge pull request #50389 from Chaosus/vs_uniform_ref
Auto-set a first compatible uniform on dragging to create a UniformRef (VisualShaders)
2021-07-12 19:24:27 +02:00
Rémi Verschelde 3c0c202bf6
Merge pull request #49725 from EricEzaM/multi-node-picking-fixes
Fixes for multi-node editing interactions.
2021-07-12 19:23:13 +02:00
Rémi Verschelde 69f1048ef5
Merge pull request #50233 from Calinou/editor-add-both-environment-and-sun
Add both preview sun and sky at the same time when holding Shift
2021-07-12 15:37:11 +02:00
Hugo Locurcio 8844bb7855
Add the preview sun and sky to the beginning of the scene tree
This generally looks better when adding more nodes to the scene
in the future.
2021-07-12 12:08:58 +02:00
Hugo Locurcio 2708fcf13d
Automatically display the installer after downloading an asset
- To make things easier to follow, display the asset name in
  confirmation dialogs.
- Display the number of conflicting files in the asset extraction dialog.

This reduces the number of clicks required to install an asset.
2021-07-12 11:47:43 +02:00
Yuri Roubinsky 7d34701d63 Auto-set a first compatible uniform on dragging to create a UniformRef 2021-07-12 11:19:42 +03:00
Rémi Verschelde 514c8d586a
Merge pull request #50356 from Calinou/ormmaterial3d-tweak-editor-icon
Tweak the ORMMaterial3D editor icon to follow the Godot design guidelines
2021-07-12 08:48:50 +02:00
K. S. Ernest (iFire) Lee 7594150f65
Merge pull request #50354 from Calinou/immediatemesh-add-editor-icon
Add an editor icon for the ImmediateMesh resource
2021-07-12 01:49:40 -04:00
Lightning_A ec67266af3 Add the ability to reorder arrays from the inspector 2021-07-11 16:09:39 -06:00
Hugo Locurcio b1b1176b74
Add an editor icon for the ImmediateMesh resource 2021-07-11 20:40:11 +02:00
Hugo Locurcio 3a56d8d3ac
Tweak the ORMMaterial3D editor icon to follow the Godot design guidelines 2021-07-11 20:26:01 +02:00
Eric M f65dfd4895 Added validation to plugin creation.
Improved plugin creation dialog by adding form error reporting and restricting the user from overwriting an existing folder.
2021-07-12 00:18:52 +10:00
Yuri Roubinsky 9d4afa8b75
Merge pull request #50149 from Chaosus/vs_curve3d 2021-07-11 12:36:56 +03:00
Hugo Locurcio 161214d374
Remove the remains of ImmediateGeometry3D
ImmediateGeometry3D was recently removed in favor of the ImmediateMesh
resource.
2021-07-11 00:42:44 +02:00
Hugo Locurcio 43f9699a26
Improve 2D editor zoom logic
- Add 1-5 shortcuts to zoom between 100% and 1600% quickly
  (similar to GIMP).
- When holding down Alt, go through integer zoom values if above 100%
  or fractional zoom values with integer denominators if below 100%
  (50%, ~33.3%, 25%, …).
2021-07-10 17:32:40 +02:00
Andrii Doroshenko (Xrayez) 0fce7aea88 Set minimum size for "Version Control" diff bottom panel
Allows to see version diffs without having to expand the bottom panel
manually when clicking on a changed file in the "Commit" dock.
2021-07-10 14:26:16 +03:00
Hugo Locurcio 0da942c6bf
Improve the Export All button display in the export dialog
- Update the disabled status when changing an export path.
- Display a tooltip that states why the button is disabled.
- Update the Export All dialog message to have a more friendly tone.
- Suffix button texts with "...", as they display another dialog
  when clicked.

This closes #33293.
2021-07-10 02:32:54 +02:00
PouleyKetchoupp ff40c3f3c8 Optimize NodePath update when renaming or deleting nodes in the editor
Now the process uses a Map to lookup node pointers instead of iterating
over all modified node paths in a list and comparing them for each
property to check.

The process also avoids checking properties with empty node paths and
does an early exit on deleted nodes to avoid checking the node and its
descendants.

Also made a minor change in NodePath::rel_path_to() to avoid resizing a
Vector many times for long paths (with copy-on-write each time). Now
it's down to 2 resize calls in any case.
2021-07-09 11:42:39 -07:00
reduz a9c943bef9 Implement Range Iterators
This PR implements range iterators in the base containers (Vector, Map, List, Pair Set).
Given several of these data structures will be replaced by more efficient versions, having a common iterator API will make this simpler.
Iterating can be done as follows (examples):

```C++
//Vector<String>
for(const String& I: vector) {

}
//List<String>
for(const String& I: list) {

}
//Map<String,int>
for(const KeyValue<String,int>&I : map) {
	print_line("key: "+I.key+" value: "+itos(I.value));

}

//if intending to write the elements, reference can be used

//Map<String,int>
for(KeyValue<String,int>& I: map) {
	I.value = 25;
	//this will fail because key is always const
	//I.key = "hello"
}

```

The containers are (for now) not STL compatible, since this would mean changing how they work internally (STL uses a special head/tail allocation for end(), while Godot Map/Set/List do not).
The idea is to change the Godot versions to be more compatible with STL, but this will happen after conversion to new iterators have taken place.
2021-07-08 23:27:27 -03:00
kobewi 36434cb2e6 Fix node list with Add Node Here 2021-07-08 00:52:49 +02:00
PouleyKetchoupp 1de995ae99 Options to clean/simplify convex hull generated from mesh
Clean: remove duplicate and interior vertices (uses Bullet algorithm)
Simplify: modify the geometry for further simplification (uses VHACD
algorithm)

In the editor, single convex hull now uses the clean option.
Added a new editor entry to create a simplified convex hull, can be
useful for creating convex hull from highly tessellated triangle meshes.
2021-07-07 12:14:12 -07:00
Yuri Roubinsky 2736c389aa Fix a connection bug in visual shaders 2021-07-07 20:42:32 +03:00
Hugo Locurcio ddb3020758
Add both preview sun and sky at the same time when holding Shift
This makes setting up scenes for prototyping faster.

A tooltip was added to let people know about this feature.
2021-07-07 13:50:19 +02:00
Rémi Verschelde 7428c07624
Merge pull request #50236 from Calinou/editor-preview-sun-sky-add-root-node
Add a root Node3D automatically if absent when adding preview sun and sky
2021-07-07 12:44:08 +02:00
Rémi Verschelde 82d4a8903b
Merge pull request #50222 from Calinou/editor-information-use-multiply-sign
Use the Unicode multiplication symbol for the viewport size display
2021-07-07 10:03:09 +02:00
Hugo Locurcio 99909cb4f7
Add a root Node3D automatically if absent when adding preview sun and sky
This makes for a smoother prototyping process compared to displaying
an error message.
2021-07-07 01:59:46 +02:00
Rémi Verschelde 2aa1915617
Merge pull request #50226 from Calinou/voxelgi-fix-warning-spam
Fix warning message spam when a VoxelGI node is selected in the editor
2021-07-06 23:43:29 +02:00
Hugo Locurcio 7f845d913a
Fix warning message spam when a VoxelGI node is selected in the editor
Support for anisotropy in VoxelGI was removed during its development
due to the high cost. This was a leftover from anisotropy support.
2021-07-06 23:02:59 +02:00
Hugo Locurcio c72efd20b8
Use the Unicode multiplication symbol for the viewport size display 2021-07-06 21:52:59 +02:00
Andrii Doroshenko (Xrayez) 23c1b39570 Make EditorVCSInterface proxy functions virtual in C++
Allows to implement VCS plugins via C++ modules without affecting
the existing script instance mechanism.
2021-07-06 22:20:03 +03:00
Rémi Verschelde f56ae4045f
Merge pull request #37983 from EricEzaM/set-main-scene-add-select-current-option
Added 'Select Current' option when user is prompted to select main scene after clicking play
2021-07-06 16:59:12 +02:00
Eric M 2296b57739 Added 'Select Current' option when user is prompted to select main scene after clicking play 2021-07-07 00:27:00 +10:00
Eric M c2ba7464b6 Added EditorInspectorPlugin to aid in editing InputEvents in resources and shortcuts 2021-07-06 23:50:33 +10:00
Rémi Verschelde bc75fd509a
Merge pull request #42745 from Pineapple/search-results-limit
Remove search results limit in FileSystem dock
2021-07-06 13:37:25 +02:00
Rémi Verschelde 3fbfb24773
Merge pull request #50070 from timothyqiu/emu-numpad
Add numpad emulation in 3D viewport
2021-07-05 14:18:36 +02:00
Rémi Verschelde d3c9726835
Merge pull request #50046 from Calinou/editor-camera-preview-allow-view-menu
Allow using the 3D editor's View menu while previewing a camera
2021-07-05 14:14:53 +02:00
reduz f4379cbc82 Clean up Tree
Fixes some problems introduced by #49917

* Tree used minimum size as a stretch ratio, so it forced a minimum size of 1.
* Minimum size redone, stretch ratio moved to a separate setting
* Fitting to contents was enforced, this is more intuitive, but in many situations this is undesired.
* Added a clip content option for situations where fit to contents does not apply.
* Icon would scroll with the item, making it invislbe if the item is too long.
* Made icon always appear to the right (or left if RTL is enabled) of the visible item space.
2021-07-04 13:13:53 -03:00
Hendrik Brucker 56a8d3f30c Improvements to Label's layout options
- Added options to trim the text in case it overruns
- Added more autowrap modes
- Improved line breaking, which ignores trailing spaces
2021-07-04 16:43:55 +02:00
Yuri Roubinsky 4cf2f79892 Added Curve3Texture to Visual Shaders 2021-07-04 12:21:19 +03:00
Rémi Verschelde 409d5aa57e
Merge pull request #50145 from YeldhamDev/script_create_diag_cleanup
Minor cleanup of the "New Script" dialog
2021-07-04 09:36:27 +02:00
Michael Alexsander 7df1bc426e Minor cleanup of the "New Script" dialog 2021-07-04 00:06:46 -03:00
Josh Chandler 879f84d8f8 add viewport.get_camera_2d()
* there is now a more clear distinction between camera_2d and camera_3d functions in the engine code
* simplified camera2d's exported interface - now everything happens directly with the 'current' variable and make_current and clear_current are no longer exposed- there were some situations where calling one instead of set_current would result in incomplete results
* rebased to current godot master
2021-07-03 15:08:17 -04:00
Hugo Locurcio 9698486605
Add icons for more file types in the editor asset installer 2021-07-03 17:44:56 +02:00
reduz 6c55d2aad2 Fix Render Info
* Fixed and redone the process to obtain render information from a viewport
* Some stats, such as material changes are too difficult to guess on Vulkan, were removed.
* Separated visible and shadow stats, which causes confusion.
* Texture, buffer and general video memory can be queried now.
* Fixed the performance metrics too.
2021-07-03 10:15:04 -03:00
kobewi 5e593dda9b Support single quote when dropping files to script 2021-07-03 13:03:20 +02:00
Haoyu Qiu 4a26e61e89 Add numpad emulation in 3D viewport 2021-07-02 15:41:44 +08:00
Aaron Franke 2508fd0533
Use PROPERTY_USAGE_NONE instead of 0 for no property usage
Also use const more often.
2021-07-01 14:13:27 -04:00
Rémi Verschelde ad8a2b3d52
Merge pull request #50040 from reduz/fix-renderingserver-bindings
Clean up RenderingServer and its bindings
2021-07-01 15:17:33 +02:00
reduz 37776b2867 Clean up RenderingServer and its bindings
* Rewrote bindings for RenderingServer.
* They are now all up to date.
* Several unused methods and deprecated features were cleaned up.
2021-07-01 09:07:36 -03:00
Hugo Locurcio fab3d136e0
Allow using the 3D editor's View menu while previewing a camera
This is already allowed when using cinematic preview, but not
when previewing a Camera3D the usual way.

Many operations from the View menu still work while previewing
a camera, such as switching between debug draw modes and toggling
information panes.
2021-07-01 12:43:53 +02:00
Rémi Verschelde 801548fb70
Merge pull request #49994 from akien-mga/script-duplicate-selection
Script editor: Rename 'Clone Down' to 'Duplicate Selection'
2021-07-01 09:43:02 +02:00
Rémi Verschelde f82c649671
Merge pull request #50038 from Calinou/editor-add-lock-group-shortcuts
Add keyboard shortcuts for grouping and locking nodes, change grid toggle
2021-07-01 09:40:32 +02:00
Rémi Verschelde 5710adda72
Merge pull request #50030 from bruvzg/rtl_editor_spin
Add right-to-left layout support for `EditorSpinSlider`.
2021-07-01 00:52:26 +02:00
Hugo Locurcio b7bb84bf46
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-06-30 23:09:26 +02:00
bruvzg c283519e0b Add right-to-left layout support for EditorSpinSlider. 2021-06-30 22:32:35 +03:00
PouleyKetchoupp 62ce81ec15 Coding style fix in editor NodePath update
Added r_ prefix for reference arguments that can be modified.
2021-06-30 11:50:40 -07:00
Rémi Verschelde 270f9d4c88
Merge pull request #50014 from reduz/remove-immediate
Deprecate ImmediateGeometry
2021-06-30 20:18:59 +02:00
reduz 85cf99f28e Deprecate ImmediateGeometry
* Removed entirely from RenderingServer.
* Replaced by ImmediateMesh resource.
* ImmediateMesh replaces ImmediateGeometry, but could use more optimization in the future.
* Sprite3D and AnimatedSprite3D work again, ported from Godot 3.x (though a lot of work was needed to adapt them to Godot 4).
* RootMotionView works again.
* Polygon3D editor works again.
2021-06-30 14:14:41 -03:00
Rémi Verschelde a02620f3a5
Merge pull request #50009 from reduz/fix-suffixes-and-degrees
Fix editor suffixes and degrees conversion
2021-06-30 18:47:40 +02:00
reduz 75688772b3 Fix editor suffixes and degrees conversion
* Functions to convert to/from degrees are all gone. Conversion is done by the editor.
* Use PROPERTY_HINT_ANGLE instead of PROPERTY_HINT_RANGE to edit radian angles in degrees.
* Added possibility to add suffixes to range properties, use "min,max[,step][,suffix:<something>]" example "0,100,1,suffix:m"
* In general, can add suffixes for EditorSpinSlider
Not covered by this PR, will have to be addressed by future ones:

* Ability to switch radians/degrees in the inspector for angle properties (if actually wanted).
* Animations previously made will most likely break, need to add a way to make old ones compatible.
* Only added a "px" suffix to 2D position and a "m" one to 3D position, someone needs to go through the rest of the engine and add all remaining suffixes.
* Likely also need to track down usage of EditorSpinSlider outside properties to add suffixes to it too.
2021-06-30 12:38:25 -03:00
Rémi Verschelde 9b8095ad05
Merge pull request #50012 from YeldhamDev/script_diag_fix
Make contents of "Create Script" dialog expand with the window size
2021-06-30 01:58:27 +02:00
Michael Alexsander e4f9fa7e53 Make contents of "Create Script" dialog expand with the window size 2021-06-29 20:20:34 -03:00
reduz d07f7c8d25 Fixes to 2D viewport
* Editor 2D viewport now uses embedded subwindows (windows no longer pop up)
* Restored the ability to disable 3D on the 2D viewport (makes 3D not display on 2D when there is a camera on the scene)
2021-06-29 17:40:45 -03:00
Rémi Verschelde 661d7c01b8
Merge pull request #49295 from foxydevloper/fix-focus-filter
Fix "Filter Files" shortcut by merging duplicate functions
2021-06-29 17:23:45 +02:00
Hugo Locurcio bdca0daadc
Tweak the 2D game camera override tooltips to match 3D 2021-06-29 16:18:37 +02:00
Rémi Verschelde c3f0b9f972
i18n: Sync translations with Weblate
(cherry picked from commit 30bb133e01)
2021-06-29 14:57:47 +02:00
Rémi Verschelde dfdde2c598
Merge pull request #49812 from nekomatata/node-path-editor-update
NodePath properly updated in the editor in more cases when nodes are moved or renamed
2021-06-29 12:51:38 +02:00
Rémi Verschelde 9996cd2a16
Merge pull request #49636 from LightningAA/add-feedback-button-4.0
Add "Suggest a Feature" to the help dialog.
2021-06-29 12:47:17 +02:00
Rémi Verschelde d41f4aca77
Script editor: Rename 'Clone Down' to 'Duplicate Selection'
Fixes #36670.
2021-06-29 12:14:24 +02:00
Rémi Verschelde 8fb7a9f023
Merge pull request #49719 from LightningAA/rename-node-is-ancestor-of
Rename `is_a_parent_of()` to `is_ancestor_of()`
2021-06-29 12:07:25 +02:00
Rémi Verschelde 8597db0ac2
Merge pull request #49980 from EricEzaM/fix-default-log-state
EditorLog filter buttons are now enabled/on by default
2021-06-29 12:00:03 +02:00
Gilles Roudière 30a615dd94 Implement painting properties over TileSets 2021-06-29 11:07:46 +02:00
Eric M 538a50ac19 EditorLog filter buttons are now enabled/on by default 2021-06-29 12:33:05 +10:00
Rémi Verschelde 89f270f4c5
Merge pull request #49917 from groud/tree_disable_scroll
Allow disabling scrolling in Tree and implement horizontal scrolling
2021-06-28 18:41:23 +02:00
PouleyKetchoupp 3e4e530523 NodePath properly updated in the editor in more cases
Fix more cases of node path needing an update when nodes are renamed or
moved in the editor.

Built-in node properties:
Before, node paths were checked only for script export variables. Now
all properties are checked from the node, which includes built-in node
properties.
Allows proper node path updates for nodes like remote transform, physics
joints, etc.

Arrays and dictionaries:
Node paths nested in array and dictionary properties are now also
updated in the editor.

Also update the documentation to be clear about node path update in the
editor and at runtime.

Co-authored-by: latorril <latorril@gmail.com>
2021-06-28 09:28:29 -07:00
Gilles Roudière d7d32ced5b Implement Tree's internal minimum width calculation 2021-06-28 15:54:31 +02:00
Yuri Roubinsky 46cd36f009 Fix auto-connection from output node to input (VisualShaders) 2021-06-28 14:38:08 +03:00
Rémi Verschelde 92f7504637
Merge pull request #49891 from Calinou/3d-editor-add-grid-toggle-shortcut
Use Ctrl + G to toggle the 3D editor grid visibility by default
2021-06-26 08:46:33 +02:00
reduz b1d15c51bc Implement native extension system
* Deprecates GDNative in favor of a simpler, lower level interface.
* New extension system allows registering core engine classes.
* Simple header interface in gdnative_interace.h
2021-06-25 17:32:45 -03:00
Eric M cfbdaa2eb7 Fix RichTextLabel custom_effects export to be properly filtered in the Editor 2021-06-25 22:58:46 +10:00
Hugo Locurcio 2cc053c64b
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.
2021-06-24 20:01:47 +02:00
Rémi Verschelde cb8f045de8
Merge pull request #49650 from KoBeWi/FindReplaceCrash
Fix crash with FindReplaceBar
2021-06-24 19:21:01 +02:00
kobewi 35a38717e2 Fix crash with FindReplaceBar 2021-06-24 15:38:29 +02:00
Hugo Locurcio 4df24861fe
Tweak script export text in the export dialog to be more explicit 2021-06-24 10:00:48 +02:00
Hugo Locurcio 30fcf3045a
Improve error message when there are no meshes to bake for 3D occlusion 2021-06-23 15:32:48 +02:00
Rémi Verschelde 49df7c0bc1
Merge pull request #49853 from AndreaCatania/AndreaCatania-patch-4
Remove early return from gizmo intersect_ray
2021-06-23 15:22:05 +02:00
AndreaCatania 2c12297ee1 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.
2021-06-23 13:06:45 +02:00
Lightning_A 899e5f8685 Rename is_a_parent_of() to is_ancestor_of() 2021-06-21 08:39:28 -06:00
Rémi Verschelde 9da7f06900
Merge pull request #49665 from Paulb23/code_edit_indent
Move indentation into CodeEdit
2021-06-21 09:13:15 +02:00
Yuri Sizov 304c9b995b Fix pinned StyleBox incorrectly reacting to several actions in the new Theme editor 2021-06-20 23:04:56 +03:00
Paulb23 1a0cfc219b Move indent management to CodeEdit 2021-06-20 20:00:54 +01:00
Aaron Franke 0ce49800ac
Use mouse and joypad enums instead of plain integers
Also MIDIMessage
2021-06-20 11:54:24 -04:00
K. S. Ernest (iFire) Lee b8fb765a65 Fix for LOD is broken 49706 2021-06-20 04:27:32 -07:00
Rémi Verschelde 671bd64e4a
Merge pull request #49754 from aaronfranke/is-eq-approx-sub-opt
Fix sub-optimal uses of is_equal_approx
2021-06-20 11:44:56 +02:00
Aaron Franke 45c24fd039
Fix sub-optimal uses of is_equal_approx 2021-06-20 03:03:06 -04:00
Lightning_A e28fd07b2b Rename instance()->instantiate() when it's a verb 2021-06-19 20:49:18 -06:00
Rémi Verschelde 60dcc4f39c
Merge pull request #49742 from Paulb23/remove_keywords_textedit
Remove redundant keywords from TextEdit
2021-06-20 00:39:18 +02:00
Rémi Verschelde 9b7c963d19
Merge pull request #48804 from EricEzaM/scripting-multi-error-support
Added support for scripts reporting multiple errors to ScriptTextEditor
2021-06-20 00:38:49 +02:00
Rémi Verschelde de7293b6eb
Merge pull request #49741 from RandomShaper/fix_save_scene_side_effects
Remove side effects of scene save
2021-06-20 00:37:38 +02:00
Rémi Verschelde 4effadc0ba
Merge pull request #48696 from madmiraal/fix-48692
Fix `InputMap.action_erase_event()` failing to erase events correctly.
2021-06-20 00:29:42 +02:00
Paulb23 ab49ea032c Remove redundant keywords from TextEdit 2021-06-19 13:56:54 +01:00
Eric M d0e78c86d7 Added support for scripts reporting multiple errors to ScriptTextEditor
Scripts can now report multiple errors to the scripting editors in the engine. UI elements were added to support multiple errors.
2021-06-19 22:20:30 +10:00
Pedro J. Estébanez 598fd51277 Remove side effects of scene save 2021-06-19 13:44:05 +02:00
Marcel Admiraal 2bafcd3422 Consolidate JSON, JSONParseResults and JSONParser into JSON
Renames JSON.parse_string() to parse()
Renames JSON.decode_data() to stringify()
2021-06-19 08:01:40 +01:00
Eric M 83cb48e69e Fixes for multi-node editing interactions.
1. When having 2 nodes selected, deselecting one in the ScemeTreeDock would keep the inspector in MultiNodeEdit rather than editing the one remaining node directly. This is now fixed. Closes #49451
2. In the Node3D editor, Shift-Selecting a region (drag selecting) would *deselect* nodes which were already selected, and select ones which were not, essentially inverting the selection. This is now fixed - shift-drag-selecting will only add nodes to the selection. To deselect, individual nodes can be clicked on. I am not sure if there is an issue open for this - it was a bug I found while testing other changes.
3. Other minor code cleanup.
2021-06-19 13:07:42 +10:00
Rémi Verschelde 92f20fd70e
Merge pull request #49659 from LightningAA/string-valid-integer-to-int 2021-06-18 16:14:14 +02:00
Rémi Verschelde 98b5280d1f
Merge pull request #49683 from lyuma/remove_late_added
Remove thread-unsafe and unused late_added_files.
2021-06-18 14:23:44 +02:00
Rémi Verschelde 671c58362a
Merge pull request #40525 from KoBeWi/fastest_close_in_the_west
Make closing current scene faster
2021-06-18 12:30:56 +02:00
Rémi Verschelde 43755eada4
Merge pull request #47802 from Calinou/editor-sprite-frames-select-hold-mouse
Allow selecting frames by holding down the mouse in SpriteFrames editor
2021-06-18 12:28:35 +02:00
Rémi Verschelde f6756e2bf5
Merge pull request #49698 from aaronfranke/prop-no-usage
Add PROPERTY_USAGE_NONE and use it
2021-06-18 12:28:05 +02:00
Aaron Franke 6565191660
Allow setting the preview sun angle with numbers 2021-06-17 23:28:02 -04:00
Aaron Franke 8b692e8872
Add PROPERTY_USAGE_NONE and use it 2021-06-17 19:10:26 -04:00
kleonc 1d890e16f7 AnimationMultiTrackKeyEdit Allow editing easing if it's possible for all edited tracks 2021-06-17 23:28:04 +02:00
Hugo Locurcio 5e8eb20ad6
Allow selecting frames by holding down the mouse in SpriteFrames editor
This complements the existing (Ctrl +) Shift + Left mouse button
multiple frame (de)selection.
2021-06-17 20:11:50 +02:00
Rémi Verschelde 085e1d3c03
Merge pull request #49670 from reduz/rename-visibility-notifiers
Rename VisibilityNotifier2D/3D to VisibleOnScreenNotifier2D/3D
2021-06-17 15:14:44 +02:00
Lyuma 6c94b2cb9e Remove thread-unsafe and unused late_added_files.
_reimport_file is called from multiple threads as part of the threaded importer.
Inserting to this set from a thread could hit a race condition leading to memory corruption or hangs.
It seems to be unused, intentionally or unintentionally
2021-06-17 05:30:24 -07:00
Rémi Verschelde 0943ec632c
ThemeEditor: Fix text_submitted connections after #49258 2021-06-17 13:14:06 +02:00
Rémi Verschelde dd39855c0a
Merge pull request #47796 from Calinou/editor-add-save-on-focus-loss-option
Add a "save on focus loss" editor setting (disabled by default)
2021-06-17 12:50:36 +02:00
Rémi Verschelde ba9ffbe5d7
Merge pull request #47813 from Calinou/editor-decrease-unfocused-fps-limit
Decrease the editor FPS limit when unfocused from 20 to 10
2021-06-17 12:46:29 +02:00
Rémi Verschelde 82eb4cfc00
Merge pull request #47894 from Calinou/project-manager-add-keyboard-shortcuts
Add keyboard shortcuts to the project manager
2021-06-17 12:41:47 +02:00
Rémi Verschelde afd4cc702d
Merge pull request #49661 from akien-mga/main-fallback-to-projectmanager
Main: Fixup bogus fallback to project manager with more bolognese
2021-06-17 11:42:24 +02:00