Commit graph

7607 commits

Author SHA1 Message Date
Aaron Franke 2a65f6812b
Add PROPERTY_USAGE_NEVER_DUPLICATE flag and use for script
Co-authored-by: Yakov Borevich <j.borevich@gmail.com>
2023-01-24 16:37:50 -06:00
Aaron Franke 2bc0bcbd26
PropertyUsage: Rename "DO_NOT_SHARE_ON_DUPLICATE" to "ALWAYS_DUPLICATE" 2023-01-24 16:05:07 -06:00
Aaron Franke 0e7785333f
Improve clarity of Tree's activated/double-clicked signals
Co-authored-by: Yuri Sizov <yuris@humnom.net>
2023-01-24 15:55:09 -06:00
Yuri Sizov fab9926a95
Merge pull request #65137 from dalexeev/editor-naming
Rearrange `editor/naming/*` project settings
2023-01-24 22:26:03 +03:00
Raul Santos 47ca2f2e09
C#: Sync GD with Core
- Add overloads to print methods that take a single `string`.
- Use `StringBuilder` to append print parameters.
- Remove `PrintStack` method.
- Add `ErrorString`.
- Remove `Str` method.
- Add exception to `Range` when step is 0.
- Add `VarToBytesWithObjects` and `BytesToVarWithObjects`.
- Remove optional boolean parameter from `VarToBytes` and `BytesToVar`.
- Move `InstanceFromId` to `Godot.Object`.
- Add `Godot.Object.IsInstanceIdValid`.
- Update documentation.
2023-01-24 19:18:38 +01:00
mara be733ea3d1 Expose RichTextLabel::push_customfx to GDScript 2023-01-24 18:16:24 +01:00
Markus Sauermann 1dce1cbe58 Fix documentation about depth and width of Height map 2023-01-24 17:56:49 +01:00
Yuri Sizov 9de0c73e45
Merge pull request #71757 from aXu-AP/animation_node_transition-improvements
Add missing property and method descriptions to AnimationNodeTransition class reference
2023-01-24 17:48:34 +03:00
aXu-AP ad10d1a726 Add missing property and method descriptions to AnimationNodeTransition class
Co-Authored-By: Yuri Sizov <11782833+YuriSizov@users.noreply.github.com>
Co-Authored-By: Rémi Verschelde <rverschelde@gmail.com>
2023-01-24 16:07:39 +02:00
Rémi Verschelde 4fa6edc888
Merge pull request #64930 from raulsntos/dotnet/docs
Update C# signal documentation and remove bind array
2023-01-24 09:55:02 +01:00
Rémi Verschelde ffb7c6e2fc
Merge pull request #71957 from aXu-AP/remotetransform2d-doc
Fix incorrect claim in RemoteTransform2D class reference
2023-01-24 09:35:46 +01:00
aXu-AP c1e1ce86a3 Fix incorrect claim in RemoteTransform2D class reference 2023-01-24 10:18:25 +02:00
Rémi Verschelde 514b348619
Merge pull request #71941 from aXu-AP/gpuparticles2d-doc
Add documentation for GpuParticles2D collisions
2023-01-24 09:15:01 +01:00
Rémi Verschelde d2e8bf7089
Merge pull request #71938 from aXu-AP/curve2d-doc
Add Curve2D/tessellate_even_length description class-reference
2023-01-24 09:14:33 +01:00
aXu-AP 201335f3ec Add documentation for GpuParticles2D collisions 2023-01-23 23:16:35 +02:00
Rémi Verschelde 1dfd236f15
Merge pull request #70377 from dsnopek/server-export-mk2
Add "dedicated server" export mode which can strip unneeded visual resources
2023-01-23 22:13:28 +01:00
aXu-AP f3e72b32ab Add Curve2D/tessellate_even_length description class-reference
Copied from Curve3D's corresponding method.
2023-01-23 22:29:15 +02:00
David Snopek 74458b6e9b Add "dedicated server" export mode which can strip unneeded visual resources 2023-01-23 13:24:54 -06:00
Jan Haller 15686ca786 Fix bind " convergence_dist" containing space 2023-01-23 20:07:59 +01:00
Hugo Locurcio abcf0aaed2
Document changing V-Sync at runtime in the class reference 2023-01-23 19:00:22 +01:00
Rémi Verschelde bebac4a088
Merge pull request #71830 from BastiaanOlij/xr_naming_consistancy
Rename getters and signals on XR nodes to be consistant with input types
2023-01-23 16:47:15 +01:00
Raul Santos 92e4b4e888
Update C# signal documentation and remove bind array
- Updates C# signal documentation and code examples to the new API in 4.0
- Replace all `nameof` usages with the exposed `StringName`
2023-01-23 16:45:37 +01:00
Rémi Verschelde 1f22c482e1
Merge pull request #70052 from bruvzg/key_unicode_actions
Cleanup and unify keyboard input.
2023-01-23 15:36:11 +01:00
Rémi Verschelde 11e2278844
Merge pull request #57606 from SaracenOne/update_on_reimport
Update instances of scenes which have been reimported.
2023-01-23 15:35:44 +01:00
Rémi Verschelde 0927e2cffc
Merge pull request #63251 from SaracenOne/disable_data_generation_on_foreign_resources
Disable navmesh, lightmap, and VoxelGI generation on foreign data
2023-01-23 15:35:31 +01:00
bruvzg daad4aed62
Cleanup and unify keyboard input.
- Unify keycode values (secondary label printed on a key), remove unused hardcoded Latin-1 codes.
- Unify IME behaviour, add inline composition string display on Windows and X11.
- Add key_label (localized label printed on a key) value to the key events, and allow mapping actions to the unshifted Unicode events.
- Add support for physical keyboard (Bluetooth or Sidecar) handling on iOS.
- Add support for media key handling on macOS.

Co-authored-by: Raul Santos <raulsntos@gmail.com>
2023-01-23 15:08:12 +02:00
Yuri Rubinsky 6713e0fa5b Add handling of script creation/deletion for custom visual shader nodes 2023-01-23 15:30:17 +03:00
Rémi Verschelde 5b1df48c6c
Convert en_GB spelling to en_US with codespell 2023-01-23 11:02:20 +01:00
Rémi Verschelde 35c37ce4ce
Merge pull request #67847 from rburing/warn_non-uniformists
Warn against using non-uniform scale for 3D physics (in the editor and class reference)
2023-01-23 10:32:06 +01:00
Rémi Verschelde 5726bf578d
Merge pull request #71676 from vnen/gdscript-unicode-identifiers
Add support for Unicode identifiers in GDScript and Expression
2023-01-23 10:24:33 +01:00
Bastiaan Olij 52d4a56b3b Rename getters and signals on XR nodes to be consistant with input types 2023-01-23 11:26:12 +11:00
Rémi Verschelde 5068d82374
Merge pull request #71686 from YuriSizov/stylebox-min-size-but-better
Clean-up, harmonize, and improve StyleBox API
2023-01-22 17:53:04 +01:00
Rémi Verschelde 78d45fc51c
Merge pull request #71855 from reduz/audio-stream-polyphonic
Add AudioStreamPolyphonic to simplify sound playback from code
2023-01-22 17:51:05 +01:00
Juan Linietsky f18d408c08 Add AudioStreamPolyphonic to make it easier to play polyphonic sound from code
* This new audio stream allows to play multiple sounds and control them over time from code.
* It greatly simplifies tasks such as generative music (music generated from code) or audio.

This new type of stream was added with the goal of fixing audio blending in AnimationPlayer and AnimationTree, but can be used by others for their regular audio needs.

Does not fix anything currently, but should help implement #69758 properly.

Some demo code of how to use this:

```GDScript

var player = $SomeNode as AudioStreamPlayer
player.stream = AudioStreamPolyphonic.new()
var playback = player.get_stream_playback() as AudioStreamPlaybackPolyphonic
var id = playback.play_stream(preload("res://Clip1.ogg"))
await get_tree().create_timer(1).timeout
playback.set_stream_volume(id,-12) # Set volume to half after one second
await get_tree().create_timer(2).timeout
var id2 = playback.play_stream(preload("res://Clip2.ogg")) # 2 seconds later, start another clip
await get_tree().create_timer(1).timeout
playback.stop_stream(id) # 1 second later, kill the first clip
playback.set_stream_pitch_scale(id2,1.5) # Make the second clip go 50% faster

```
2023-01-22 16:22:45 +01:00
Rémi Verschelde cd031fd31a
Merge pull request #71663 from bruvzg/init_pos_x
Reorganize main and sub-window initial position properties.
2023-01-22 11:25:58 +01:00
Rémi Verschelde c0f35a8db1
Merge pull request #71839 from TokageItLab/expose-fading-from-statemachine
Expose `fading_from` from StateMachine
2023-01-22 11:08:34 +01:00
Rémi Verschelde bda87300e8
Merge pull request #71770 from KoBeWi/better_editing_or_something
Rework EditorPlugin editing logic
2023-01-22 11:07:39 +01:00
Silc Renew 8b04f58604 Expose fading_from_node from StateMachine 2023-01-22 15:50:53 +09:00
kobewi 4ae168eb04 Rework EditorPlugin editing logic 2023-01-22 00:20:45 +01:00
Rémi Verschelde c781537742
Merge pull request #68489 from KoBeWi/open_in_extraterrestrial_program
Add "Open in External Program" option
2023-01-21 20:53:04 +01:00
kobewi 60ed7c5004 Add "Open in External Program" option 2023-01-21 18:33:32 +01:00
George Marques 7548e043fc
Add support for Unicode identifiers in GDScript
This is using an adapted version of UAX#31 to not rely on the ICU
database (which isn't available in builds without TextServerAdvanced).
It allows most characters used in diverse scripts but not everything.
2023-01-21 13:39:40 -03:00
Rémi Verschelde 3e9a831194
Merge pull request #65726 from KoBeWi/cellless
Don't print error in `get_cell_tile_data()`
2023-01-21 16:54:53 +01:00
Rémi Verschelde ebd0b40f6e
Merge pull request #71687 from reduz/support-script-class-name-in-efs
Support script global resource name in EditorFileSystem
2023-01-21 16:54:23 +01:00
Rémi Verschelde 145ab2e1fd
Merge pull request #71797 from reduz/cleanup-shader-parameter-remap
Clean up shader parameter remap
2023-01-21 16:53:29 +01:00
Juan Linietsky dddd8d43f6 Support script global resource name in EditorFileSystem
* Works for binary and text files.
* Makes EditorQuickOpen work with custom resources again.
* Information is cached and easily accessible.

Properly fixes #66179. Supersedes #66215 and supersedes #62417

**WARNING**: This required breaking backwards binary compatibility (.res and .scn files). Files saved after this PR is merged will no longer open in any earlier versions of Godot.
2023-01-21 14:19:27 +01:00
Juan Linietsky 7dbc458bb4 Clean up shader parameter remap
This PR is a follow up to #64092, which fixed important issues but it was implemented in an overly complex and inefficient way (because it forced the default code path to always go through string operations).
This cleans up all the shader parameter code.

This fixes #54336. Also fixes #56219 because, as the new code never queries the RenderingServer on load, potential deadlocks are avoided.

**NOTE**: materials saved between #62972 and #64092 will no longer work and will need to be resaved in an earlier version.
2023-01-21 12:56:28 +01:00
Rémi Verschelde 2435eef617
Merge pull request #71390 from reduz/fix-json-as-resource
Fixes to JSON as resource
2023-01-21 11:30:08 +01:00
Rémi Verschelde d5838a06fa
Merge pull request #71709 from clayjohn/decals-lights-sorting
Sort decals and lights based on camera origin
2023-01-20 23:57:55 +01:00
clayjohn 49bebf2bfb Sort decals and lights based on camera origin
Also implement sort_offset for decals

Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2023-01-20 09:58:17 -08:00
Rémi Verschelde 621e32971e
i18n: Sync classref translations with Weblate (3.5 branch)
(cherry picked from commit c9ae52f32e)
2023-01-20 12:32:06 +01:00
Rémi Verschelde 6d15948c68
Merge pull request #71718 from Calinou/doc-custom-mouse-cursor-max-size-web
Document image size restrictions for custom mouse cursors in HTML5
2023-01-20 12:10:18 +01:00
Yuri Rubinsky 6f2c0140f0
Merge pull request #71717 from Chaosus/vs_refactor_texture_get_code 2023-01-20 13:51:35 +03:00
Yuri Rubinsky 7cbe2b939e Some refactoring for visual shader texture functions 2023-01-20 12:54:20 +03:00
Hugo Locurcio 296b8f299a
Document image size restrictions for custom mouse cursors in HTML5 2023-01-20 10:19:36 +01:00
Rémi Verschelde 9fc40123ab
Merge pull request #71679 from kleonc/draw_polyline_line_strip
`CanvasItem::draw_polyline` Support thin polylines drawn using line strip
2023-01-20 08:48:56 +01:00
Rémi Verschelde d919d77367
Merge pull request #71418 from TokageItLab/restart-anim-tree
Allow AnimationStateMachine / AnimationNode to restart when transitioning to the same state
2023-01-19 21:52:35 +01:00
Rémi Verschelde a202f5104f
Merge pull request #71264 from TokageItLab/improve-statemachine
Add next/reset function to `AnimationStateMachine`
2023-01-19 21:52:05 +01:00
kleonc 728c51e362 CanvasItem::draw_polyline Support thin polylines drawn using line strip 2023-01-19 21:08:25 +01:00
Rémi Verschelde 65883cc73b
Merge pull request #71598 from bruvzg/gdscript_bidi_override
Implement BiDi override mode for GDScript source.
2023-01-19 19:33:18 +01:00
Rémi Verschelde ab5c75b9ad
Merge pull request #71649 from raulsntos/array-indexer
Add property usage to array indexer
2023-01-19 19:33:05 +01:00
Rémi Verschelde 8b92316368
Merge pull request #71565 from RedworkDE/doc-arraymesh-add-surface
Fix LOD sort order; checks in add_surface; and document all parameters of `ArrayMesh::add_surface_from_arrays`
2023-01-19 19:32:37 +01:00
Yuri Sizov 752402cf35 Clean-up, harmonize, and improve StyleBox API
- Make all margin properties follow the same naming convention (their getter and setter too).
- Remove a virtual counterpart of `get_style_margin` from API.
- Allow to override `get_minimum_size` from scripting and remove `get_center_size`.
2023-01-19 20:02:21 +03:00
Raul Santos 97610c8bfc
Add property usage to array indexer
This makes the `Array` indexer show as returning `Variant` instead of `void` in the documentation.
2023-01-19 14:22:11 +01:00
Rémi Verschelde d3665effd5
Merge pull request #71443 from TechnoPorg/fix-resource-conversion-plugins
Make EditorResourceConversionPlugin usable.
2023-01-19 13:23:37 +01:00
bruvzg aade5abd4f
Reorganize main and sub-window initial position properties. 2023-01-19 13:44:06 +02:00
RedworkDE be4eb3bbdd Fix LOD sort order; checks in add_surface; and document all parameters of ArrayMesh::add_surface_from_arrays
Also clarify some related documentation and expose the misssing `ArrayFormat::ARRAY_FLAG_USES_EMPTY_VERTEX_ARRAY`
2023-01-19 10:30:25 +01:00
Rémi Verschelde 4679f8724a
Merge pull request #71628 from reduz/fixup-editor-file-system-script-parsing
Clean up EditorFileSystem script parsing
2023-01-19 10:09:55 +01:00
clayjohn faea9f5c10 Remove SCREEN_TEXTURE, DEPTH_TEXTURE, and NORMAL_ROUGHNESS_TEXTURE
in favour of texture hints
2023-01-18 19:52:47 -08:00
Rémi Verschelde acd62443b6
Merge pull request #71619 from TokageItLab/add-keep-state-to-anim-stop
Add `p_keep_state` to `AnimationPlayer::stop()`
2023-01-18 22:41:43 +01:00
Rémi Verschelde 5dd3a6dbe2
Merge pull request #71638 from raulsntos/dotnet/export-plugin
C#: Implement `ExportPlugin::_get_name` and move `GLOBAL_DEF` to CSharpLanguage
2023-01-18 22:29:37 +01:00
Rémi Verschelde 2050f59e3a
Merge pull request #71623 from kleonc/draw_arc_clamp_to_single_circle
`CanvasItem::draw_arc` Clamp angle difference so arc won't overlap itself
2023-01-18 22:28:24 +01:00
Rémi Verschelde f40f1e0c90
Merge pull request #60904 from KoBeWi/👻👻👻
Allow unindent without selection
2023-01-18 22:27:36 +01:00
Raul Santos 3425d43fed
C#: Move GLOBAL_DEFs to CSharpLanguage ctor
Also documents the .NET project settings.
2023-01-18 21:53:58 +01:00
Juan Linietsky 5bdc0d97d3 Clean up EditorFileSystem script parsing
* Optimize only update modified/added/removed files.
* Clean up documentation parsing.
2023-01-18 20:56:45 +01:00
Silc Renew e480262c53 Allow AnimationNodes to restart when transitioning to the same state 2023-01-19 03:10:59 +09:00
Silc Renew 8bfaf098c7 Add next/reset function to AnimationStateMachine 2023-01-19 03:10:45 +09:00
bruvzg 5361ec9f43
Implement BiDi override mode for GDScript source. 2023-01-18 19:22:20 +02:00
Rémi Verschelde 955f05a4fa
Merge pull request #71473 from TigranExe/patch-2
Added property descriptions to and clarified description of SkeletonProfile
2023-01-18 17:34:13 +01:00
Rémi Verschelde da1b78222c
Merge pull request #71615 from groud/bring_back_get_cells_by_id
Bring back TileMap::get_cells_by_id
2023-01-18 17:33:14 +01:00
Silc Renew d16004f297 Add p_keep_state to AnimationPlayer::stop() 2023-01-19 01:05:46 +09:00
kobewi b427d3585c Allow unindent without selection 2023-01-18 17:05:15 +01:00
Gilles Roudière 68afc0afa5 Bring back TileMap::get_cells_by_id 2023-01-18 15:56:31 +01:00
Tigran 20a23cd8cb Updated SkeletonProfile's main and property descriptions
Updated SkeletonProfile's main and property descriptions
-Description now has note about read only quality
-"bone_size" and "group_size" property descriptions have been added and clarified.
-Property descriptions refer to BoneMap page instead of [code]bone_map[/code] from [Retargeting 3d skeletons](https://docs.godotengine.org/en/latest/tutorials/assets_pipeline/retargeting_3d_skeletons.html#bone-map).
-all property descriptions now do not have any Notes to split them
-TokageItLab clarifies property descriptions to highlight their use

Co-Authored-By: Silc 'Tokage' Renew <tokage.it.lab@gmail.com>
2023-01-18 09:23:04 -05:00
kleonc 43fc483e6c CanvasItem::draw_arc Clamp angle difference so arc won't overlap itself 2023-01-18 15:16:22 +01:00
Rémi Verschelde 0461f75387
Merge pull request #71527 from matt08-prog/patch-1
add RichTextLabel::push_font_size description
2023-01-18 08:38:14 +01:00
Rémi Verschelde 6da836bbb4
Merge pull request #71514 from akien-mga/os-unset_environment
OS: Add `unset_environment`, better validate input
2023-01-18 08:35:43 +01:00
RedMser ec4f9f5e2d Fix documentation 2d/3d mixups 2023-01-17 21:34:10 +01:00
Rémi Verschelde 19152765de
Merge pull request #71145 from dalexeev/doc-sprite-frames
Improve `SpriteFrames` docs
2023-01-17 11:13:49 +01:00
SaracenOne 4628736894 Update instances of scenes which have been reimported. 2023-01-16 13:46:33 -08:00
matt08-prog 44c27802b2
add RichTextLabel::push_font_size description
Is it worth adding descriptions for the ItemType enum values (ITEM_FRAME , ITEM_TEXT etc.) or are they self explanatory enough?
2023-01-16 14:15:41 -07:00
Rémi Verschelde 818a9e99a4
OS: Add unset_environment, better validate input
Instead of returning an undocumented boolean error code, we do the
validation checks that should ensure a successful result.

Based on:
- https://linux.die.net/man/3/setenv
- https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-setenvironmentvariable
2023-01-16 16:39:44 +01:00
bruvzg c6ed9bb77e
Fix typo and add missing docs for WINDOW_FLAG_MOUSE_PASSTHROUGH. 2023-01-16 14:25:32 +02:00
Rémi Verschelde 5ca6c1f9db
Merge pull request #70557 from KoBeWi/class_yeet
Move global script class cache to separate file
2023-01-16 12:49:08 +01:00
Rémi Verschelde 47689c7d51
Merge pull request #71502 from bruvzg/tooltip_clickthrough
Add `WINDOW_FLAG_MOUSE_PASSTHROUGH` flag and enabled it for tooltips.
2023-01-16 12:48:45 +01:00
Danil Alexeev a8cbb6245b
Fix scaling issue in draw_line and similar methods 2023-01-16 12:49:58 +03:00
bruvzg 34b34b104c
Add WINDOW_FLAG_MOUSE_PASSTHROUGH flag and enabled it for tooltips. Expose window_set_mouse_passthrough to Window. 2023-01-16 11:42:49 +02:00
kobewi 6444c7d127 Move global script class cache to separate file 2023-01-16 10:16:30 +01:00
Rémi Verschelde 0f0b853c98
Merge pull request #70668 from KoBeWi/never_give_up
Retry loading addons after filesystem scan
2023-01-16 09:47:17 +01:00
Rémi Verschelde b45bd946c6
Merge pull request #70669 from KoBeWi/bruh2
Improve ResourcePreloader description
2023-01-16 09:46:52 +01:00