Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge commit godotengine/godot@f128f38 #886

Merged
merged 99 commits into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
9558d4f
Make TextEdit autocompletion replace word unless Shift is held
Calinou Apr 15, 2024
75eacba
Add Camera3D preview in Inspector
timothyqiu Apr 17, 2024
a54c6ce
Fix crash when re-importing model with AnimationPlayer panel open and…
yahkr Aug 19, 2024
1deb42a
Improve behaviour of AnimationPlayer warnings.
SaracenOne Sep 1, 2024
bd69df1
Add descriptions to RDVertexAttribute's properties
DevPoodle Sep 23, 2024
3345f90
Fix plugin creation dialog script name tooltip
passivestar Oct 7, 2024
891173b
[macOS] Change the shortcut for Align Transform with View
passivestar Jul 7, 2024
14dd595
Fix uneditable LineEdit, TexEdit and CodeEdit Virtual Keyboard popup
syntaxerror247 Oct 9, 2024
d5fbc7d
Improve Scale Selection in Animation tab
KoBeWi Oct 22, 2024
771e561
Fix Camera3D::project_position() when depth=zfar
Flarkk Oct 24, 2024
893ce62
Fix `ColorPicker`'s remote synchronization when typing values
ydeltastar Oct 26, 2024
22caab0
Add note about LightmapGI only baking nodes under its parent
FlooferLand Nov 11, 2024
f789025
Add documentation note on Object's boolean context
Mickeon Nov 11, 2024
2f620db
LSP: Fix spec violations that break the VSCode outline
HolonProduction Nov 15, 2024
56d01fb
Show file names in the remove files confirmation dialog
pafuent Oct 24, 2024
f5b49af
Add RetargetModifier3D for realtime retarget to keep original rest
TokageItLab Oct 4, 2024
6ba86c3
Disable the debugger thread selector when there's nothing to select
passivestar Nov 19, 2024
0ff5d5f
Add theme type variations for secondary Trees and ItemLists
passivestar Oct 6, 2024
57541d5
Android: Extension support for native file dialog
syntaxerror247 Nov 18, 2024
0cf99cf
Add a Viewport method to get automatically computed 2D stretch transform
Calinou Aug 24, 2023
1a082fd
Ensure editor crossorigin isolation headers
adamscott Nov 6, 2024
7f37e88
Fix SVG font rendering.
bruvzg Nov 20, 2024
48fbe41
Register Engine, OS, ProjectSettings, and Time early.
HuntJSparra Nov 5, 2024
289e548
Untangle ColorPicker includes
KoBeWi Nov 22, 2024
2c9de1d
Add unit tests for UDPServer
pafuent Sep 22, 2024
ebf7e86
Make start/end can be retrieved from each PlaybackData on AnimPlayer
TokageItLab Nov 23, 2024
45a7bcc
Fix gl_compatibility lightmap uniforms not being set
jamie-pate Nov 24, 2024
27bd7b2
Fix forward_vector scale to handle safe_margin in LookAtModifier
TokageItLab Nov 24, 2024
37c3907
Change navigation map performance monitor to use a struct
smix8 Nov 24, 2024
74611a7
Generate editor thumbnails on imported scenes.
SaracenOne Sep 3, 2024
b76cdf5
Make LookAtModifier3D adopt to bone name method
TokageItLab Nov 24, 2024
38d274b
Make flipping flag consider influence in LookAtModifier3D
TokageItLab Nov 24, 2024
3413c6c
Update screen_get_scale documentation.
syntaxerror247 Nov 25, 2024
6d5ac8f
Resolve load and store ops automatically for render passes for discar…
DarioSamo Oct 24, 2024
e297506
Round DDS width/height to next divisor multiple for block compression
Spartan322 Nov 23, 2024
f2f48aa
Fix stringification of Projection
akien-mga Nov 22, 2024
38e0532
Android: `OS.create_instance()` should return `-1` on failure
dsnopek Nov 25, 2024
ffd4de6
Add variant_get_ptr_internal_getter to gdextension_interface.h. The f…
Ivorforce Nov 13, 2024
fb5a4ba
Improve documentation for tooltip-related methods
timothyqiu Nov 25, 2024
a8cd0e9
Use direct composition for d3d12 backend
0x0ACB Nov 18, 2024
3376b91
Fix SSS with reverse-z
Flarkk Nov 13, 2024
0fc082e
Add CollisionShape3D custom debug colours
Apr 2, 2024
1bd52fe
clipper2: Update to 1.4.0
Chubercik Aug 22, 2024
e653f19
Rewrite some `@GlobalScope` keys in documentation to use `[code]` tags
Mickeon Nov 17, 2024
7f3242a
Merge pull request #99201 from Ivorforce/variant-get-contents-ptr
Repiteo Nov 26, 2024
391e0a6
Merge pull request #99585 from TokageItLab/start-end-each
Repiteo Nov 26, 2024
185a86a
Merge pull request #98567 from ydeltastar/remote-pick
Repiteo Nov 26, 2024
b41f02c
Merge pull request #90644 from BattyBovine/cs3d_debug_colour
Repiteo Nov 26, 2024
dc0fcf9
Merge pull request #99612 from TokageItLab/lkat-bn
Repiteo Nov 26, 2024
d18f804
Merge pull request #99613 from TokageItLab/scl-fw
Repiteo Nov 26, 2024
37c392e
Merge pull request #96414 from SaracenOne/improve_animation_warnings
Repiteo Nov 26, 2024
04786f0
Merge pull request #97824 from TokageItLab/retarget-modifier
Repiteo Nov 26, 2024
33093c2
Merge pull request #99619 from TokageItLab/flippable
Repiteo Nov 26, 2024
19dd3ed
Merge pull request #99364 from Mickeon/documentation-global-scope-key…
Repiteo Nov 26, 2024
78b2a53
Merge pull request #99626 from smix8/performance_data
Repiteo Nov 26, 2024
0045b1a
Merge pull request #98862 from HuntJSparra/early-projsettings-registr…
Repiteo Nov 26, 2024
127738c
Merge pull request #99387 from 0x0ACB/direct_composition
Repiteo Nov 26, 2024
0ee60dd
Merge pull request #99516 from KoBeWi/quantum_entanglement_of_source_…
Repiteo Nov 26, 2024
1dffdfd
Merge pull request #94026 from passivestar/mac-align-transform-shortcut
Repiteo Nov 26, 2024
1bba277
Merge pull request #99417 from passivestar/thread-selector
Repiteo Nov 26, 2024
1606b18
Merge pull request #95964 from Chubercik/clipper2-1.4.0
Repiteo Nov 26, 2024
13d59b2
Merge pull request #99563 from akien-mga/fix-projection-stringification
Repiteo Nov 26, 2024
bbc5469
Merge pull request #98419 from KoBeWi/dialog_scalar
Repiteo Nov 26, 2024
612981c
Add ShadowCastingSetting to MeshLibrary / GridMap items
smix8 Nov 27, 2023
2041d8c
Fix `ScrollBar` grabber mouse input.
WhalesState Nov 27, 2024
70a5554
Ensure primitive meshes are created before connected to changed signal.
tdaven Nov 27, 2024
9e34e45
Use Vector4 for texture mask in BaseMaterial to avoid converting to a…
clayjohn Nov 27, 2024
3c78eb1
Style: Downgrade `.clang-format` arguments to 17.x
Repiteo Nov 27, 2024
4e079ee
Merge pull request #99459 from bruvzg/svg_font_fix
Repiteo Nov 27, 2024
ea61c3e
Merge pull request #97924 from passivestar/plugin-tooltip
Repiteo Nov 27, 2024
ed443cc
Merge pull request #99079 from FlooferLand/patch-1
Repiteo Nov 27, 2024
7ddc076
Merge pull request #99600 from Spartan322/permit/non-spec-dds
Repiteo Nov 27, 2024
2a147f3
Merge pull request #99091 from Mickeon/documentation-object-boolean-c…
Repiteo Nov 27, 2024
c58ae91
Merge pull request #99220 from Flarkk/fix_sss_reverse_z
Repiteo Nov 27, 2024
6e533b5
Merge pull request #99606 from jamie-pate/fix_99592
Repiteo Nov 27, 2024
30ab612
Merge pull request #90778 from timothyqiu/cam-preview
Repiteo Nov 27, 2024
a29a1b8
Merge pull request #99740 from tdaven/fix-99661
Repiteo Nov 27, 2024
ac6fc85
Merge pull request #97311 from pafuent/adding_udp_server_unit_tests
Repiteo Nov 27, 2024
1c78b09
Merge pull request #96544 from SaracenOne/import_thumbnails
Repiteo Nov 27, 2024
2154229
Merge pull request #99743 from clayjohn/material-texture-mask
Repiteo Nov 27, 2024
225211b
Merge pull request #99761 from Repiteo/style/clang-format-downgrade
Repiteo Nov 27, 2024
0195a89
Merge pull request #95795 from yahkr/95769-animation-crash
Repiteo Nov 27, 2024
3edf8b9
Merge pull request #98489 from Flarkk/fix_project_position
Repiteo Nov 27, 2024
78abba7
Merge pull request #99385 from syntaxerror247/file_picker_extension_s…
Repiteo Nov 27, 2024
06f4bcd
Merge pull request #97346 from DevPoodle/vertex-attribute-docs
Repiteo Nov 27, 2024
c5cd7c6
Merge pull request #85443 from smix8/gridmap_castshadows
Repiteo Nov 27, 2024
9c300a6
Merge pull request #80965 from Calinou/viewport-add-get-stretch-scale…
Repiteo Nov 27, 2024
3a5ce2f
Merge pull request #98901 from adamscott/add-editor-ensure-crossorigi…
Repiteo Nov 27, 2024
9e259ef
Merge pull request #97884 from passivestar/list-variations
Repiteo Nov 27, 2024
70ea571
Merge pull request #98012 from syntaxerror247/lineEdit-bug-fix
Repiteo Nov 27, 2024
539be43
Merge pull request #99677 from syntaxerror247/patch-1
Repiteo Nov 27, 2024
6eca2aa
Merge pull request #99295 from HolonProduction/yet-another-lsp-violation
Repiteo Nov 27, 2024
8f603c9
Merge pull request #99679 from timothyqiu/custom-tooltip-doc
Repiteo Nov 27, 2024
8b5f181
Merge pull request #90723 from Calinou/textedit-autocompletion-always…
Repiteo Nov 27, 2024
ce4674a
Merge pull request #98539 from pafuent/show_filename_when_delete
Repiteo Nov 27, 2024
ed01f5f
Merge pull request #98670 from DarioSamo/rd-transient-targets
Repiteo Nov 27, 2024
150c69c
Merge pull request #99694 from dsnopek/android-os-create-instance-ret…
Repiteo Nov 27, 2024
f128f38
Merge pull request #98035 from WhalesState/scroll-bar-grapper-area
Repiteo Nov 27, 2024
721f53f
Merge commit godotengine/godot@f128f383e892865379cb8b14e7bcc9858efe2973
Spartan322 Nov 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 8 additions & 45 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Commented out parameters are those with the same value as base LLVM style.
# We can uncomment them if we want to change their value, or enforce the
# chosen value in case the base style changes (last sync: Clang 19.1.0).
# chosen value in case the base style changes (last sync: Clang 17.0.6).
BasedOnStyle: LLVM
AccessModifierOffset: -4
AlignAfterOpenBracket: DontAlign
Expand All @@ -10,74 +10,48 @@ AlignAfterOpenBracket: DontAlign
# AcrossEmptyLines: false
# AcrossComments: false
# AlignCompound: false
# AlignFunctionPointers: false
# PadOperators: true
# AlignConsecutiveBitFields:
# Enabled: false
# AcrossEmptyLines: false
# AcrossComments: false
# AlignCompound: false
# AlignFunctionPointers: false
# PadOperators: false
# AlignConsecutiveDeclarations:
# Enabled: false
# AcrossEmptyLines: false
# AcrossComments: false
# AlignCompound: false
# AlignFunctionPointers: false
# PadOperators: false
# AlignConsecutiveMacros:
# Enabled: false
# AcrossEmptyLines: false
# AcrossComments: false
# AlignCompound: false
# AlignFunctionPointers: false
# PadOperators: false
# AlignConsecutiveShortCaseStatements:
# Enabled: false
# AcrossEmptyLines: false
# AcrossComments: false
# AlignCaseArrows: false
# AlignCaseColons: false
# AlignConsecutiveTableGenBreakingDAGArgColons:
# Enabled: false
# AcrossEmptyLines: false
# AcrossComments: false
# AlignCompound: false
# AlignFunctionPointers: false
# PadOperators: false
# AlignConsecutiveTableGenCondOperatorColons:
# Enabled: false
# AcrossEmptyLines: false
# AcrossComments: false
# AlignCompound: false
# AlignFunctionPointers: false
# PadOperators: false
# AlignConsecutiveTableGenDefinitionColons:
# Enabled: false
# AcrossEmptyLines: false
# AcrossComments: false
# AlignCompound: false
# AlignFunctionPointers: false
# PadOperators: false
# AlignEscapedNewlines: Right
AlignOperands: DontAlign
AlignTrailingComments:
Kind: Never
OverEmptyLines: 0
# AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: false
# AllowBreakBeforeNoexceptSpecifier: Never
# AllowShortBlocksOnASingleLine: Never
# AllowShortCaseExpressionOnASingleLine: true
# AllowShortCaseLabelsOnASingleLine: false
# AllowShortCompoundRequirementOnASingleLine: true
# AllowShortEnumsOnASingleLine: true
# AllowShortFunctionsOnASingleLine: All
# AllowShortIfStatementsOnASingleLine: Never
# AllowShortLambdasOnASingleLine: All
# AllowShortLoopsOnASingleLine: false
# AlwaysBreakAfterDefinitionReturnType: None
# AlwaysBreakAfterReturnType: None
# AlwaysBreakBeforeMultilineStrings: false
# AlwaysBreakTemplateDeclarations: MultiLine
# AttributeMacros:
# - __capability
# BinPackArguments: true
Expand All @@ -102,21 +76,17 @@ AllowAllParametersOfDeclarationOnNextLine: false
# SplitEmptyFunction: true
# SplitEmptyRecord: true
# SplitEmptyNamespace: true
# BreakAdjacentStringLiterals: true
# BreakAfterAttributes: Leave
# BreakAfterAttributes: Never
# BreakAfterJavaFieldAnnotations: false
# BreakAfterReturnType: None
# BreakArrays: true
# BreakBeforeBinaryOperators: None
# BreakBeforeBraces: Attach
# BreakBeforeConceptDeclarations: Always
# BreakBeforeInlineASMColon: OnlyMultiline
# BreakBeforeTernaryOperators: true
BreakConstructorInitializers: AfterColon
# BreakFunctionDefinitionParameters: false
# BreakInheritanceList: BeforeColon
# BreakStringLiterals: true
# BreakTemplateDeclarations: MultiLine
ColumnLimit: 0
# CommentPragmas: '^ IWYU pragma:'
# CompactNamespaces: false
Expand Down Expand Up @@ -174,16 +144,13 @@ JavaImportGroups:
- javax
# JavaScriptQuotes: Leave
# JavaScriptWrapImports: true
KeepEmptyLines:
AtEndOfFile: false
AtStartOfBlock: false
AtStartOfFile: false
# KeepEmptyLinesAtEOF: false
KeepEmptyLinesAtTheStartOfBlocks: false
# LambdaBodyIndentation: Signature
# Language: Cpp
# LineEnding: DeriveLF
# MacroBlockBegin: ''
# MacroBlockEnd: ''
# MainIncludeChar: Quote
# MaxEmptyLinesToKeep: 1
# NamespaceIndentation: None
# ObjCBinPackProtocolList: Auto
Expand All @@ -198,7 +165,6 @@ PackConstructorInitializers: NextLine
# PenaltyBreakComment: 300
# PenaltyBreakFirstLessLess: 120
# PenaltyBreakOpenParenthesis: 0
# PenaltyBreakScopeResolution: 500
# PenaltyBreakString: 1000
# PenaltyBreakTemplateDeclaration: 10
# PenaltyExcessCharacter: 1000000
Expand All @@ -215,7 +181,6 @@ RemoveSemicolon: true
# RequiresExpressionIndentation: OuterScope
# SeparateDefinitionBlocks: Leave
# ShortNamespaceLines: 1
# SkipMacroDefinitionBody: false
# SortIncludes: CaseSensitive
# SortJavaStaticImport: Before
# SortUsingDeclarations: LexicographicNumeric
Expand All @@ -229,14 +194,14 @@ RemoveSemicolon: true
# SpaceBeforeCtorInitializerColon: true
# SpaceBeforeInheritanceColon: true
# SpaceBeforeJsonColon: false
# SpaceBeforeParens: ControlStatements
# SpaceBeforeParensOptions:
# AfterControlStatements: true
# AfterForeachMacros: true
# AfterFunctionDeclarationName: false
# AfterFunctionDefinitionName: false
# AfterIfMacros: true
# AfterOverloadedOperator: false
# AfterPlacementOperator: true
# AfterRequiresInClause: false
# AfterRequiresInExpression: false
# BeforeNonEmptyParentheses: false
Expand All @@ -251,7 +216,6 @@ SpacesInLineCommentPrefix:
Maximum: -1
# SpacesInParens: Never
# SpacesInParensOptions:
# ExceptDoubleParentheses: false
# InConditionalStatements: false
# InCStyleCasts: false
# InEmptyParentheses: false
Expand All @@ -264,7 +228,6 @@ Standard: c++20
# - Q_UNUSED
# - QT_REQUIRE_VERSION
TabWidth: 4
# TableGenBreakInsideDAGArg: DontBreak
UseTab: Always
# VerilogBreakBetweenInstancePorts: true
# WhitespaceSensitiveMacros:
Expand Down
2 changes: 1 addition & 1 deletion COPYRIGHT.txt
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ License: MPL-2.0

Files: ./thirdparty/clipper2/
Comment: Clipper2
Copyright: 2010-2023, Angus Johnson
Copyright: 2010-2024, Angus Johnson
License: BSL-1.0

Files: ./thirdparty/cvtt/
Expand Down
86 changes: 86 additions & 0 deletions core/extension/gdextension_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -702,6 +702,91 @@ static GDExtensionTypeFromVariantConstructorFunc gdextension_get_variant_to_type
ERR_FAIL_V_MSG(nullptr, "Getting Variant conversion function with invalid type");
}

static GDExtensionVariantGetInternalPtrFunc gdextension_variant_get_ptr_internal_getter(GDExtensionVariantType p_type) {
switch (p_type) {
case GDEXTENSION_VARIANT_TYPE_BOOL:
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<bool *(*)(Variant *)>(VariantInternal::get_bool));
case GDEXTENSION_VARIANT_TYPE_INT:
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<int64_t *(*)(Variant *)>(VariantInternal::get_int));
case GDEXTENSION_VARIANT_TYPE_FLOAT:
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<double *(*)(Variant *)>(VariantInternal::get_float));
case GDEXTENSION_VARIANT_TYPE_STRING:
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<String *(*)(Variant *)>(VariantInternal::get_string));
case GDEXTENSION_VARIANT_TYPE_VECTOR2:
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<Vector2 *(*)(Variant *)>(VariantInternal::get_vector2));
case GDEXTENSION_VARIANT_TYPE_VECTOR2I:
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<Vector2i *(*)(Variant *)>(VariantInternal::get_vector2i));
case GDEXTENSION_VARIANT_TYPE_RECT2:
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<Rect2 *(*)(Variant *)>(VariantInternal::get_rect2));
case GDEXTENSION_VARIANT_TYPE_RECT2I:
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<Rect2i *(*)(Variant *)>(VariantInternal::get_rect2i));
case GDEXTENSION_VARIANT_TYPE_VECTOR3:
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<Vector3 *(*)(Variant *)>(VariantInternal::get_vector3));
case GDEXTENSION_VARIANT_TYPE_VECTOR3I:
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<Vector3i *(*)(Variant *)>(VariantInternal::get_vector3i));
case GDEXTENSION_VARIANT_TYPE_TRANSFORM2D:
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<Transform2D *(*)(Variant *)>(VariantInternal::get_transform2d));
case GDEXTENSION_VARIANT_TYPE_VECTOR4:
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<Vector4 *(*)(Variant *)>(VariantInternal::get_vector4));
case GDEXTENSION_VARIANT_TYPE_VECTOR4I:
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<Vector4i *(*)(Variant *)>(VariantInternal::get_vector4i));
case GDEXTENSION_VARIANT_TYPE_PLANE:
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<Plane *(*)(Variant *)>(VariantInternal::get_plane));
case GDEXTENSION_VARIANT_TYPE_QUATERNION:
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<Quaternion *(*)(Variant *)>(VariantInternal::get_quaternion));
case GDEXTENSION_VARIANT_TYPE_AABB:
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<AABB *(*)(Variant *)>(VariantInternal::get_aabb));
case GDEXTENSION_VARIANT_TYPE_BASIS:
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<Basis *(*)(Variant *)>(VariantInternal::get_basis));
case GDEXTENSION_VARIANT_TYPE_TRANSFORM3D:
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<Transform3D *(*)(Variant *)>(VariantInternal::get_transform));
case GDEXTENSION_VARIANT_TYPE_PROJECTION:
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<Projection *(*)(Variant *)>(VariantInternal::get_projection));
case GDEXTENSION_VARIANT_TYPE_COLOR:
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<Color *(*)(Variant *)>(VariantInternal::get_color));
case GDEXTENSION_VARIANT_TYPE_STRING_NAME:
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<StringName *(*)(Variant *)>(VariantInternal::get_string_name));
case GDEXTENSION_VARIANT_TYPE_NODE_PATH:
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<NodePath *(*)(Variant *)>(VariantInternal::get_node_path));
case GDEXTENSION_VARIANT_TYPE_RID:
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<RID *(*)(Variant *)>(VariantInternal::get_rid));
case GDEXTENSION_VARIANT_TYPE_OBJECT:
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<Object **(*)(Variant *)>(VariantInternal::get_object));
case GDEXTENSION_VARIANT_TYPE_CALLABLE:
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<Callable *(*)(Variant *)>(VariantInternal::get_callable));
case GDEXTENSION_VARIANT_TYPE_SIGNAL:
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<Signal *(*)(Variant *)>(VariantInternal::get_signal));
case GDEXTENSION_VARIANT_TYPE_DICTIONARY:
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<Dictionary *(*)(Variant *)>(VariantInternal::get_dictionary));
case GDEXTENSION_VARIANT_TYPE_ARRAY:
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<Array *(*)(Variant *)>(VariantInternal::get_array));
case GDEXTENSION_VARIANT_TYPE_PACKED_BYTE_ARRAY:
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<PackedByteArray *(*)(Variant *)>(VariantInternal::get_byte_array));
case GDEXTENSION_VARIANT_TYPE_PACKED_INT32_ARRAY:
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<PackedInt32Array *(*)(Variant *)>(VariantInternal::get_int32_array));
case GDEXTENSION_VARIANT_TYPE_PACKED_INT64_ARRAY:
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<PackedInt64Array *(*)(Variant *)>(VariantInternal::get_int64_array));
case GDEXTENSION_VARIANT_TYPE_PACKED_FLOAT32_ARRAY:
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<PackedFloat32Array *(*)(Variant *)>(VariantInternal::get_float32_array));
case GDEXTENSION_VARIANT_TYPE_PACKED_FLOAT64_ARRAY:
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<PackedFloat64Array *(*)(Variant *)>(VariantInternal::get_float64_array));
case GDEXTENSION_VARIANT_TYPE_PACKED_STRING_ARRAY:
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<PackedStringArray *(*)(Variant *)>(VariantInternal::get_string_array));
case GDEXTENSION_VARIANT_TYPE_PACKED_VECTOR2_ARRAY:
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<PackedVector2Array *(*)(Variant *)>(VariantInternal::get_vector2_array));
case GDEXTENSION_VARIANT_TYPE_PACKED_VECTOR3_ARRAY:
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<PackedVector3Array *(*)(Variant *)>(VariantInternal::get_vector3_array));
case GDEXTENSION_VARIANT_TYPE_PACKED_COLOR_ARRAY:
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<PackedColorArray *(*)(Variant *)>(VariantInternal::get_color_array));
case GDEXTENSION_VARIANT_TYPE_PACKED_VECTOR4_ARRAY:
return reinterpret_cast<GDExtensionVariantGetInternalPtrFunc>(static_cast<PackedVector4Array *(*)(Variant *)>(VariantInternal::get_vector4_array));
case GDEXTENSION_VARIANT_TYPE_NIL:
case GDEXTENSION_VARIANT_TYPE_VARIANT_MAX:
ERR_FAIL_V_MSG(nullptr, "Getting Variant get internal pointer function with invalid type.");
}
ERR_FAIL_V_MSG(nullptr, "Getting Variant get internal pointer function with invalid type.");
}

// ptrcalls
static GDExtensionPtrOperatorEvaluator gdextension_variant_get_ptr_operator_evaluator(GDExtensionVariantOperator p_operator, GDExtensionVariantType p_type_a, GDExtensionVariantType p_type_b) {
return (GDExtensionPtrOperatorEvaluator)Variant::get_ptr_operator_evaluator(Variant::Operator(p_operator), Variant::Type(p_type_a), Variant::Type(p_type_b));
Expand Down Expand Up @@ -1627,6 +1712,7 @@ void gdextension_setup_interface() {
REGISTER_INTERFACE_FUNC(variant_can_convert_strict);
REGISTER_INTERFACE_FUNC(get_variant_from_type_constructor);
REGISTER_INTERFACE_FUNC(get_variant_to_type_constructor);
REGISTER_INTERFACE_FUNC(variant_get_ptr_internal_getter);
REGISTER_INTERFACE_FUNC(variant_get_ptr_operator_evaluator);
REGISTER_INTERFACE_FUNC(variant_get_ptr_builtin_method);
REGISTER_INTERFACE_FUNC(variant_get_ptr_constructor);
Expand Down
18 changes: 18 additions & 0 deletions core/extension/gdextension_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ typedef struct {

typedef void (*GDExtensionVariantFromTypeConstructorFunc)(GDExtensionUninitializedVariantPtr, GDExtensionTypePtr);
typedef void (*GDExtensionTypeFromVariantConstructorFunc)(GDExtensionUninitializedTypePtr, GDExtensionVariantPtr);
typedef void *(*GDExtensionVariantGetInternalPtrFunc)(GDExtensionVariantPtr);
typedef void (*GDExtensionPtrOperatorEvaluator)(GDExtensionConstTypePtr p_left, GDExtensionConstTypePtr p_right, GDExtensionTypePtr r_result);
typedef void (*GDExtensionPtrBuiltInMethod)(GDExtensionTypePtr p_base, const GDExtensionConstTypePtr *p_args, GDExtensionTypePtr r_return, int p_argument_count);
typedef void (*GDExtensionPtrConstructor)(GDExtensionUninitializedTypePtr p_base, const GDExtensionConstTypePtr *p_args);
Expand Down Expand Up @@ -1385,6 +1386,23 @@ typedef GDExtensionVariantFromTypeConstructorFunc (*GDExtensionInterfaceGetVaria
*/
typedef GDExtensionTypeFromVariantConstructorFunc (*GDExtensionInterfaceGetVariantToTypeConstructor)(GDExtensionVariantType p_type);

/**
* @name variant_get_ptr_internal_getter
* @since 4.4
*
* Provides a function pointer for retrieving a pointer to a variant's internal value.
* Access to a variant's internal value can be used to modify it in-place, or to retrieve its value without the overhead of variant conversion functions.
* It is recommended to cache the getter for all variant types in a function table to avoid retrieval overhead upon use.
*
* @note Each function assumes the variant's type has already been determined and matches the function.
* Invoking the function with a variant of a mismatched type has undefined behavior, and may lead to a segmentation fault.
*
* @param p_type The Variant type.
*
* @return A pointer to a type-specific function that returns a pointer to the internal value of a variant. Check the implementation of this function (gdextension_variant_get_ptr_internal_getter) for pointee type info of each variant type.
*/
typedef GDExtensionVariantGetInternalPtrFunc (*GDExtensionInterfaceGetVariantGetInternalPtrFunc)(GDExtensionVariantType p_type);

/**
* @name variant_get_ptr_operator_evaluator
* @since 4.1
Expand Down
8 changes: 5 additions & 3 deletions core/input/input_map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -521,12 +521,15 @@ const HashMap<String, List<Ref<InputEvent>>> &InputMap::get_builtins() {
default_builtin_cache.insert("ui_text_completion_query", inputs);

inputs = List<Ref<InputEvent>>();
inputs.push_back(InputEventKey::create_reference(Key::ENTER));
inputs.push_back(InputEventKey::create_reference(Key::KP_ENTER));
inputs.push_back(InputEventKey::create_reference(KeyModifierMask::SHIFT | Key::TAB));
inputs.push_back(InputEventKey::create_reference(KeyModifierMask::SHIFT | Key::ENTER));
inputs.push_back(InputEventKey::create_reference(KeyModifierMask::SHIFT | Key::KP_ENTER));
default_builtin_cache.insert("ui_text_completion_accept", inputs);

inputs = List<Ref<InputEvent>>();
inputs.push_back(InputEventKey::create_reference(Key::TAB));
inputs.push_back(InputEventKey::create_reference(Key::ENTER));
inputs.push_back(InputEventKey::create_reference(Key::KP_ENTER));
default_builtin_cache.insert("ui_text_completion_replace", inputs);

// Newlines
Expand All @@ -536,7 +539,6 @@ const HashMap<String, List<Ref<InputEvent>>> &InputMap::get_builtins() {
default_builtin_cache.insert("ui_text_newline", inputs);

inputs = List<Ref<InputEvent>>();

inputs.push_back(InputEventKey::create_reference(Key::ENTER | KeyModifierMask::CMD_OR_CTRL));
inputs.push_back(InputEventKey::create_reference(Key::KP_ENTER | KeyModifierMask::CMD_OR_CTRL));
default_builtin_cache.insert("ui_text_newline_blank", inputs);
Expand Down
12 changes: 4 additions & 8 deletions core/math/projection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -914,14 +914,10 @@ void Projection::set_light_atlas_rect(const Rect2 &p_rect) {
}

Projection::operator String() const {
String str;
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 4; j++) {
str += String((j > 0) ? ", " : "\n") + rtos(columns[i][j]);
}
}

return str;
return "[X: " + columns[0].operator String() +
", Y: " + columns[1].operator String() +
", Z: " + columns[2].operator String() +
", W: " + columns[3].operator String() + "]";
}

real_t Projection::get_aspect() const {
Expand Down
9 changes: 7 additions & 2 deletions core/os/os.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -538,9 +538,14 @@ bool OS::has_feature(const String &p_feature) {
return true;
}

if (has_server_feature_callback && has_server_feature_callback(p_feature)) {
return true;
if (has_server_feature_callback) {
return has_server_feature_callback(p_feature);
}
#ifdef DEBUG_ENABLED
else if (is_stdout_verbose()) {
WARN_PRINT_ONCE("Server features cannot be checked before RenderingServer has been created. If you are checking a server feature, consider moving your OS::has_feature call after INITIALIZATION_LEVEL_SERVERS.");
}
#endif

if (ProjectSettings::get_singleton()->has_custom_feature(p_feature)) {
return true;
Expand Down
Loading