Commit Graph

2989 Commits

Author SHA1 Message Date
Yuri Rubinsky 886c2d9681 Implement shader uniform groups/subgroups 2022-07-26 11:26:09 +03:00
Fabio Alessandrelli ca7d572908 [Net] Modularize multiplayer, expose MultiplayerAPI to extensions.
- RPC configurations are now dictionaries.
- Script.get_rpc_methods renamed to Script.get_rpc_config.
- Node.rpc[_id] and Callable.rpc now return an Error.
- Refactor MultiplayerAPI to allow extension.
- New MultiplayerAPI.rpc method with Array argument (for scripts).
- Move the default MultiplayerAPI implementation to a module.
2022-07-26 09:31:12 +02:00
bruvzg 36ef8f29dc
Implement support for loading system fonts on Linux, macOS / iOS and Windows. 2022-07-26 08:38:05 +03:00
Rémi Verschelde 90019676b0 Code quality: Fix header guards consistency
Adds `header_guards.sh` bash script, used in CI to validate future
changes. Can be run locally to fix invalid header guards.
2022-07-25 11:17:40 +02:00
Rémi Verschelde a9147c5544
Merge pull request #63270 from aaronfranke/fog-density
Change fog density range hint to be 0 to 1 with or_greater
2022-07-25 08:36:06 +02:00
Rémi Verschelde a5bc65bbad
Merge pull request #63265 from reduz/stream-bpm-support
Implement BPM support in AudioStream files.
2022-07-23 11:21:14 +02:00
reduz d1ddee2258 Implement BPM support
Based on #62896, only implements the BPM support part.

* Implements BPM support in the AudioStreamOGG/MP3 importers.
* Can select BPM/Bar Size and total beats in a song file, as well as edit looping points.
* Looping is now BPM aware
* Added a special importer UI for configuring this.
* Added a special preview showing the audio waveform as well as the playback position in the resource picker.
* Renamed `AudioStream::instance` to `instantiate` for correctness.
2022-07-23 07:31:17 +02:00
reduz f649678402 Clean up Shader Preprocessor
* Moved preprocessor to Shader and ShaderInclude
* Clean up RenderingServer side
* Preprocessor is separate from parser now, but it emits tokens with include location hints.
* Improved ShaderEditor validation code
* Added include file code completion
* Added notification for all files affected by a broken include.
2022-07-22 22:53:03 +02:00
Yuri Roubinsky 7b94603baa Adding shader preprocessor support
Co-authored-by: TheOrangeDay <6472143+TheOrangeDay@users.noreply.github.com>
2022-07-22 22:51:57 +02:00
Rémi Verschelde 653f95282c
Merge pull request #62996 from reduz/feature-build-profiles 2022-07-22 12:50:20 +02:00
reduz 6236a688b7 Implement Feature Build Profiles
This PR is a continuation of #50381 (which was implemented exactly a year ago!)

* Add a visual interface to select which classes should not be built into Godot (well, they are built if something else uses them, but if not used the optimizer will remove them out).
* Add a detection system to scan the project and figure out the actual classes used.
* Added the ability for SCons to load build profiles.

Obligatory Screen:

A simple test with a couple of nodes in the scene resulted in a 25% reduction for the final binary size

TODO:

* Script languages need to implement used class detection (left for another PR).
* Options to disable servers or server functionalities (like 2D or 3D physics, navigation, etc). Are missing, that should also greatly aid in reducing binary size.
* Options to disable some modules would be desired.
* More options to disable drivers (OpenGL, Vulkan, etc) would be desired.

In general this PR is a starting point for more contributors to improve and enhance this functionality.
2022-07-22 10:53:23 +02:00
luz paz 38aaaa3cf9 Fix various typos not caught by codespell
Revert upstream `core/input/gamecontrollerdb.txt`. Upstream fix: https://github.com/gabomdq/SDL_GameControllerDB/pull/600
2022-07-21 07:38:23 -04:00
Aaron Franke 83c1060187
Change fog density range hint to be 0 to 1 with or_greater 2022-07-21 01:26:42 -05:00
Rémi Verschelde 0f6028378f
Merge pull request #63127 from KoBeWi/raise_from_picture 2022-07-20 22:34:05 +02:00
SaracenOne 86aa2a8578 Add drag-and-drop support for materials in 3D
Add mesh surface picking for material drag & drop, show drag info label
2022-07-19 12:49:09 -07:00
Rémi Verschelde 715f556cd4
Merge pull request #62139 from bruvzg/label_font_setttings
Add LabelSettings resource for quick Label theme property override.
2022-07-19 20:16:01 +02:00
FireForge 84431bd782 Use integer types in Image and ImageTexture methods
- Image.blit_rect()
- Image.blit_rect_mask()
- Image.blend_rect()
- Image.blend_rect_mask()
- Image.fill_rect()
- Image.get_used_rect()
- Image.get_rect()
- ImageTexture.set_size_override()
2022-07-18 19:43:32 -05:00
kobewi e8288ac9ab Clarify create_from_image() usage 2022-07-18 13:01:04 +02:00
Rémi Verschelde 1c6148aa86
Merge pull request #63062 from Chaosus/vs_fix 2022-07-18 12:05:36 +02:00
Rémi Verschelde 3953c1aa73
Merge pull request #63094 from Geometror/fix-gradient-cubic-interpolation 2022-07-17 11:22:43 +02:00
Hendrik Brucker 655e2935cf Automatically create a Gradient resource when creating a GradientTexture1D 2022-07-17 04:04:57 +02:00
Hendrik Brucker 039045d569 Fix cubic interpolation for Gradient 2022-07-17 03:46:27 +02:00
Yuri Rubinsky f05fce405e Fix visual shader graph not correctly updating when multiple tabs opened 2022-07-16 16:43:06 +03:00
Silc Renew f3af3aedfe add rest fixer to importer retarget 2022-07-16 19:53:11 +09:00
Fabian Keller 2bf9e6090c rename translate(d) to translate(d)_local in Transform 2D/3D 2022-07-16 11:47:54 +02:00
bruvzg cbe3a2dcb7
Use BitField hint for the TextServer enums. Add missing parts for BitField support to the GDextension API. 2022-07-15 08:49:50 +03:00
Rémi Verschelde 184f62cb46
Merge pull request #60458 from KoBeWi/Deprecated-hint,-unused- 2022-07-14 00:20:30 +02:00
Rémi Verschelde 4639050c64 SpriteFrames: Sort animations alphabetically
And finally remove the 'frames' property which was added for compatibility with 2.1
in bed3efb17e.
Fixes #21765.

The 'animations' property on the other hand is needed, contrarily to what its comment
said (copy-paste mistake probably).

Also removes unused '_get_animation_list'.
2022-07-13 16:15:11 +02:00
bruvzg f63d54126d
Add LabelSettings resource for quick Label theme property override. 2022-07-12 16:05:12 +03:00
kobewi 2f777b9a1e Remove unused hints 2022-07-12 00:44:13 +02:00
kobewi d2900429e8 Add static methods for creating Image and ImageTexture 2022-07-08 13:40:47 +02:00
Rémi Verschelde 13346ab4cc
Merge pull request #62632 from linkpy/62630_fix
Make sure the tile data clears its `terrain` field when said terrain is removed from the tileset.
2022-07-08 11:30:28 +02:00
Rémi Verschelde 5268efdcd9
Merge pull request #62806 from dylan-conway/layered-texture-update-fix-and-error-messages 2022-07-08 00:16:15 +02:00
Dylan Conway 78ca147c8a Changed valid check to null check, added error messages 2022-07-07 11:11:47 -07:00
Rémi Verschelde 1e553e34fb
Merge pull request #62108 from bruvzg/font_config_v3 2022-07-07 12:22:49 +02:00
bruvzg 0c5431644d
Allows parsing of invalid UTF-16 surrogates (can be encountered in Windows filenames) and some non-standard UTF-8 variants, makes Unicode parse errors more verbose. 2022-07-07 11:07:18 +03:00
lawnjelly 1f69666209 Remove Octree
Octree is no longer used in 4.x.
2022-07-06 14:10:05 +01:00
bruvzg 344ba0ffaf
Refactor Font configuration and import UI, and Font resources. 2022-07-06 14:12:36 +03:00
Rémi Verschelde 1d06fec535
Merge pull request #62448 from MinusKube/completion-scroll-click
Add the ability to drag the code completion scrollbar using the mouse click
2022-07-04 10:13:20 +02:00
bruvzg 329923c6ac
Use custom key structs, instead of raw hashes for the Label3D and TextMesh, to avoid potential hash collisions. 2022-07-04 09:47:49 +03:00
MinusKube 336400dc42 Add the ability to drag the code completion scrollbar using the mouse click 2022-07-03 23:47:52 +02:00
Estelle Linkpy Reid 3a37053aac Make sure the tile data clears its `terrain` field when said terrain is removed from the tileset. 2022-07-02 15:01:07 +02:00
Silc Renew dc43cfc830 implement bone renamer in importer 2022-07-01 03:55:28 +09:00
Hendrik Brucker 99ce0df3b1 Refactor bezier interpolation functions 2022-06-27 19:42:43 +02:00
Rémi Verschelde fbc3777467
Merge pull request #62185 from reduz/export-node-pointer-path
Add ability to export Node pointers as NodePaths
2022-06-27 11:14:36 +02:00
reduz b7c41f9ba1 Add ability to export Node pointers as NodePaths
This PR implements:
* A new hint: PROPERTY_HINT_NODE_TYPE for variant type OBJECT, which can take specific node types as hint string.
* The editor will show it as a node path, but will set it as a pointer to a node from the current scene if you select a path.
* When scene is saved, the node path is saved, then restored as a pointer.

NOTE: This is a proof of concept and this approach will most likely not work. The reason if that, if the node referenced is deleted, then when trying to edit this the node will become invalid.

Potential workarounds: Since this uses the Variant API, it should obtain the pointer from the Variant object ID. Yet, this would either only really work in GDScript or it would need to be implemented with workarounds in every language.
Alternative ways to make this work: Nodes could export an additional property with a node path (like for which_node, it could be which_node_path).
Another alternative: Path editing could happen as a hidden metadata (ignoring the pointer).
2022-06-25 15:50:15 +02:00
Rémi Verschelde dd743b3c78
Merge pull request #62314 from tefusion/capsulemesh-radius-height-setters
Fix CapsuleMesh height/radius setters
2022-06-25 14:16:29 +02:00
Rémi Verschelde b192073001
Merge pull request #62309 from reduz/remake-resource-thread-safety
Remake ResourceCache thread safety code and API
2022-06-25 14:09:28 +02:00
Raul Santos adb81446a6
Fix Curve{2D,3D} notifying property list changed
Make `Curve2D` and `Curve3D` more consistent with `Curve` and avoid
calling `notify_property_list_changed` when the list of points doesn't
change.
2022-06-23 20:07:26 +02:00
Rémi Verschelde ef5bc1baad
Merge pull request #62348 from smix8/navigation_baking_aabb_4.x 2022-06-23 16:10:40 +02:00
Rémi Verschelde 383f111869
Merge pull request #61628 from Vitika9/61617 2022-06-23 15:36:00 +02:00
Rémi Verschelde 2baddcc4f6
Merge pull request #61931 from KoBeWi/how_to_window
Document most of the Window's members
2022-06-23 15:20:53 +02:00
smix8 0c4d99f4fd Implement NavigationMesh bake area
Adds two new properties to NavigationMesh resources to restrict the navmesh baking to an area enclosed by an AABB with volume.
2022-06-23 14:55:21 +02:00
JFonS cac4e39ad2
Merge pull request #62268 from V-Sekai/lightmap-errors 2022-06-23 12:33:52 +02:00
K. S. Ernest (iFire) Lee cc7a0f3b58 Mend crash importing a scene with static lightmaps. 2022-06-23 01:33:15 -07:00
reduz 3d1ab570b9 Add surface indices to TriangleMesh
Helps unblock #56597
2022-06-22 21:48:23 +02:00
kobewi 0f630f8307 Document most of the Window's members 2022-06-22 20:46:27 +02:00
Vitika9 6042b24745 Fixed dragging curve points 2022-06-22 22:17:49 +05:30
tefusion ad7b3549a5 Fix CapsuleMesh loading issue (radius reset) 2022-06-22 17:34:49 +02:00
Rémi Verschelde 3ccff61979
Merge pull request #58544 from Calinou/tileset-source-allow-canvasitemmaterial 2022-06-22 17:02:34 +02:00
Rémi Verschelde 5fc2864b05
Merge pull request #56185 from nikitalita/fix-save-as-binary
Fix ResourceLoaderText::save_as_binary()
2022-06-22 14:37:43 +02:00
reduz e772b65d92 Remake resource thread safety and API
* Ensures thread safety when resources are destroyed.
* Simplified API by always forcing `ResourceCache::get_ref`, which needs less hacks and is fully thread safe.
* Removed RWLock for resources because its not possible to use for the new logic. Should not be a problem.

Supersedes #57533
2022-06-22 13:46:46 +02:00
Hugo Locurcio b3fe2732e3
Allow using CanvasItemMaterial in the TileSet editor
Previously, only ShaderMaterial overrides could be added.
2022-06-21 17:02:52 +02:00
Rémi Verschelde fdfbaf9f0f
Merge pull request #62198 from Calinou/text-resource-remove-extraneous-spaces
Remove spaces in `SubResource()/ExtResource/Resource()` in text resources
2022-06-21 15:11:23 +02:00
reduz 141c375581 Clean up Hash Functions
Clean up and do fixes to hash functions and newly introduced murmur3 hashes in #61934
* Clean up usage of murmur3
* Fixed usages of binary murmur3 on floats (this is invalid)
* Changed DJB2 to use xor (which seems to be better)
2022-06-20 12:54:19 +02:00
Hugo Locurcio 514624c58e
Remove spaces in `SubResource()/ExtResource/Resource()` in text resources
These spaces are not needed for the file to be successfully parsed.

Other types such as Vector3 are no longer serialized with spaces
after the opening parenthesis and before the closing parenthesis,
so this is also more consistent.
2022-06-19 05:54:03 +02:00
mightygoat 59029f1a3f Declaring emission_tex_ofs globally 2022-06-19 01:20:57 +05:30
Fabio Alessandrelli 32b16c876b [Net] Fix SceneReplicationConfig setter.
Used by resource loader, it would always add properties as both sync and
spawn, disregarding the actual option value.
2022-06-17 13:49:36 +02:00
Rémi Verschelde 1767507e69
Merge pull request #61888 from Chaosus/vs_remove_engine_version
Remove engine version from visual shader
2022-06-16 18:19:03 +02:00
bruvzg b5c96df277
Move duplicate AutoWrap, Overrun and VisibleChar behavior enums to the TextServer. 2022-06-16 16:49:37 +03:00
Rémi Verschelde 421d8b716d
Merge pull request #61952 from V-Sekai/custom-docs
`SurfaceTool.set_custom_format` Fixes and documentation.
2022-06-15 21:20:58 +02:00
Lyuma 03b896c992 `SurfaceTool.set_custom_format` Fixes and documentation.
Fix mistake making `set_custom_format` impossible to use.
Automatically forward custom flags in `SurfaceTool.commit`.
Add documentation in `SurfaceTool` and `Mesh` for custom channels.
Deprecate `SurfaceTool.generate_lod` and expose `ImporterMesh.generate_lods`.
2022-06-14 15:10:17 -07:00
Rémi Verschelde 7c0f1b4cd7
Merge pull request #62042 from Calinou/basematerial3d-nearest-height-always-linear
Always sample the heightmap with linear filtering in BaseMaterial3D
2022-06-14 21:39:03 +02:00
Hugo Locurcio 26f6625dcc
Always sample the heightmap with linear filtering in BaseMaterial3D
Nearest-neighbor filtering of the heightmap results in a broken
appearance, with and without Deep Parallax enabled on the material.

Linear filtering results in a more expected appearance. This does
not affect other texture maps such as albedo, normal or roughness.
2022-06-14 18:56:18 +02:00
FireForge 92817aa72f Add Vector2/3 linking to more properties
- Camera2D.zoom
- CanvasLayer.scale
- ParallaxBackground.scroll_base_scale
- ParallaxLayer.motion_scale
- Polygon2D.texture_scale
- BaseMaterial3D.uv1_scale
- BaseMaterial3D.uv2_scale
2022-06-14 09:33:44 -05:00
Rémi Verschelde 41986532c1
Merge pull request #61974 from Calinou/project-settings-mark-as-basic 2022-06-13 17:16:03 +02:00
Rémi Verschelde d4f31e201d
Merge pull request #61809 from groud/terrain_center_bit 2022-06-13 17:06:34 +02:00
Rémi Verschelde 136f84fc35
Merge pull request #61772 from bruvzg/ft_ot_collect 2022-06-13 11:13:05 +02:00
Rémi Verschelde 803d25a20a
Merge pull request #61961 from jtnicholl/anim_lib_type_hints
Fix type hints for AnimationLibrary's signals' arguments
2022-06-12 22:26:53 +02:00
Hugo Locurcio c178cfef8e
Mark some common project settings as basic 2022-06-12 19:50:14 +02:00
Jonathan Nicholl 3d8e400fb5 Fix type hints for AnimationLibrary's signals 2022-06-12 13:20:51 -04:00
FireForge 4678736a39 Add suffixes to all nodes and resources 2022-06-11 09:41:05 -05:00
Yuri Rubinsky f4b4294c5f Revert vector4 output ports in visual shaders 2022-06-11 10:36:11 +03:00
Gilles Roudière 62d2549e9e Add terrain center bit 2022-06-10 14:37:39 +02:00
Yuri Rubinsky d6622330d7 Remove engine version from visual shader 2022-06-10 13:17:16 +03:00
Hugo Locurcio dbe513931f
Add a property hint to Environment's `sky_rotation` property
This property hint is identical to Node3D's `sky_rotation` property
and provides degree-based editing.
2022-06-09 22:54:15 +02:00
Rémi Verschelde c91d33e9ca
Merge pull request #61813 from smix8/navigationmesh_properties_naming_4.x 2022-06-09 09:48:01 +02:00
smix8 2c059dcfcb Remove slash delimiter from NavigationMesh properties
Remove slash delimiter from NavigationMesh properties.
2022-06-09 09:20:52 +02:00
Rémi Verschelde b13c41c33f
Merge pull request #61830 from XutaxKamay/fix-image-texture
Fix for regression of an ImageTexture being imported
2022-06-09 08:47:36 +02:00
Kamay Xutax d8f1ee66d7 Fix for ImageTexture imported
Someone apparently forgot to return true ...
on ImageTexture::_set/_get
2022-06-09 00:08:07 +02:00
Rémi Verschelde 07029e94f4
Merge pull request #61662 from smix8/navigation_map_cell_defaults_4.x 2022-06-08 15:56:22 +02:00
kobewi 80025171cd Re-add internal image field to ImageTexture 2022-06-08 00:57:03 +02:00
Rémi Verschelde 60eec78a1f
Merge pull request #61558 from kleonc/triangle_mesh_from_triangle_strip
Make `Mesh::generate_triangle_mesh()` handle `PRIMITIVE_TRIANGLE_STRIP`
2022-06-07 22:07:16 +02:00
Rémi Verschelde 96f41d6ada
Merge pull request #61284 from KoBeWi/steal_image()
Remove image property of ImageTexture
2022-06-07 20:53:09 +02:00
Clay John 12edb2ce58
Merge pull request #55909 from Calinou/volumetric-fog-tweak-temporal-reprojection-range-hint
Tweak the volumetric fog temporal reprojection property hint
2022-06-07 08:56:05 -07:00
kobewi c519a667ad Remove image property of ImageTexture 2022-06-07 16:30:54 +02:00
bruvzg 6e4cdad3ac
[TextServer] Adds support for TrueType / OpenType collection files (*.TTC, *.OTC). 2022-06-07 11:35:59 +03:00
Aaron Record 14df02b21f Fix typo "Frac" instead of "Fract" 2022-06-05 19:20:32 -06:00
kobewi 855a1ff61f Increase maximum size of gradient textures 2022-06-05 18:20:26 +02:00
smix8 3066091780 Match NavMap and ProjectSettings with NavigationMesh defaults
Match NavMap and ProjectSettings with NavigationMesh defaults since the NavMap edge merging requires a matching cell_size with the NavigationMesh to create connections without issues.
2022-06-03 19:17:49 +02:00