Commit graph

2922 commits

Author SHA1 Message Date
Rémi Verschelde
aa251c310a
Merge pull request #49325 from reduz/rename-gi-classes
Rename GI Classes
2021-06-06 09:50:06 +02:00
TwistedTwigleg
8aa3c2f091 New and improved IK system for Skeleton2D
This PR and commit adds a new IK system for 2D with the Skeleton2D node
that adds several new IK solvers, a way to control bones in a Skeleton2D
node similar to that in Skeleton3D. It also adds additional changes
and functionality.

This work was sponsored by GSoC 2020 and TwistedTwigleg.

Full list of changes:
* Adds a SkeletonModifier2D resource
  * This resource is the base where all IK code is written and executed
  * Has a function for clamping angles, since it is so commonly used
  * Modifiers are unique when duplicated so it works with instancing
* Adds a SkeletonModifierStack2D resource
  * This resource manages a series of SkeletonModification2Ds
  * This is what the Skeleton2D directly interfaces with to make IK possible
* Adds SkeletonModifier2D resources for LookAt, CCDIK, FABRIK, Jiggle, and TwoBoneIK
  * Each modification is in its own file
  * There is also a SkeletonModifier2D resource that acts as a stack for using multiple stacks together
* Adds a PhysicalBone2D node
  * Works similar to the PhysicalBone3D node, but uses a RigidBody2D node
* Changes to Skeleton2D listed below:
  * Skeleton2D now holds a single SkeletonModificationStack2D for IK
  * Skeleton2D now has a local_pose_override, which overrides the Bone2D position similar to how the overrides work in Skeleton3D
* Changes to Bone2D listed below:
  * The default_length property has been changed to length. Length is the length of the bone to its child bone node
  * New bone_angle property, which is the angle the bone has to its first child bone node
  * Bone2D caches its transform when not modified by IK for IK interpolation purposes
  * Bone2D draws its own editor gizmo, though this is stated to change in the future
* Changes to CanvasItemEditor listed below:
  * Bone2D gizmo drawing code removed
  * The 2D IK code is removed. Now Bone2D is the only bone system for 2D
* Transform2D now has a looking_at function for rotating to face a position
* Two new node notifications: NOTIFICATION_EDITOR_PRE_SAVE and NOTIFICATION_EDITOR_POST_SAVE
  * These notifications only are called in the editor right before and after saving a scene
  * Needed for not saving the IK position when executing IK in the editor
* Documentation for all the changes listed above.
2021-06-05 15:19:51 -04:00
reduz
32625145c8 Rename GI Classes
* GIProbe is now VoxelGI
* BakedLightmap is now LightmapGI

As godot adds more ways to provide GI (as an example, SDFGI in 4.0), the different techniques (which have different pros/cons) need to be properly named to avoid confusion.
2021-06-05 09:28:56 -03:00
fox
00a4ee5cf3 Add threshold to dragging nodes with select to prevent accidental drags 2021-06-04 11:39:46 -04:00
Rémi Verschelde
95ff547da4
Merge pull request #44198 from madmiraal/rename-translation-position
Rename Node3D's property translation to position
2021-06-04 11:34:35 +02:00
Rémi Verschelde
875ed4d600
Merge pull request #47336 from Calinou/rename-shader-file-extension
Rename the `.shader` file extension to `.gdshader`
2021-06-04 11:26:14 +02:00
Marcel Admiraal
a6e44bd16c Rename Node3D's property translation to position 2021-06-04 09:54:52 +01:00
Aaron Franke
6f472d154b
Rename EditorPropertyTransform to EditorPropertyTransform3D 2021-06-03 21:58:26 -04:00
Aaron Franke
de3f6699a5
Rename Transform to Transform3D in core 2021-06-03 07:30:01 -04:00
Yuri Roubinsky
8456682222 Fix changing theme coloring for error label in VisualShader editor 2021-06-03 10:58:55 +03:00
Paulb23
5c618dd03d Move code folding into CodeEdit and hide line hiding API 2021-06-01 17:07:01 +01:00
Rémi Verschelde
c5f237eaf8
Merge pull request #45393 from Paulb23/code_edit_autocomplete 2021-06-01 17:58:19 +02:00
Paulb23
c1b9971ad8 Move and expose Code Hint in CodeEdit 2021-06-01 15:38:45 +01:00
Paulb23
1c16673798 Move and expose AutoComplete in CodeEdit 2021-06-01 15:38:45 +01:00
Paulb23
680dc9e81a Add comment and string tracking to CodeEdit 2021-06-01 15:38:45 +01:00
kleonc
019c99e538 TextureRegionEditor Fix not updating on editing region with autoslice cached 2021-06-01 12:17:32 +02:00
Yuri Sizov
9cd96ebe0e Prevent Theme resource from emitting changes during bulk operations 2021-05-31 17:40:45 +03:00
Rémi Verschelde
4e3d5148ff
Merge pull request #49157 from Chaosus/vs_billboard
Added Billboard Node to Visual Shaders
2021-05-31 12:23:01 +02:00
Rémi Verschelde
1d35a35d4f
Merge pull request #49175 from nobuyukinyuu/bind-zoom-on-position
Bind CanvasItemEditor::_zoom_on_position and CanvasItemEditor::get_st…
2021-05-31 11:45:59 +02:00
Rémi Verschelde
a8c144f72e
Merge pull request #49121 from KoBeWi/dropreload
Add preload() to resource path when holding Ctrl
2021-05-31 11:10:37 +02:00
reduz
0d2e02945b Implement shader caching
* Shader compilation is now cached. Subsequent loads take less than a millisecond.
* Improved game, editor and project manager startup time.
* Editor uses .godot/shader_cache to store shaders.
* Game uses user://shader_cache
* Project manager uses $config_dir/shader_cache
* Options to tweak shader caching in project settings.
* Editor path configuration moved from EditorSettings to new class, EditorPaths, so it can be available early on (before shaders are compiled).
* Reworked ShaderCompilerRD to ensure deterministic shader code creation (else shader may change and cache will be invalidated).
* Added shader compression with SMOLV: https://github.com/aras-p/smol-v
2021-05-31 10:13:09 +02:00
nobuyuki_nyuu
a715887299 Bind CanvasItemEditor::_zoom_on_position and CanvasItemEditor::get_state to ClassDB 2021-05-28 13:34:30 -05:00
Yuri Roubinsky
f06db8b778 Added Billboard Node to Visual Shaders 2021-05-28 09:24:06 +03:00
kobewi
4bee21bcc4 Add preload() to resource path when holding Ctrl 2021-05-27 12:22:32 +02:00
Yuri Roubinsky
af3f047f49 Fixed console error spam (about invalid edited scene index) 2021-05-26 19:28:38 +03:00
Yuri Roubinsky
0b4b1f872c
Merge pull request #49056 from Chaosus/vs_color 2021-05-26 11:07:22 +03:00
Yuri Roubinsky
8f9b91dab1 Implements expandable color ports in visual shaders 2021-05-26 10:45:53 +03:00
Gilles Roudière
78ad206d74 Add TileMap grid editor settings. 2021-05-25 10:23:57 +02:00
Yuri Roubinsky
6772f70ec3 Fixes adding nodes on dragging in visual shaders 2021-05-24 13:50:10 +03:00
Rémi Verschelde
7cb23e4306
Merge pull request #48956 from Chaosus/vs_fix_adding_multiple_resources_undo
Fixes non-atomary action of dragging resources on visual shader graph
2021-05-24 12:21:35 +02:00
Rémi Verschelde
6580d1798a
Merge pull request #48829 from Chaosus/vs_comment_node_fixes
Prevents VisualShaderNodeComment from overlapping its content
2021-05-24 12:21:19 +02:00
Hugo Locurcio
21807f8d88
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).
2021-05-23 19:50:53 +02:00
Rémi Verschelde
809948f977
Merge pull request #40397 from KoBeWi/silent_seeker
Allow to move timeline without moving animation
2021-05-23 17:28:21 +02:00
kobewi
0ac5be1e67 Reset Shader Editor scroll when changing shader 2021-05-23 13:54:45 +02:00
kleonc
07d346dfa5 SpriteFramesEditor Minor fixes 2021-05-23 10:59:21 +02:00
Hugo Locurcio
80f4e407b2
Add a keyboard shortcut to select the word under cursor in TextEdit
This also acts as a general-purpose "deselect" shortcut since pressing
it a second time will deselect text.

This is available both in the script editor and in TextEdit fields
in use, both in the editor and projects.

The Duplicate Line script editor shortcut was moved to Ctrl + Shift + D
since it conflicts with the new shortcut (Ctrl + D). The rationale for
doing so is that Duplicate Line is a less commonly used action, and
its behavior can be replicated by copying and pasting the current line
anyway. (With no selection active, the whole line will be copied.)
2021-05-22 23:47:43 +02:00
Yuri Roubinsky
084648bd18 Basic warning support implementation for the Godot Shading Language. 2021-05-22 19:24:31 +03:00
Paulb23
00e10a842f Add custom background line colour to TextEdit and remove marked lines 2021-05-22 14:41:55 +01:00
Yuri Roubinsky
7f5b074b4b Fixes non-atomary action of dragging resources on visual shader graph 2021-05-22 08:16:56 +03:00
Rémi Verschelde
3b3a55ca04
Merge pull request #48918 from groud/fix_tilemap_y_sort
Fixes TileSet Y-sort not working and TileSet not saving correctly
2021-05-22 00:26:36 +02:00
Gilles Roudière
7d80480b72 Fixes TileSet Y-sort not working and TileSet not saving correctly 2021-05-21 10:13:37 +02:00
Rémi Verschelde
28c7e28403
Merge pull request #48895 from JFonS/fix_viewport_rotation_control
Fix swapped front/rear directions in viewport rotation control.
2021-05-20 20:54:40 +02:00
jfons
e70e33ddcf Fix swapped front/rear directions in viewport rotation control. 2021-05-20 16:28:38 +02:00
Rémi Verschelde
a6a75e2c09
Merge pull request #48812 from groud/tilemap_scenes_painting
Implement scenes tiles in TileMaps
2021-05-20 14:32:40 +02:00
Rémi Verschelde
342f3efc7e
Merge pull request #48882 from aaronfranke/approx-use-double
Make is_equal_approx have explicit float and double versions
2021-05-20 14:17:58 +02:00
Gilles Roudière
d8bb53cd21 Implement scenes tiles in TileMaps 2021-05-20 13:12:03 +02:00
Rémi Verschelde
4219a4cb6f
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:38:56 +02:00
Aaron Franke
b5b6d3a8ec
Make is_equal_approx have explicit float and double versions 2021-05-20 06:18:11 -04:00
Yuri Roubinsky
f100fb9f10 Updates script list colors after theme is changed 2021-05-20 09:02:59 +03:00
Yuri Roubinsky
a1657b0356 Prevents VisualShaderNodeComment from overlapping its content 2021-05-19 11:57:11 +03:00
Hugo Locurcio
16876bec76
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).
2021-05-18 19:48:38 +02:00
Rémi Verschelde
35edb77d1f
Merge pull request #37796 from Gogsi/master
Improve consistency in file order
2021-05-18 11:45:05 +02:00
Georgi Genkov
a8c83a7b35 Change EditorFileSystem and ScriptEditor file sorting order to improve consistency.
Fixes #37721.
2021-05-18 10:42:06 +02:00
trollodel
bca0d36fe6 Improve TreeItem API and allow to move nodes 2021-05-17 22:06:46 +02:00
Rémi Verschelde
6c367f8e0d
Merge pull request #48168 from LightningAA/control-to-ctrl-4.0 2021-05-17 17:38:02 +02:00
Rémi Verschelde
37c3b33253
Merge pull request #48605 from sent44/scripteditor_get_codeedit
Add `get_base_editor` to `ScriptEditorBase`
2021-05-16 23:06:01 +02:00
sent44
2b30728ebf Add get_base_editor to ScriptEditorBase 2021-05-15 18:47:00 +07:00
llschuster
6b55ec2ca9 text-editor: fix Clicking warning doesn't center around line 2021-05-13 17:07:39 +02:00
Yuri Sizov
3a66c22e71 Add outlines and contrasting backgrounds to the editor UI elements 2021-05-12 01:45:56 +03:00
Michael Alexsander
6dad72db69 Fix small issues with capitalization in the new TileMap editor 2021-05-10 18:08:07 -03:00
Rémi Verschelde
a8a51cd75c
Merge pull request #46808 from pycbouh/theme-editor-better-create-ui
Refactor Create Theme menu in Theme Editor
2021-05-09 14:21:37 +02:00
Hugo Locurcio
39f9b92f54
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.
2021-05-09 12:29:50 +02:00
Yuri Sizov
912420b078 Refactor Create Theme menu in Theme Editor 2021-05-09 03:13:19 +03:00
Lightning_A
97fecd1b69 Rename "Control" key to "Ctrl" and add "_pressed" suffix to all InputEventWithModifiers properties/methods 2021-05-07 14:00:50 -06:00
Rémi Verschelde
c3f7465b7e
Merge pull request #48535 from groud/tiles_squashed
TileSet and TileMap rework (squashed)
2021-05-07 20:46:06 +02:00
Gilles Roudière
a3dda2df85 Rework the TileSet resource and TileMap nodes:
- Move most properties from TileMap to TileSet,
- Make TileSet more flexible, supporting more feature (several
  collision layers, etc...),
- Fusion both the TileMap and TileSet editor,
- Implement TileSetSources, and thus a new way to index tiles in the TileSet,
- Rework the TileSet and TileMap editors completely,
- Implement an editor zoom widget (and use it in several places)
2021-05-07 18:06:17 +02:00
Rémi Verschelde
8962d36bb1
Merge pull request #33577 from Calinou/highlight-control-flow-keywords
Highlight control flow keywords with a different color
2021-05-07 00:52:50 +02:00
Rémi Verschelde
6e621441ca
Merge pull request #45607 from Calinou/improve-editor-theme
Improve the editor theme
2021-05-06 16:45:07 +02:00
Hugo Locurcio
0ade686601
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.
2021-05-05 23:31:15 +02:00
Hugo Locurcio
e905e8f145
Highlight control flow keywords with a different color
This makes them easier to distinguish from other keywords.
2021-05-05 22:38:12 +02:00
Rémi Verschelde
e189ff55a7
Merge pull request #48378 from Calinou/editor-improve-audio-inspector-preview
Improve the editor audio preview inspector appearance and functionality
2021-05-04 17:58:28 +02:00
Aaron Franke
0de9a7d803
Rename doubleclick to double_click 2021-05-04 04:38:08 -04:00
Rémi Verschelde
0d819ae5f5
Merge pull request #48403 from kleonc/tilemap-editor-modulate-autotile-preview
TileMapEditor Modulate autotile previews
2021-05-03 16:00:50 +02:00
kleonc
3f1b95cfb1 TileMapEditor Modulate autotile previews 2021-05-03 14:58:02 +02:00
kleonc
a1b903066e TileMapEditor::_bucket_fill Check autotile coordinates only if autotile is selected 2021-05-03 14:49:52 +02:00
Michael Alexsander
46e0161737 Add comment highlighting to script thumbnails 2021-05-02 21:48:37 -03:00
Hugo Locurcio
a50a81b703
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.
2021-05-02 14:37:45 +02:00
Rémi Verschelde
0e93a1df79
Remove obsolete LargeTexture, it's no longer useful since 3.x
It existed in early Godot releases to allow working around hardware limitations
on max texture sizes (e.g. hardware limits of 1024x1024 pixels).

Nowadays the max texture size supported natively by Godot is 16384x16384, and
even low end mobile hardware should support at least 4096x4096.

The LargeTexture implementation is basically just an array with offsets, sizes
and textures and should be easy to replicate with a custom Texture resource if
needed - solving most of its bugs on the way as the implementation removed here
has various unimplemented or incomplete methods.
2021-04-28 15:51:55 +02:00
Rémi Verschelde
305b2a15bf
Merge pull request #48239 from akien-mga/goodbye-copymem
Core: Drop custom `copymem`/`zeromem` defines
2021-04-28 11:04:05 +02:00
Hugo Locurcio
60b70c77e0
Improve the editor theme
The editor theme now makes use of rounded corners and less borders
to follow modern visual trends.

The default theme's colors were also tweaked to make the blue hue
more subtle (similar to the Arc theme, which was removed as a
consequence). The Alien theme was replaced by a Breeze Dark theme,
which should blend in well with the KDE theme.
2021-04-27 22:38:26 +02:00
Rémi Verschelde
95cfce661b
Merge pull request #48050 from JFonS/occlusion_culling 2021-04-27 19:07:12 +02:00
Rémi Verschelde
8247667a3e
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.
2021-04-27 16:26:27 +02:00
Rémi Verschelde
b95a82d46a
Merge pull request #47826 from Chaosus/vs_fix_default_input_overriding
Prevents default values of VSNodeCustom from overriding by a script
2021-04-27 10:42:51 +02:00
Rémi Verschelde
759b876b8a
Merge pull request #46593 from pycbouh/theme-editor-better-edit-ui
Refactor Edit Theme menu in Theme Editor
2021-04-23 23:12:25 +02:00
jfons
4d9d99bb82 Implement occlusion culling
Added an occlusion culling system with support for static occluder meshes.
It can be enabled via `Project Settings > Rendering > Occlusion Culling > Use Occlusion Culling`.

Occluders are defined via the new `Occluder3D` resource and instanced using the new
`OccluderInstance3D` node. The occluders can also be automatically baked from a
scene using the built-in editor plugin.
2021-04-23 21:45:23 +02:00
Rémi Verschelde
8ba06e3161
Merge pull request #47448 from madmiraal/rename-lineedit-cursor
Rename LineEdit getters and setters to match property names
2021-04-19 10:40:29 +02:00
Yuri Sizov
2524238bb3 Refactor Edit Theme menu in Theme Editor 2021-04-18 17:55:49 +03:00
Yuri Roubinsky
8ae5c6c6ec Fix sky visual shader mode after last rename 2021-04-17 20:59:48 +03:00
Marcel Admiraal
86822b187e Rename LineEdit caret_* properties getters and setters to match property 2021-04-17 12:41:23 +01:00
Rémi Verschelde
2e87857d75
Merge pull request #47629 from Calinou/editor-allow-center-selection-without-selection
Allow Center Selection to work without any selection in 2D/3D editors
2021-04-16 12:47:47 +02:00
Rémi Verschelde
c7a4e2196e
Merge pull request #47878 from clayjohn/rename-get_surface_material
Rename get_surface_material to get_surface_override_material
2021-04-15 07:57:15 +02:00
clayjohn
92731d292c Rename get_surface_material to get_surface_override_material 2021-04-14 20:24:03 -07:00
reduz
d3b49c416a Refactor GLSL shader compilation
-Used a more consistent set of keywords for the shader
-Remove all harcoded entry points
-Re-wrote the GLSL shader parser, new system is more flexible. Allows any entry point organization.
-Entry point for sky shaders is now sky().
-Entry point for particle shaders is now process().
2021-04-14 11:37:52 -03:00
Rémi Verschelde
6b39980ea9
Merge pull request #47856 from ray90514/bug#47555
Fix multi-selection doesn't correctly show in the inspector
2021-04-14 13:43:35 +02:00
ray90514
16decbc0ee Fix multi-selection doesn't correctly show in the inspector 2021-04-13 18:09:53 +08:00
Yuri Roubinsky
8d3e46098b Prevents default values of VSNodeCustom from overriding by a script 2021-04-12 14:41:08 +03:00
Rémi Verschelde
4a1f2dcb74
Merge pull request #47531 from fire/update-skeleton-display
Update Skeleton3D inspector Bone Transforms
2021-04-12 00:19:23 +02:00
Haoyu Qiu
c8a40c8005 Fix 3D selection box size for Node3D 2021-04-11 15:15:52 +08:00
Rémi Verschelde
8b6e3d6375
Merge pull request #46340 from gongpha/various-color-picker
Add Various ColorPicker shapes
2021-04-10 13:29:50 +02:00
Aaron Franke
b8f66d58b6
Show a message when trying to zoom farther than the limit 2021-04-09 11:21:09 -04:00