Commit graph

2322 commits

Author SHA1 Message Date
qarmin 559bc3ca87 Change non-existent World to World3D 2020-04-18 11:00:51 +02:00
Juan Linietsky 0e1c66d9fc Implement global and per instance shader uniforms.
Adds two keywords to shader language for uniforms:
-'global'
-'instance'

This allows them to reference values outside the material.
2020-04-17 12:35:41 -03:00
Rémi Verschelde 45a036feec
Merge pull request #37012 from Calinou/reverse-builtin-script-naming
Tweak the built-in script naming for resources with custom names
2020-04-16 12:38:54 +02:00
Eric M 7f5fb73146 Added selection outline to locked nodes. 2020-04-15 22:03:12 +10:00
Rémi Verschelde 5e5103f460
Merge pull request #37861 from reduz/implement-decals
Implement decals
2020-04-14 17:13:20 +02:00
Juan Linietsky 5944eb6e7f Implement decals
Also implemented decal atlas, so projectors and other stuff can be added.
Sidenote: Had to make RID hashable, so some unrelated includes changed
in order to include it in hashfuncs.h
2020-04-14 11:13:34 -03:00
Rémi Verschelde 644bc87240
Merge pull request #37843 from qarmin/unitialized_crash
Fixed crash caused by uninitialised variable
2020-04-13 13:53:44 +02:00
qarmin c937fe5237 Fixed crash caused by unitialized variable 2020-04-13 12:11:55 +02:00
Rémi Verschelde 1888ab594b
Merge pull request #37823 from MCrafterzz/relativeSnap
Relative scale snapping 2D
2020-04-13 12:10:25 +02:00
Marcus Elg 795cba2d73 Relative scale snapping 2D 2020-04-13 10:16:54 +02:00
Nico Mitchell 7211ad73bc Remove separators from particles menus 2020-04-12 22:15:20 -04:00
Juan Linietsky a57dc398db Implement MSAA 2020-04-12 15:33:57 -03:00
Juan Linietsky 16ae2cc1bf Add screen space AA option, with FXAA implementation. 2020-04-12 10:57:18 -03:00
Juan Linietsky d06f8ef75a Shows proper scene render time in editor info
Also fixed GPU profiler, which was not working on nvidia hardware.
2020-04-10 14:19:30 -03:00
Kiri Jolly cc27b4560f Othographic camera in-editor now uses Z near/far settings instead of a hardcoded value
Fixes #18809.

The in-editor ortho camera used a far clipping plane of 8192 units, and was
placed 4096 units away from the camera cursor.

This was far enough to cause culling issues from floating point precision loss
on objects smaller than one unit.

This change modifies the near/far clipping planes of the ortho camera to use
those specified in the editor (and currently used by the perspective camera).
The frustum is still centered around the camera cursor location, as it was
before.

(cherry picked from commit 26912c15e6)
2020-04-10 17:19:49 +02:00
Rémi Verschelde 60f77fa059
Merge pull request #37509 from wazzy47/issue_36228
Add "preview_on_sphere" setting of material editor plugin
2020-04-10 12:08:51 +02:00
Dominik 'dreamsComeTrue' Jasiński 235f13dc51 Allow to rename animation just after it was duplicated & show animation name in Delete prompt 2020-04-10 11:48:55 +02:00
Juan Linietsky 26ecd924cc
Merge pull request #37678 from reduz/refactor-shadowmapping
Refactored shadowmapping.
2020-04-08 13:59:10 -03:00
Juan Linietsky 4ffc0d6b3f Refactored shadowmapping.
- Made shadow bias size independent, so it will remain when changing light or camera size.
- Implemented normal offset bias, which greatly enhances quality.
- Added transmission to subsurface scattering
- Reimplemented shadow filter modes

Closes #17260
2020-04-08 11:19:43 -03:00
Rémi Verschelde d89dc5794a
Merge pull request #37644 from JFonS/gizmos_rename
Rename all gizmo classes, using the 4.0 node names.
2020-04-08 10:54:42 +02:00
jfons 3841a64703 Rename all gizmo classes, using the 4.0 node names. 2020-04-07 10:02:18 +02:00
Yuri Roubinsky e0a9879ce4
Merge pull request #37623 from Chaosus/vs_fix_keyword_name
Adds warning to the uniform name in visual shader if its equal to keyword
2020-04-06 14:15:20 +03:00
Yuri Roubinsky 8dfe6716ec Adds warning to the uniform name in visual shader if its equal to keyword 2020-04-06 12:29:50 +03:00
Rémi Verschelde 32d9d6e7ff
Merge pull request #37621 from dankan1890/autoslice_fix
Fixed TextureRegion autoslice issue.
2020-04-06 11:28:18 +02:00
dankan1890 671e97d254 TextureRegion: fixed Autoslice not created/updated properly. 2020-04-06 10:36:59 +02:00
Rémi Verschelde 6b07c72d76
Merge pull request #37556 from KoBeWi/kill_get_index
Remove Node.get_position_in_parent()
2020-04-06 09:44:38 +02:00
Tomasz Chabora c1023157eb Remove Node.get_position_in_parent() 2020-04-06 01:19:20 +02:00
Vasiliy 48b144afb7 Add "preview_on_sphere" setting of material editor plugin 2020-04-04 12:36:05 +03:00
qarmin 7d19939203 Removed duplicated add_child 2020-04-03 19:48:40 +02:00
Rémi Verschelde 59d44ee872
Merge pull request #37505 from YeldhamDev/viewcont_rename
Rename ViewportContainer to SubViewportContainer
2020-04-03 15:53:35 +02:00
Rémi Verschelde f1e943f6ce
Merge pull request #35720 from Calinou/remove-request-docs-button
Remove Request Docs button in the script editor due to various issues
2020-04-02 16:45:01 +02:00
Hugo Locurcio 2f6f029a75 Remove Request Docs button in the script editor due to various issues
The Request Docs button is partly responsible for layout overflow
issues on narrow displays, such as #31133.

It also tended to attract spam and low-effort issues that were
difficult to act upon. A "Send Docs Feedback" menu option has been added
to replace it.
2020-04-02 14:07:03 +02:00
lupoDharkael 95a1400a2a Replace NULL with nullptr 2020-04-02 13:38:00 +02:00
Michael Alexsander 0c6851ae53 Rename ViewportContainer to SubViewportContainer 2020-04-01 16:11:44 -03:00
Rémi Verschelde 0a2fa4d892 Fix more -Wmaybe-uninitialized warnings with target=release_debug
I have no idea why those don't get triggered in target=debug builds.

Fixes #37461.
2020-03-31 13:52:42 +02:00
Rémi Verschelde f3c74afd28
Merge pull request #37436 from akien-mga/doc-node-renames
doc: Update classref with node renames
2020-03-30 20:32:11 +02:00
Rémi Verschelde eaaee63b62 doc: Update classref with node renames
A few extra renames for classes which were missed in last week's PRs.
2020-03-30 18:23:02 +02:00
Rémi Verschelde cd4e46ee65 SCons: Format buildsystem files with psf/black
Configured for a max line length of 120 characters.

psf/black is very opinionated and purposely doesn't leave much room for
configuration. The output is mostly OK so that should be fine for us,
but some things worth noting:

- Manually wrapped strings will be reflowed, so by using a line length
  of 120 for the sake of preserving readability for our long command
  calls, it also means that some manually wrapped strings are back on
  the same line and should be manually merged again.

- Code generators using string concatenation extensively look awful,
  since black puts each operand on a single line. We need to refactor
  these generators to use more pythonic string formatting, for which
  many options are available (`%`, `format` or f-strings).

- CI checks and a pre-commit hook will be added to ensure that future
  buildsystem changes are well-formatted.
2020-03-30 09:05:53 +02:00
Tomasz Chabora 37ffb40047 Properly handle node remove via undo 2020-03-29 19:59:04 +02:00
Juan Linietsky a6f3bc7c69 Renaming of servers for coherency.
VisualServer -> RenderingServer
PhysicsServer -> PhysicsServer3D
Physics2DServer -> PhysicsServer2D
NavigationServer -> NavigationServer3D
Navigation2DServer -> NavigationServer2D

Also renamed corresponding files.
2020-03-27 15:21:27 -03:00
Rémi Verschelde d1acbbce7f Rename more 2D and 3D nodes to follow convention
Rename editor plugins to match the new node names.
2020-03-27 16:26:34 +01:00
Juan Linietsky eaae4b6408 Renamed 2D and 3D nodes to make their types explicit
Fixes #30736.
2020-03-27 14:54:04 +01:00
Mateo Kuruk Miccino f387b9b4f4 Multiple changes to DisplayServerX11
- Travis: Change x11 to linuxbsd
- SCons: Change x11 plataform to linuxbsd
- Plugins: Remove ; to avoid fallthrough warning
- DisplayServerX11: Implement set_icon
- DisplayServerX11: Fix X11 bug when a window was erased from windows
  map, all the changes from that erased windows are sending to the main
  window
- DisplayServerX11: Reorder create_window commands
- DisplayServerX11: Change every Size2 to Size2i and Rect2 to Rect2i
  where it belongs

+ More X11 fixes which have been integrated directly back into reduz's
original commits while rebasing the branch.
2020-03-26 15:49:54 +01:00
Juan Linietsky b3080bc2f4 Popups have also been converted to windows
Controls using the old modal API have been replaced to use popups.
2020-03-26 15:49:44 +01:00
Juan Linietsky c7b4dcae2f Open sub-windows as embedded if the OS does not support them 2020-03-26 15:49:43 +01:00
Juan Linietsky 441f1a5fe9 Popups are now windows also (broken!) 2020-03-26 15:49:42 +01:00
Juan Linietsky 4758057f20 Working multiple window support, including editor 2020-03-26 15:49:40 +01:00
Juan Linietsky 8e6960a69e Refactored input, goes all via windows now.
Also renamed Input to InputFilter because all it does is filter events.
2020-03-26 15:49:39 +01:00
Juan Linietsky 9e08742de8 Added a Window node, and made it the scene root.
Still a lot of work to do.
2020-03-26 15:49:38 +01:00
Juan Linietsky f8a79a97c7 Effective DisplayServer separation, rename X11 -> LinuxBSD 2020-03-26 15:49:34 +01:00
Juan Linietsky 4396e98834 Refactored Input, create DisplayServer and DisplayServerX11 2020-03-26 15:49:32 +01:00
Yuri Roubinsky 1358febfa1
Merge pull request #37287 from Chaosus/vs_sky
Added sky shader mode to visual shaders
2020-03-26 08:38:19 +03:00
Yuri Roubinsky 898b843718 Added sky shader mode to visual shaders 2020-03-25 19:04:42 +03:00
Andrea Catania 277696d6c5 Fixed IK rotation issue 2020-03-24 10:06:24 +01:00
Rémi Verschelde ed9a0d0484
Merge pull request #37179 from clayjohn/VULKAN-sky-shader
Implement Sky Shaders
2020-03-22 20:03:35 +01:00
clayjohn 61a74739ca Working sky shader implementation 2020-03-21 20:43:44 -07:00
Rémi Verschelde 7ed9da0a54
Merge pull request #37161 from simpuid/positon-gizmo-fix
Fixes transform gizmo position when node has default transform
2020-03-21 15:31:47 +01:00
simpuid 19825436d4 Fixes transform gizmo position when node has default transform
Changes made:
* Added dirty bit for SpatialEditorSelectedItem's last_xform
* SpatialEditorViewport checks that dirt bit too before skipping the selection
2020-03-21 18:31:46 +05:30
johan 1c02906a6f Editor 2D: Change pixel alignment strategy, fix jittering in high zoom
Alignment of scene pixels on screen pixel ensure a crisp rendering of small features (such as text). Unfortunately, alignment of top left pixel on screen adds a lot of jittering when zooming at high zoom factor.

This change allow to snap the top left scene pixel on the closest screen pixel (not only the top-left most), and we do so only when the scale factor is an integer.
2020-03-18 12:37:14 -04:00
Rémi Verschelde cb282c6ef0 Style: Set clang-format Standard to Cpp11
For us, it practically only changes the fact that `A<A<int>>` is now
used instead of the C++03 compatible `A<A<int> >`.

Note: clang-format 10+ changed the `Standard` arguments to fully
specified `c++11`, `c++14`, etc. versions, but we can't use `c++17`
now if we want to preserve compatibility with clang-format 8 and 9.
`Cpp11` is still supported as deprecated alias for `Latest`.
2020-03-17 07:36:24 +01:00
Rémi Verschelde 2a49798c7b
Merge pull request #36970 from JFonS/fix_viewports_update
Update all editor viewports after settings changes
2020-03-14 23:46:58 +01:00
JFonS 55b478afd9 Update all editor viewports after settings changes 2020-03-14 20:47:12 +01:00
Hugo Locurcio e90beade15 Tweak the built-in script naming for resources with custom names
This makes the script name appear before the scene file name,
which ensures it's always visible even if the list of scripts is too
narrow to display the full name.

This only impacts built-in scripts with custom resource names.
Unnamed resources will still use `<scene_file>::<id>` naming
in the list of scripts.
2020-03-13 15:20:42 +01:00
Rémi Verschelde 951ecc4f79
Merge pull request #36518 from Janglee123/no-underlined-keywords
Removed underlining of not clickable symbols
2020-03-12 22:24:43 +01:00
janglee 50a570c9c1 Removed underlining for not clickable symbols 2020-03-11 08:57:21 +00:00
JFonS a0af3094b4 Fix rotation gizmo for empty Spatials
The AABB for an empty Spatial has 0 size, since the stored and
compared Transform was scaled by the AABB size, it would completely
destroy the rotation information. If there is no rotation
information, the gizmo doesn't update when the rotation changes.
2020-03-10 16:23:22 +01:00
Rémi Verschelde 1500e40ccf
Merge pull request #36887 from MCrafterzz/relativeSnap
Made snap relative work on rotation as well
2020-03-10 10:17:42 +01:00
Fabio Alessandrelli 95c4ba80c5 Fix "deploy with remote debug" editor option.
The line to update the option was missing (rendering it useless).
Of course the only one I didn't know how to test was broken.
2020-03-10 04:06:19 +01:00
Rémi Verschelde 478337c412
Merge pull request #36751 from Faless/debugger/threads_and_profilers
ScriptDebugger refactor, threading, profilers.
2020-03-09 19:08:07 +01:00
Marcus Elg 97a07bada7 Made snap relative work on rotation as well 2020-03-09 17:00:47 +01:00
Rémi Verschelde af015f79d3
Merge pull request #36917 from volzhs/cancel-snap-setting
Update snap setting only with OK
2020-03-09 12:19:56 +01:00
Rémi Verschelde 1f37c8e048
Merge pull request #36914 from guilhermefelipecgs/fix_check_view_information
Fix the VIEW_INFORMATION checkbox not being selected (visually)
2020-03-09 12:17:07 +01:00
Rémi Verschelde e162c07af9
Merge pull request #36920 from Faless/debugger/more_instances
Move Debug menu logic to DebuggerEditorPlugin, allow 4 debug instances
2020-03-09 12:01:14 +01:00
Fabio Alessandrelli bfc1b76803 Allow running/debugging up to 4 instances. 2020-03-09 09:43:54 +01:00
jfons 7055a926ff Add rotation widget to 3D viewport 2020-03-08 23:38:29 +01:00
Fabio Alessandrelli 4d623b70d7 Move Debug menu logic to DebuggerEditorPlugin 2020-03-08 22:57:48 +01:00
volzhs 667a981d4d Update snap setting only with OK
restore previous values with cancel
2020-03-09 04:31:11 +09:00
Guilherme Felipe 126cec41e6 Fix the VIEW_INFORMATION checkbox not being selected
Generated id of "Display Advanced..." was in conflict with "View Information"
2020-03-08 15:34:41 -03:00
Fabio Alessandrelli 540ca05a80 Threaded networking for editor debugger. 2020-03-08 12:16:09 +01:00
Rémi Verschelde fdda39a506 Signals: Don't pass default binds to EditorProperty property_changed
This was done by mistake in #36758, but it's not necessary and actual
causes a bug.

`property_changed` is only emitted via `emit_changed()`, which already
has default values for `p_field` and `p_changing`.

Also reverted to using `String` for now to be on the safe side, even if
it's inconsistent with `emit_changed()`. I had only changed it
partially in #36758 so it was inconsistent. It probably does make sense
to port `EditorInspector` and related property editors to use
`StringName` where relevant, but that's for a dedicated PR.

Fixes #36799.
2020-03-05 15:35:44 +01:00
Rémi Verschelde 7c9e15238e
Merge pull request #36739 from Calinou/improve-giprobe-editor-label
Improve the GIProbe editor contextual label
2020-03-04 22:41:25 +01:00
Rémi Verschelde 48ed841dd0 Signals: Fix some regressions from #36426
- Fix `callable_mp` bindings to methods which used to have default
  arguments passed to `bind_method`. We now have to re-specify them
  manually when connecting.
- Re-add `GroupsEditor::update_tree` binding.
- Misc code quality changes along the way.
2020-03-03 11:44:06 +01:00
Hugo Locurcio 46bc1a7c3f
Improve the GIProbe editor contextual label
- Change the label color depending on the estimated performance
  (green = fast, yellow = average, red = slow).
- Use the Unicode multiplication symbol.
- Make the label translatable.
2020-03-02 22:09:38 +01:00
Rémi Verschelde e2b66cacf7
Merge pull request #18020 from bruvzg/input_fix_non_latin_and_add_hw_scancodes
Fix non-latin layout scancodes on Linux, adds access to physical scancodes.
2020-03-01 23:00:42 +01:00
Rémi Verschelde cb91f8d971
Merge pull request #36406 from nathanwfranke/revert-fix-signal-errors
Partial revert "Fix two signal errors"
2020-02-29 12:11:53 +01:00
Mateo Dev .59 b8f08b42e7 Signals: Fix signals error prints for the new signal system 2020-02-28 14:24:09 +01:00
Rémi Verschelde f742dabafe Signals: Manually port most of remaining connect_compat uses
It's tedious work...

Some can't be ported as they depend on private or protected methods
of different classes, which is not supported by callable_mp (even if
it's a class inherited by the current one).
2020-02-28 14:24:09 +01:00
Rémi Verschelde 01afc442c7 Signals: Port connect calls to use callable_mp
Remove now unnecessary bindings of signal callbacks in the public API.
There might be some false positives that need rebinding if they were
meant to be public.

No regular expressions were harmed in the making of this commit.
(Nah, just kidding.)
2020-02-28 14:24:09 +01:00
Rémi Verschelde 4f64f3401a
Merge pull request #36388 from AndreaCatania/some_renames
Rename Navigation{Mesh,Polygon}Instance and PlaneShape for clarity
2020-02-28 09:15:38 +01:00
Andrea Catania 483994601d Renamed NavigationPolygonInstance to NavigationRegion2D 2020-02-28 08:28:53 +01:00
Rémi Verschelde 2d904d2f80
Merge pull request #36232 from Calinou/add-soft-line-length-guideline
Add a soft line length guideline to the script editor
2020-02-27 21:10:42 +01:00
Rémi Verschelde eaf909dcf9
Merge pull request #36490 from Calinou/assetlib-error-version-compatibility
Mention version compatibility when there are no results in the assetlib
2020-02-27 21:08:39 +01:00
Rémi Verschelde 38c78a9ab6
Merge pull request #36333 from Calinou/decrease-script-editor-split-width
Decrease the script editor's default split width to 70
2020-02-27 20:54:23 +01:00
Andrea Catania 3b64ecbc4b Renamed NavigationMeshInstance to NavigationRegion 2020-02-27 17:42:53 +01:00
Rémi Verschelde ac446570d6
Merge pull request #36545 from nathanwfranke/syntax-highlight-int-types
Fix autocomplete and highlighting for new integer types
2020-02-27 14:20:10 +01:00
Yuri Roubinsky 7aaad99afb Place paste after copy in new popup menu in visual shader
+ renamed _on_nodes_delete to _delete_nodes
2020-02-27 13:55:41 +03:00
Yuri Roubinsky 2d548b4d1a Added popup menu for some actions in visual shaders 2020-02-27 12:54:26 +03:00
nathanwfranke 2dd498df70 Fix autocomplete and GDScript Highlighting for types
Types include new integer types and others
2020-02-26 16:13:28 -06:00
Hugo Locurcio 7348dfb5b7
Fix a typo in the "Create Single Convex Collision Sibling" option 2020-02-26 22:25:55 +01:00
Yuri Roubinsky 9cfd2ed564 Fix resizer icon color in VisualScripts/Shaders when graph headers is on 2020-02-26 17:48:58 +03:00