Commit graph

30657 commits

Author SHA1 Message Date
Haoyu Qiu
1da4e9e608
Hide open doc button when not inspecting anything
(cherry picked from commit 80e4c8626d)
2021-08-03 09:15:33 +02:00
vitika9
bea67d7763
Fixed Camera2D's reset_smoothing() does not work as described
(cherry picked from commit 22eaec6895)
2021-08-03 09:15:33 +02:00
Hugo Locurcio
bcd3c9a285
Improve the 2D editor ruler display
- Use the ° symbol instead of "deg" to reduce clutter.
- Round the displayed lengths to only one decimal instead of two
  to further reduce clutter.
- Don't make the `px` suffix localizable, as it isn't localizable
  anywhere else in the editor.

(cherry picked from commit 026aea681d)
2021-08-03 09:15:33 +02:00
kleonc
507fcf2a82
Astar::get_available_point_id Start from 0
(cherry picked from commit 17324db4ca)
2021-08-03 08:45:27 +02:00
Rémi Verschelde
38d47c051a
Merge pull request #51200 from timothyqiu/enet-memleak
[3.x] Fix `NetworkedMultiplayerENet` client memory leak
2021-08-03 08:10:26 +02:00
Rémi Verschelde
08b67aabb8
Merge pull request #51193 from timothyqiu/atp-remove
memdelete the node in AnimationTreePlayer.remove_node
2021-08-03 08:08:22 +02:00
Haoyu Qiu
ac04032e95 Fix NetworkedMultiplayerENet client memory leak
The host is not destroyed in some error conditions.
2021-08-03 10:14:14 +08:00
Rémi Verschelde
7b97243521
Merge pull request #51040 from nekomatata/layer-grid-32-3.x
[3.x] Refactor layer property editor grid
2021-08-02 21:14:43 +02:00
Rémi Verschelde
5054596533
Merge pull request #51120 from Calinou/doc-randomnumbergenerator-tutorials-3.x
Link to the Random number generation tutorial in RandomNumberGenerator
2021-08-02 18:17:01 +02:00
Haoyu Qiu
859922a5f0 Delete the node in AnimationTreePlayer.remove_node 2021-08-03 00:12:04 +08:00
Rémi Verschelde
7a7de3ce12
Merge pull request #51191 from neikeq/mono-ios-aot-cache
C#+iOS: Cache AOT compilater output
2021-08-02 17:57:37 +02:00
Ignacio Roldán Etchevery
e72fdc4b95 C#+iOS: Cache AOT compilater output
Implemented some basic caching to avoid unnecessary AOT compilation
of unchanged assemblies that were already compiled previously.
This reduces iOS export times considerably for subsequent builds
since many dependencies never change, such as framework assemblies
and the Godot bindings.

The AOT compiler asm output and object files are now placed in
`res://.mono/temp/obj/<CONFIG>/godot-aot-cache/` instead of a
temporary directory.
2021-08-02 17:27:47 +02:00
Rémi Verschelde
8f3ec04811
Merge pull request #51186 from lawnjelly/portals_fix_ui_default 2021-08-02 17:20:52 +02:00
lawnjelly
9e9abe2137 Portals - Fix UI default
I had forgotten to add a call to update_portal_tools() at the end of the SpatialEditor constructors. This ensures that the portal UI is off by default in normal use without portals.
2021-08-02 16:10:34 +01:00
Rémi Verschelde
73c6ab0215
Merge pull request #51152 from lawnjelly/portals_improve_ui 2021-08-02 14:40:18 +02:00
Rémi Verschelde
76e202c07b
Merge pull request #51171 from timothyqiu/spin-slider-osx-3x
[3.x] Use Command+Drag in EditSpinSlider on macOS
2021-08-02 14:36:35 +02:00
Rémi Verschelde
b42ca985bd
Merge pull request #51062 from lawnjelly/portals_no_names 2021-08-02 13:28:01 +02:00
Haoyu Qiu
a4dee07966 Use Command+Drag in EditSpinSlider on macOS 2021-08-02 19:09:04 +08:00
Rémi Verschelde
e8f1cc693a
Merge pull request #50432 from goostengine/ctrl-enter-commit-3.x
[3.x] VCS: Allow to stage and commit all files with Ctrl + Enter
2021-08-02 12:20:35 +02:00
lawnjelly
2eae35693e Portals - change import naming convention to postfix
In response to user demand, the naming convention for importing levels from blender etc is changed from prefixes `Room_` and `Portal_` to postfixes `-room`, `-roomgroup`, `-portal`.
2021-08-02 11:04:02 +01:00
lawnjelly
8c4c6a93b0 Portals - Remove node naming restrictions
The use of special prefixes is only actually required during the import phase - the first conversion of rooms, roomgroups, and portals from Spatials and MeshInstances (based on the workflow of importing from blender).

Once converted to the native Godot nodes there is no longer a need for the naming requirements.

This PR removes the requirements except for the import. Manual portal linking after the initial conversion is now done exclusively using the `linked_room` nodepath property of the Portal.
2021-08-01 20:04:58 +01:00
lawnjelly
776623d56b Portals - Improve UI and add shortcuts
This PR makes the 'convert rooms' button permanently on the toolbar and accessible whichever node is selected, so you can convert rooms without having to select the RoomManager first.

It also adds a togglable item 'view portal culling' to the 'View' menu which is a simple way of setting the RoomManager 'active' setting without the RoomManager being the selected node.

Both of these have keyboard shortcuts, which should make it much faster to reconvert rooms and edit.

In addition there the string in the 'Perspective' Listbox is modified to show [portals active] when portal culling is operational, for visual feedback. This is updated when you change modes, and when the rooms are invalidated.
2021-08-01 19:54:16 +01:00
Rémi Verschelde
4542e3382b
Merge pull request #51131 from timothyqiu/i18n-android-export-3x
[3.x] Make progress and errors translatable when exporting to Android
2021-08-01 12:10:52 +02:00
Rémi Verschelde
74f28ca404
Merge pull request #51138 from lawnjelly/fix_profiler_delta
[3.4] Profiling - fix frame_time measurement
2021-08-01 12:10:38 +02:00
Haoyu Qiu
55b52341d1 Make progress and errors translatable when exporting to Android 2021-08-01 17:15:56 +08:00
Rémi Verschelde
02967a9c5e
Merge pull request #51037 from winterpixelgames/ws-fix
3.x WebsocketPeer outbound buffer fixes and buffer size query
2021-08-01 11:14:03 +02:00
lawnjelly
98a39aade9 Profiling - fix frame_time measurement
When the `sync_after_draw` feature was on it was possible for the profiler's frame_time measurement to be incorrect. This fixes this problem by storing the raw measured time for use by the profiler.
2021-08-01 10:05:43 +01:00
Rémi Verschelde
59c050ddc3
Windows: Fix build with SCons 4.2.0
(cherry picked from commit c191cfbddf)
2021-08-01 11:05:40 +02:00
Jordan Schidlowsky
023548c0a5 Websocket peer outbound buffer fixes. Expose outbound buffered amount. 2021-07-31 19:50:05 -06:00
Hugo Locurcio
93f4f9e076
Link to the Random number generation tutorial in RandomNumberGenerator
This was done in `master` already, but not in `3.x`.
2021-07-31 22:54:30 +02:00
Rémi Verschelde
a17228c788
Merge pull request #51111 from pycbouh/editor-put-the-colon-back-in-3.x
[3.x] Put multiple colons back into translated strings
2021-07-31 22:05:04 +02:00
Rémi Verschelde
2d2e247a7a
Merge pull request #51106 from timothyqiu/i18n-action-names-3x
[3.x] Make action names translatable
2021-07-31 21:13:46 +02:00
Rémi Verschelde
858c6f7b28
Merge pull request #51113 from pycbouh/editor-fix-audio-bus-colors-3.x
[3.x] Fix theming in the audio bus editor
2021-07-31 21:05:53 +02:00
Yuri Sizov
ade21ed69c Fix theming in the audio bus editor 2021-07-31 21:43:14 +03:00
Yuri Sizov
9b228f0f5d Put multiple colons back into translated strings 2021-07-31 20:18:24 +03:00
Haoyu Qiu
a3b221e99f Make action names translatable 2021-07-31 22:19:47 +08:00
Rémi Verschelde
7c1ee0488e
Merge pull request #51087 from Calinou/editor-viewport-highlight-context-menus-3.x
Highlight context menu items at the top of the 2D/3D viewports (3.x)
2021-07-31 11:48:29 +02:00
Rémi Verschelde
3875cdaec4
Merge pull request #51092 from lawnjelly/portals_preview_globals
Portals - disable frustum culling gizmos with preview camera
2021-07-31 10:53:45 +02:00
Rémi Verschelde
4ef834637e
Merge pull request #41470 from madmiraal/fix-41397-3.2
[3.x] Ensure node's area tree signals are disconnected when clearing monitoring, even if nodes are no longer in the tree.
2021-07-31 10:37:56 +02:00
lawnjelly
93c78af488 Portals - disable frustum culling gizmos with preview camera
When using the preview camera feature it turns out as well as culling the game objects, this also culls the editor gizmos from the preview camera, which makes the editor hard to use in this mode.

To get around this problem we simply disable frustum culling for GLOBAL portal_mode objects when in preview camera mode. This could be a bit slower in an editor scene with lots of gizmos but is the simplest way of solving the problem.
2021-07-31 07:58:47 +01:00
Marcel Admiraal
e2d0dfe3c7 Ensure node's area tree signals are disconnected when clearing monitoring,
even if nodes are no longer in the tree.
2021-07-31 07:14:03 +01:00
Hugo Locurcio
1ed24ca548
Highlight context menu items at the top of the 2D/3D viewports
This makes it easier to notice that some menu items only appear when
specific nodes are selected.

This change applies to both 2D and 3D editors, including both plugin-based
menus and the hardcoded 2D layout/animation contextual menus.
2021-07-31 01:50:50 +02:00
Rémi Verschelde
504f47eaec
Merge pull request #47222 from dreamsComeTrue/anim-track-improv
[3.x] Make Animation's SceneTreeDialog filter nodes properly
2021-07-30 23:42:55 +02:00
PouleyKetchoupp
e0e9f575ae Refactor layer property editor grid
- Now able to display up to 32 layers in physics (still 20 for render)
- Adjustable grid size to fit available space in dock
- Expansion icon to display more layers vertically
- Layer numbers in cells to help with selection
2021-07-30 11:43:04 -07:00
Rémi Verschelde
9735f2803c
Merge pull request #46800 from The-O-King/normal_compression
[3.x] Implement Octahedral Map Normal/Tangent Attribute Compression
2021-07-30 17:34:47 +02:00
Rémi Verschelde
18f09492b4
Merge pull request #50874 from raulsntos/backport-44355 2021-07-30 16:43:03 +02:00
Omar El Sheikh
d274284069 Octahedral Normal/Tangent Compression
Implement Octahedral Compression for normal/tangent vectors
*Oct32 for uncompressed vectors
*Oct16 for compressed vectors

Reduces vertex size for each attribute by
*Uncompressed: 12 bytes, vec4<float32> -> vec2<unorm16>
*Compressed: 2 bytes, vec4<unorm8> -> vec2<unorm8>

Binormal sign is encoded in the y coordinate of the encoded tangent

Added conversion functions to go from octahedral mapping to cartesian
for normal and tangent vectors

sprite_3d and soft_body meshes write to their vertex buffer memory
directly and need to convert their normals and tangents to the new oct
format before writing

Created a new mesh flag to specify whether a mesh is using octahedral
compression or not
Updated documentation to discuss new flag/defaults

Created shader flags to specify whether octahedral or cartesian vectors
are being used

Updated importers to use octahedral representation as the default format
for importing meshes

Updated ShaderGLES2 to support 64 bit version codes as we hit the limit
of the 32-bit integer that was previously used as a bitset to store
enabled/disabled flags
2021-07-30 10:29:09 -04:00
EricEzaM
0e5c6e0d55 Allow checking for exact matches with Action events.
Added additional param to action related methods to test for exactness.
If "p_exact_match" is true, then the action will only be "matched" if the provided input event *exactly* matches with the action event.

Before:
* Action Event = KEY_S
* Input Event = KEY_CONTROL + KEY_S
* Is Action Pressed = True

Now:
You can still do the above, however you can optionally check that the input is exactly what the action event is:
* Action Event = KEY_S
* Input Event = KEY_CONTROL + KEY_S
* p_exact_match = True
* Is Action Pressed = False
* If the Input Event was only KEY_S, then the result would be true.

Usage:

```gdscript
Input.is_action_pressed(action_name: String, exact_match: bool)
Input.is_action_pressed("my_action", true)

InputMap.event_is_action(p_event, "my_action", true)

func _input(event: InputEvent):
  event.is_action_pressed("my_action", false, true) # false = "allow_echo", true = "exact_match"
  event.is_action("my_action", true)
```

Co-authored-by: Eric M <itsjusteza@gmail.com>
2021-07-30 15:35:39 +02:00
Rémi Verschelde
7f4eafa6f2
Merge pull request #50983 from Calinou/editor-use-bullet-points-3.x
Use bullet points in the editor instead of dashes where relevant
2021-07-30 13:42:27 +02:00
Rémi Verschelde
7075bb6129
Merge pull request #51046 from aaronfranke/3.x-freetype
[3.x] Fix building with the FreeType module disabled
2021-07-30 09:07:35 +02:00