Commit graph

3216 commits

Author SHA1 Message Date
Haoyu Qiu
385a5b44aa Improve documentation for get_animation() 2022-08-29 14:54:57 +08:00
Silc Renew
77cf519cf0 Fixed AnimationTrackEditor redraw/deselect timing and find key compearation 2022-08-29 10:44:00 +09:00
Rémi Verschelde
011dbda2ea
Merge pull request #64999 from Chaosus/fix_packed_scene_crash 2022-08-28 21:21:53 +02:00
Yuri Rubinsky
a33903d23f Prevent crash at loading some scenes 2022-08-28 21:56:04 +03:00
Pedro J. Estébanez
2b73bf1ed1 Make local-to-scene resources behavior consistent in child scenes 2022-08-28 20:17:16 +02:00
Rémi Verschelde
c9972e3981
Merge pull request #64526 from Rindbee/improve-packed-scene-instantiate
Improve PackedScene instantiate
2022-08-28 17:12:26 +02:00
Rindbee
d6c0959cb1 Improve PackedScene instantiate
Make `resource_local_to_scene` behave as described in the documentation. (If I understand correctly, the following **instance** refers to **the instance of the sub-scene**.)
2e24b76535/doc/classes/Resource.xml (L70-L72)

If the resources of the sub-scene are modified in the main scene, the modified resources will be recorded in the `tscn` file of the main scene. And the root node of the sub-scene will be set twice.
1. In the main scene, when encountering a sub-scene, the sub-scene will be initialized first;
2. Then use the resources in the main scene to reset the root node of the sub-scene.

This may make `resource_local_to_scene` not work as expected. The resources cannot be shared between the sub-scene root node and other ordinary nodes in the sub-scene.

Yes, if the resources have `resource_local_to_scene` enabled, this patch treats the modified resources of the sub-scene root node as resources in the sub-scene, not in the main scene. Although the modifications are recorded in the `tscn` file of the main scene.
2022-08-28 20:39:09 +08:00
Patrick Exner
55bbcc54e7 Implement custom non-trivial shader functions 2022-08-27 22:59:12 +02:00
Silc Renew
787ab45394 Add optimization for Animation::ValueTrack 2022-08-27 22:59:33 +09:00
Josh Jones
3dd59013f4 Added node for Navigation links 2022-08-26 22:05:15 -07:00
Silc Renew
931fb4dc11 Add linear/cubic angle interpolation to Animation interpolation type 2022-08-27 07:58:22 +09:00
Rémi Verschelde
f9f2446972
Merge pull request #64367 from Mickeon/rename-var-to-str
Rename `str2var` to `str_to_var` and similar
2022-08-26 23:04:06 +02:00
Yuri Sizov
6320a0fc18 Add ThemeDB, expose previously static Theme methods 2022-08-26 19:23:05 +03:00
Micky
59e11934d8 Rename str2var to str_to_var and similar
Affects the Math class, a good chunk of the audio code, and a lot of other miscellaneous classes, too.

- `var2str` -> `var_to_str`
- `str2var` -> `str_to_var`
- `bytes2var` -> `bytes_to_var`
- `bytes2var_with_objects` -> `bytes_to_var_with_objects`
- `var2bytes` -> `var_to_bytes`
- `var2bytes_with_objects` -> `var_to_bytes_with_objects`
- `linear2db` -> `linear_to_db`
- `db2linear` -> `db_to_linear`
- `deg2rad` -> `deg_to_rad`
- `rad2deg` -> `rad_to_deg`

- `dict2inst` -> `dict_to_inst`
- `inst2dict` -> `inst_to_dict`
2022-08-26 14:58:22 +02:00
Rémi Verschelde
7013c68619
Merge pull request #64422 from bruvzg/make_fonts_unbearably_ugly_2.0 2022-08-26 11:59:07 +02:00
Rémi Verschelde
354123a207
Merge pull request #64243 from bruvzg/multiline_textmesh 2022-08-26 11:45:25 +02:00
Rémi Verschelde
d6267c2d2c
Merge pull request #64305 from bruvzg/ts_reset_data 2022-08-26 11:44:24 +02:00
Rémi Verschelde
5bf2b3926c
Merge pull request #64879 from TokageItLab/cubic-to-cubicintime
Replace `Cubic` to `CubicInTime` in the animation track interpolation type
2022-08-26 09:45:24 +02:00
Micky
723bf85145 Rename ParticlesMaterial to ParticleProcessMaterial
Also affects their file names, related classes and documentation.
2022-08-26 02:53:08 +02:00
Silc Renew
d96cc7450a Make Cubic to CubicInTime and reduce items in the track intrp type 2022-08-26 06:49:09 +09:00
Rémi Verschelde
33bf609d79
Merge pull request #64820 from Chaosus/shader_fix_varyings 2022-08-25 18:02:38 +02:00
Yuri Rubinsky
d4a10e7e04 Allow using integer varyings with flat interpolation modifier 2022-08-25 13:21:02 +03:00
Rémi Verschelde
a0113a98e4
Merge pull request #64801 from clayjohn/plane-quad
Remove QuadMesh and add orientation parameter to PlaneMesh
2022-08-25 07:38:30 +02:00
clayjohn
861c5bff0e Remove QuadMesh and add orientation parameter to PlaneMesh 2022-08-24 18:51:18 -07:00
Rémi Verschelde
ca5c3d6df9 Fix ParticlesMaterial build after #61238 2022-08-25 00:52:37 +02:00
Rémi Verschelde
56752e32a6
Merge pull request #61238 from Calinou/particlesmaterial-add-fade-on-contact-collision-mode
Add "Hide on Contact" collision mode to ParticlesMaterial
2022-08-25 00:01:47 +02:00
Yuri Sizov
c78cbb523f Extract editor color map and simplify SVG color conversion 2022-08-24 15:59:14 +03:00
Rémi Verschelde
91e5f48ea7
Merge pull request #64009 from KoBeWi/arrayy_lmao
Replace Array return types with TypedArray (part 2)
2022-08-24 08:18:56 +02:00
kobewi
1abdffe7a0 Replace Array return types with TypedArray 2 2022-08-23 23:21:32 +02:00
Rémi Verschelde
6277448f42
Merge pull request #64647 from TokageItLab/auto-tangent 2022-08-23 18:17:15 +02:00
Rémi Verschelde
5c5bc21195
Merge pull request #63854 from TokageItLab/auto-bone-mapping 2022-08-23 18:16:15 +02:00
Rémi Verschelde
481070812e
Merge pull request #64640 from aaronfranke/skeleton-cleanup 2022-08-23 13:44:54 +02:00
Silc Renew
9327296e73 Add bezier preset and refactor bezier editor
Co-authored-by: Razoric480 <razoric480@gmail.com>
2022-08-23 19:14:03 +09:00
Silc Renew
c7e4eeb8a4 Add simple auto mapping to BoneMapper
Co-authored-by: K. S. Ernest (iFire) Lee <ernest.lee@chibifire.com>
2022-08-23 16:43:33 +09:00
bruvzg
bcc3643989
Add font LCD sub-pixel anti-aliasing support. 2022-08-23 08:47:21 +03:00
kobewi
8be27dc59e Replace Array return types with TypedArray 2022-08-22 22:42:36 +02:00
Rémi Verschelde
cb62c91c12
Merge pull request #58600 from Calinou/material-triplanar-sharpness-clamp 2022-08-22 22:21:33 +02:00
Rémi Verschelde
1f61d47766
Merge pull request #64339 from YuriSizov/core-multilevel-validate-property 2022-08-22 21:39:48 +02:00
Rémi Verschelde
5bc8702855
Merge pull request #64132 from TokageItLab/fix-optimizer 2022-08-22 20:39:06 +02:00
Rémi Verschelde
7b4927bb5f
Merge pull request #60309 from The-O-King/oct 2022-08-22 19:29:21 +02:00
Rémi Verschelde
43ff5dd890
Merge pull request #64642 from aaronfranke/mesh-cleanup 2022-08-22 17:36:33 +02:00
Yuri Sizov
1a24c9e14b Make _validate_property a multilevel method 2022-08-22 18:35:11 +03:00
Rémi Verschelde
944bfc6d00
Merge pull request #63602 from TokageItLab/cubic-interp-time 2022-08-22 17:32:47 +02:00
Rémi Verschelde
fdc36ad082
Merge pull request #64553 from RedMser/fix-property-validation-refactor 2022-08-22 16:54:47 +02:00
Aaron Franke
8893b2bdb4
Clean up mesh include code and comments 2022-08-20 13:24:40 -05:00
Aaron Franke
7be49cb5e0
Clean up include guards in 3D skeleton modification code 2022-08-19 19:18:47 -05:00
clayjohn
bbbcdd725a Remove requirement to have vertex positions when creating a mesh. Meshes can now be constructed from an index buffer alone 2022-08-19 14:50:12 -06:00
Hugo Locurcio
17ad6df56d
Add "Hide on Contact" collision mode to ParticlesMaterial
This can be used to make particles disappear when colliding, rather
than bouncing around or sticking to surfaces.

This is useful for rain particles which should not be able to go
through floors/ceilings, but shouldn't stick to surfaces either.
2022-08-19 22:32:19 +02:00
Yuri Sizov
96ba6e8cf9
Merge pull request #64595 from mhilbrunner/ergo-proxy
Unexpose ProxyTexture
2022-08-19 20:42:27 +03:00
Yuri Sizov
7895a66cf2
Merge pull request #64334 from YuriSizov/core-bind-property-revert-methods
Make `property_*_revert` methods multilevel and expose them for scripting
2022-08-19 20:41:41 +03:00
Silc Renew
dded7c72c1 Make cubic_interpolate() consider key time in animation 2022-08-19 14:48:37 +09:00
Max Hilbrunner
92bdeb7eb5 Unexpose ProxyTexture 2022-08-19 03:01:47 +02:00
Max Hilbrunner
420a8c888e
Merge pull request #63950 from bruvzg/menu_bar3
Implement MenuBar control to wrap Popup menus or native menu, use native menu for editor.
2022-08-19 01:24:24 +02:00
Clay John
17ca5b913c
Merge pull request #64156 from bruvzg/sys_msdf
Allow MSDF rendering for system fonts, fix crash on loading damaged / unsupported font files.
2022-08-18 14:58:57 -06:00
Clay John
547e64d226
Merge pull request #63999 from QbieShay/qbie/vs-qol
Quality of life visual shaders updates
2022-08-18 14:47:23 -06:00
bruvzg
8c56a7416b
Implement MenuBar control to wrap PopupMenus or native menu, use native menu for editor. 2022-08-18 22:25:44 +03:00
RedMser
c25b8f2876 Remove unintentional PROPERTY_USAGE_INTERNAL
The flag only matters for property definition,
but was also used in _validate_property a lot.
2022-08-18 16:25:00 +02:00
RedMser
83f2723893 Fix some property validation not been refactored 2022-08-18 16:24:15 +02:00
Yuri Sizov
980f5f32f4 Make property_*_revert methods multilevel and expose them for scripting 2022-08-18 00:03:53 +03:00
VolTer
2599710793 Rename NOTIFICATION_INSTANCED to NOTIFICATION_SCENE_INSTANTIATED 2022-08-16 12:41:10 +02:00
danboo
14ddeb8e44 break out of font search loop after first match
The documentation for the font_names property indicates:

   Array of font family names to search, first matching font found is used.
2022-08-15 20:58:48 -08:00
Yuri Sizov
fff0e7b8e2 Clarify the Line2D, Curve2D/3D documentation and fix parameter names 2022-08-15 21:38:14 +03:00
Yuri Rubinsky
22df2c527b Implement coloring for disabled branches in the shader editor 2022-08-14 13:57:26 +03:00
Omar El Sheikh
78881b3cc3 Octahedral Normal/Tangent Compression
Implementation of Octahedral normal compression into Godot 4.0
2022-08-13 08:09:32 -07:00
QbieShay
ecbeb8de1b Improve visual shader defaults for quality of life
- multiply part of addmultiply defaults to 1
- curvetexture's repeat is turned off
- vectors into float takes first component instead of average
2022-08-12 19:39:56 +02:00
bruvzg
c6e1432cc0
[Font] Set TextServer font data pointer when it's null, to prevent TS from reading old, non-existing data. 2022-08-12 11:35:13 +03:00
kobewi
e06cd2742f Add missing properties to default theme 2022-08-11 14:15:04 +02:00
bruvzg
8384815365
Add line breaking support to the TextMesh. 2022-08-10 23:53:48 +03:00
bruvzg
bf1cc6326a
Allow MSDF rendering for system fonts, fix crash on loading damaged / unsupported font files. 2022-08-09 14:21:09 +03:00
Silc Renew
f70dfec535 improve animation track optimizer algorithm 2022-08-09 09:18:45 +09:00
Yuri Sizov
1362bc22bd Add tests for empty/unnamed arguments to ClassDB, Variant, GDScript 2022-08-08 16:36:01 +03:00
Nathan Franke
3d7d4ccada
capitalize shader uniform groups 2022-08-08 02:21:04 -05:00
Rémi Verschelde
f754dd20be
Merge pull request #62454 from Geometror/reflect-refract-vec2-vec4
Allow for vec2/vec4 to be used in reflect and refract
2022-08-07 19:16:05 +02:00
Hendrik Brucker
b8d5f4bdd5 Allow vec2 and vec4 for reflect and refract 2022-08-07 18:03:16 +02:00
Rémi Verschelde
21f6916ffc
Merge pull request #60843 from hoontee/CSG3
Add `TorusMesh`
2022-08-06 21:01:51 +02:00
Hugo Locurcio
e919e51a6b
Use interleaved gradient noise for distance fade
This provides better visuals and performance compared to the previous
ordered dither.
2022-08-05 11:35:34 +02:00
Rémi Verschelde
25915cdd0e
Merge pull request #59844 from Calinou/rename-shader-param-methods 2022-08-05 02:52:06 +02:00
Hugo Locurcio
db22b7ded0
Rename shader parameter uniform setter/getter methods for consistency
`shader_uniform` is now consistenly used across both per-shader
and per-instance shader uniform methods. This makes methods easier
to find in the class reference when looking for them.
2022-08-04 23:17:06 +02:00
Rémi Verschelde
f6431db9a5
Merge pull request #63852 from fire-forge/default-colors 2022-08-04 22:03:10 +02:00
hoontee
21b9b117be Add TorusMesh 2022-08-04 13:45:54 -05:00
Rémi Verschelde
40eafcfab4
Merge pull request #49947 from Calinou/standardmaterial3d-tweak-default-height-properties 2022-08-04 11:31:32 +02:00
Hugo Locurcio
c6cca43419
Tweak StandardMaterial3D's default height properties
- Set the default height scale to 5.0 and multiply it by 0.01 in the shader.
- Document heightmap properties in BaseMaterial3D class reference.
2022-08-04 09:57:55 +02:00
Hugo Locurcio
1f6e081db7
Don't store the values of linked SDFGI properties in Environment 2022-08-04 02:24:28 +02:00
FireForge
de3a62e5ec Add space to ParticlesMaterial "Particle Flags" group name
- "ParticleFlags" -> "Particle Flags"
2022-08-02 17:51:24 -05:00
FireForge
fe2f62f128 Adjust 2 default theme colors in ItemList and Tree
- Change Tree's drop_position_color from orange to white.
- Change ItemList's guide_color to the same color as Tree's, which fits in with a dark theme better.
2022-08-02 17:48:11 -05:00
Rémi Verschelde
515552860b
Merge pull request #63597 from paddy-exe/spatial-shader-built-ins
Add often used built-ins (camera-pos, object-pos, camera-eye etc.) to spatial shaders
2022-08-02 19:20:19 +02:00
Patrick Exner
fe5901310e Add spatial built-ins (camera-pos, object-pos, camera-eye etc.) 2022-08-02 17:30:41 +02:00
FireForge
9db973a473 Rename ParticlesMaterial.turbulence_active to turbulence_enabled 2022-08-02 08:41:14 -05:00
Raffaele Picca
fe2cc6150e Added default values to particle turbulence. 2022-08-02 10:16:09 +02:00
Rémi Verschelde
8cce479c01
Merge pull request #51672 from Calinou/shader-add-hint-transparent-texture
Add `hint_transparent` to use a transparent black placeholder texture
2022-08-02 07:15:59 +02:00
Hugo Locurcio
813f6a5d57
Add hint_transparent to use a transparent black placeholder texture
This can be used in shaders to avoid the need to supply a transparent
placeholder texture manually.
2022-08-01 23:38:06 +02:00
Hugo Locurcio
6059a9b624
Improve easing inspector usability
- Add `positive_only` property hint to disallow using negative presets.
  These values are clamped in several places in the editor already,
  so this avoids displaying presets that don't work.
- Move the Zero preset at the end of the positive list to match
  the custom property editor. It's also used less often than Linear,
  Ease In and Ease Out.
- Rename presets to be consistent between the easing property editor
  and custom property editor.
- Remove unused `inout` hint which was redundant since it was already
  the default.
2022-08-01 18:40:04 +02:00
bruvzg
ac801494a3
Change LabelSettings default values to match default theme. 2022-08-01 13:33:06 +03:00
Rémi Verschelde
beb8fd5e8b
Merge pull request #55387 from RPicster/particles-turbulence 2022-08-01 09:38:54 +02:00
Rémi Verschelde
de53e91b85
Merge pull request #55276 from Calinou/volumetric-fog-tweak-default-gi-inject
Tweak default fog settings for better appearance
2022-08-01 07:55:53 +02:00
Hugo Locurcio
e35e79b802
Tweak default fog settings for better appearance
- Increase the default non-volumetric fog density to 0.01 to make
  adjustments more visible.
- Use a less saturated non-volumetric fog color by default
  (a mix of the sky and horizon colors of the new default
  ProceduralSkyMaterial).
- Set Volumetric Fog Gi Inject to 1.0 by default. Injecting GI results
  in more realistic appearance of volumetric fog, at a very low
  performance cost.
2022-08-01 02:04:20 +02:00
Hugo Locurcio
fa019f6e14
Change default material alpha scissor threshold to 0.5
This makes the default behavior consistent between SpriteBase3D,
BaseMaterial3D and imported glTF scene materials.

Alpha scissor threshold property hints now allows for more precise
adjustments as well.
2022-08-01 02:00:16 +02:00
golfinq
b341339415 Add padding options in theme for fg/bgcolor tags 2022-07-31 12:24:07 -04:00
Zae
2febf0ccdb Make Animation::track_insert_key return key index 2022-07-31 17:38:49 +02:00
Hugo Locurcio
1dfd94c63f
Hide triplanar subproperties when triplanar is disabled in BaseMaterial3D
This also renames some sections for consistency.
2022-07-30 21:41:26 +02:00
Rémi Verschelde
15a02c49be
Merge pull request #61647 from KoBeWi/SaverResource 2022-07-29 22:30:51 +02:00
kobewi
c3606cb5f3 Swap arguments of ResourceSaver.save() 2022-07-29 19:53:09 +02:00
Rémi Verschelde
6ba7dacf6b
Merge pull request #63415 from ajreckof/expose_tilemap_custom_data_methods
Expose TileMap methods related to the name of custom data layers
2022-07-29 19:43:55 +02:00
Rémi Verschelde
7199314eb3
Merge pull request #63595 from reduz/remove-signal-connect-binds
Remove Signal connect binds
2022-07-29 18:10:39 +02:00
Juan Linietsky
d4433ae6d3 Remove Signal connect binds
Remove the optional argument p_binds from `Object::connect` since it was deprecated by Callable.bind().
Changed all uses of it to Callable.bind()
2022-07-29 16:26:13 +02:00
ajreckof
8433ad5353 expose TileMap methods related to the name of custom data layers 2022-07-29 15:05:42 +02:00
Rémi Verschelde
8b454f8b41
Merge pull request #62601 from smix8/navigation_3d_debug_4.x 2022-07-29 12:29:32 +02:00
smix8
c394ea518e Add more detailed Navigation Debug Visualization
- Adds more customization options to ProjectSettings.
- Displays navregion edge connections and navigation polygon edges in editor and at runtime.
- Majority of debug code moved from SceneTree to NavigationServer.
- Removes the irritating debug MeshInstance child node from NavigationRegion3D and replaces it with direct RenderingServer API.
2022-07-29 09:58:41 +02:00
Rémi Verschelde
14d021287b
Merge pull request #63049 from Faless/mp/4.x_as_module 2022-07-28 20:46:31 +02:00
Rémi Verschelde
8e0f328a80
Merge pull request #59840 from Calinou/renderingserver-global-uniform-rename 2022-07-28 20:34:17 +02:00
Rémi Verschelde
1c820f19b1
Merge pull request #60957 from DeeJayLSP/sample_pcm 2022-07-28 19:51:08 +02:00
DeeJayLSP
4889659227 Rename AudioStreamSample to a more discoverable name 2022-07-28 13:53:36 -03:00
Hugo Locurcio
4b42379c8f
Rename RenderingServer global shader uniform methods to be more explicit
The `global_shader_uniform` name is longer, but it makes it much
easier to find the methods when searching in the class reference.
2022-07-28 18:46:59 +02:00
Raffaele Picca
9137ba7926 Turbulence Noise for Particle Material 2022-07-28 11:04:40 +02:00
Rémi Verschelde
a5f12f9c21
Merge pull request #63532 from TokageItLab/rename-cubic-slerp 2022-07-28 10:39:33 +02:00
Rémi Verschelde
199ea349f5
Merge pull request #57698 from bluenote10/feature/rename_translated_to_translated_local 2022-07-28 10:03:07 +02:00
Rémi Verschelde
422725cffc
Merge pull request #56597 from V-Sekai/material_drag_and_drop
Add drag-and-drop support for materials in 3D Instances
2022-07-28 09:22:38 +02:00
Rémi Verschelde
ed61fb2a8b
Merge pull request #63138 from TokageItLab/normalize-position-track
Add position track normalization to importer retarget
2022-07-27 16:49:18 +02:00
Silc Renew
4211e68d80 rename and unify notation for spherical interpolation 2022-07-27 23:22:50 +09:00
Rémi Verschelde
cc5135959b
Merge pull request #62973 from bruvzg/sysfont_support 2022-07-27 13:38:30 +02:00
Yuri Rubinsky
2f43398182 Add a check to prevent duplicating connections in visual shader 2022-07-27 08:06:34 +03:00
RedMser
7b834c8bfd Fix unnamed arguments in XML docs 2022-07-26 20:42:38 +02:00
Rémi Verschelde
222e489dfd
Merge pull request #63496 from groud/fix_tile_set_not_saving
Fix TileSet not loading correctly when embedded in a scene
2022-07-26 18:27:05 +02:00
Gilles Roudière
8da2710911 Fix TileSet not loading correctly when embedded in a scene 2022-07-26 17:39:35 +02:00
Silc Renew
dde235ad82 add position track normalization & post process key value for retarget 2022-07-26 18:48:08 +09:00
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
Yuri Rubinsky
457e78a0bc Fix error emitting when opening some textures in the inspector 2022-07-21 09:48:15 +03: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