diff options
18 files changed, 108 insertions, 56 deletions
diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml index b9c8ab0f6c..70ce4ad516 100644 --- a/doc/classes/ArrayMesh.xml +++ b/doc/classes/ArrayMesh.xml @@ -102,13 +102,13 @@ <param index="0" name="transform" type="Transform3D" /> <param index="1" name="texel_size" type="float" /> <description> - Will perform a UV unwrap on the [ArrayMesh] to prepare the mesh for lightmapping. + Performs a UV unwrap on the [ArrayMesh] to prepare the mesh for lightmapping. </description> </method> <method name="regen_normal_maps"> <return type="void" /> <description> - Will regenerate normal maps for the [ArrayMesh]. + Regenerates tangents for each of the [ArrayMesh]'s surfaces. </description> </method> <method name="set_blend_shape_name"> diff --git a/doc/classes/PhysicsServer2D.xml b/doc/classes/PhysicsServer2D.xml index 18ac8a11df..2d25965180 100644 --- a/doc/classes/PhysicsServer2D.xml +++ b/doc/classes/PhysicsServer2D.xml @@ -736,6 +736,14 @@ <description> </description> </method> + <method name="joint_disable_collisions_between_bodies"> + <return type="void" /> + <param index="0" name="joint" type="RID" /> + <param index="1" name="disable" type="bool" /> + <description> + Sets whether the bodies attached to the [Joint2D] will collide with each other. + </description> + </method> <method name="joint_get_param" qualifiers="const"> <return type="float" /> <param index="0" name="joint" type="RID" /> @@ -751,6 +759,13 @@ Returns a joint's type (see [enum JointType]). </description> </method> + <method name="joint_is_disabled_collisions_between_bodies" qualifiers="const"> + <return type="bool" /> + <param index="0" name="joint" type="RID" /> + <description> + Returns whether the bodies attached to the [Joint2D] will collide with each other. + </description> + </method> <method name="joint_make_damped_spring"> <return type="void" /> <param index="0" name="joint" type="RID" /> diff --git a/doc/classes/PhysicsServer3D.xml b/doc/classes/PhysicsServer3D.xml index 95f7fb69a2..e62bda0dd3 100644 --- a/doc/classes/PhysicsServer3D.xml +++ b/doc/classes/PhysicsServer3D.xml @@ -815,6 +815,14 @@ <description> </description> </method> + <method name="joint_disable_collisions_between_bodies"> + <return type="void" /> + <param index="0" name="joint" type="RID" /> + <param index="1" name="disable" type="bool" /> + <description> + Sets whether the bodies attached to the [Joint3D] will collide with each other. + </description> + </method> <method name="joint_get_solver_priority" qualifiers="const"> <return type="int" /> <param index="0" name="joint" type="RID" /> @@ -829,6 +837,13 @@ Returns the type of the Joint3D. </description> </method> + <method name="joint_is_disabled_collisions_between_bodies" qualifiers="const"> + <return type="bool" /> + <param index="0" name="joint" type="RID" /> + <description> + Returns whether the bodies attached to the [Joint3D] will collide with each other. + </description> + </method> <method name="joint_make_cone_twist"> <return type="void" /> <param index="0" name="joint" type="RID" /> diff --git a/doc/classes/PhysicsServer3DExtension.xml b/doc/classes/PhysicsServer3DExtension.xml index 1e9df54de5..d45cb17510 100644 --- a/doc/classes/PhysicsServer3DExtension.xml +++ b/doc/classes/PhysicsServer3DExtension.xml @@ -772,6 +772,13 @@ <description> </description> </method> + <method name="_joint_disable_collisions_between_bodies" qualifiers="virtual"> + <return type="void" /> + <param index="0" name="joint" type="RID" /> + <param index="1" name="disable" type="bool" /> + <description> + </description> + </method> <method name="_joint_get_solver_priority" qualifiers="virtual const"> <return type="int" /> <param index="0" name="joint" type="RID" /> @@ -784,6 +791,12 @@ <description> </description> </method> + <method name="_joint_is_disabled_collisions_between_bodies" qualifiers="virtual const"> + <return type="bool" /> + <param index="0" name="joint" type="RID" /> + <description> + </description> + </method> <method name="_joint_make_cone_twist" qualifiers="virtual"> <return type="void" /> <param index="0" name="joint" type="RID" /> diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp index eca53c4831..26739bcdea 100644 --- a/modules/mono/csharp_script.cpp +++ b/modules/mono/csharp_script.cpp @@ -451,7 +451,7 @@ static String variant_type_to_managed_name(const String &p_var_type_name) { } if (p_var_type_name == Variant::get_type_name(Variant::SIGNAL)) { - return "SignalInfo"; + return "Signal"; } Variant::Type var_types[] = { diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ExtensionMethods.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ExtensionMethods.cs index d67e57edc2..8852b7ebad 100644 --- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ExtensionMethods.cs +++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ExtensionMethods.cs @@ -295,8 +295,8 @@ namespace Godot.SourceGenerators foreach (var property in properties) { // TODO: We should still restore read-only properties after reloading assembly. Two possible ways: reflection or turn RestoreGodotObjectData into a constructor overload. - // Ignore properties without a getter or without a setter. Godot properties must be both readable and writable. - if (property.IsWriteOnly || property.IsReadOnly) + // Ignore properties without a getter, without a setter or with an init-only setter. Godot properties must be both readable and writable. + if (property.IsWriteOnly || property.IsReadOnly || property.SetMethod!.IsInitOnly) continue; var marshalType = MarshalUtils.ConvertManagedTypeToMarshalType(property.Type, typeCache); diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/MarshalUtils.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/MarshalUtils.cs index 8b2f96036b..f0a6a72281 100644 --- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/MarshalUtils.cs +++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/MarshalUtils.cs @@ -311,12 +311,12 @@ namespace Godot.SourceGenerators inputExpr, ")"), // We need a special case for generic Godot collections and GodotObjectOrDerived[], because VariantUtils.ConvertTo<T> is slower MarshalType.GodotGenericDictionary => - source.Append(VariantUtils, ".ConvertToDictionaryObject<", + source.Append(VariantUtils, ".ConvertToDictionary<", ((INamedTypeSymbol)typeSymbol).TypeArguments[0].FullQualifiedNameIncludeGlobal(), ", ", ((INamedTypeSymbol)typeSymbol).TypeArguments[1].FullQualifiedNameIncludeGlobal(), ">(", inputExpr, ")"), MarshalType.GodotGenericArray => - source.Append(VariantUtils, ".ConvertToArrayObject<", + source.Append(VariantUtils, ".ConvertToArray<", ((INamedTypeSymbol)typeSymbol).TypeArguments[0].FullQualifiedNameIncludeGlobal(), ">(", inputExpr, ")"), _ => source.Append(VariantUtils, ".ConvertTo<", diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptPropertiesGenerator.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptPropertiesGenerator.cs index 6c4206a575..b64b843b7c 100644 --- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptPropertiesGenerator.cs +++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptPropertiesGenerator.cs @@ -158,7 +158,7 @@ namespace Godot.SourceGenerators // Generate SetGodotClassPropertyValue bool allPropertiesAreReadOnly = godotClassFields.All(fi => fi.FieldSymbol.IsReadOnly) && - godotClassProperties.All(pi => pi.PropertySymbol.IsReadOnly); + godotClassProperties.All(pi => pi.PropertySymbol.IsReadOnly || pi.PropertySymbol.SetMethod!.IsInitOnly); if (!allPropertiesAreReadOnly) { @@ -168,7 +168,7 @@ namespace Godot.SourceGenerators isFirstEntry = true; foreach (var property in godotClassProperties) { - if (property.PropertySymbol.IsReadOnly) + if (property.PropertySymbol.IsReadOnly || property.PropertySymbol.SetMethod!.IsInitOnly) continue; GeneratePropertySetter(property.PropertySymbol.Name, @@ -407,7 +407,7 @@ namespace Godot.SourceGenerators return null; } - if (propertySymbol.SetMethod == null) + if (propertySymbol.SetMethod == null || propertySymbol.SetMethod.IsInitOnly) { // This should never happen, as we filtered ReadOnly properties, but just in case. Common.ReportExportedMemberIsReadOnly(context, propertySymbol); diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptPropertyDefValGenerator.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptPropertyDefValGenerator.cs index aa9dd9583e..99a4c95e73 100644 --- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptPropertyDefValGenerator.cs +++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptPropertyDefValGenerator.cs @@ -138,14 +138,14 @@ namespace Godot.SourceGenerators } // TODO: We should still restore read-only properties after reloading assembly. Two possible ways: reflection or turn RestoreGodotObjectData into a constructor overload. - // Ignore properties without a getter or without a setter. Godot properties must be both readable and writable. + // Ignore properties without a getter, without a setter or with an init-only setter. Godot properties must be both readable and writable. if (property.IsWriteOnly) { Common.ReportExportedMemberIsWriteOnly(context, property); continue; } - if (property.IsReadOnly) + if (property.IsReadOnly || property.SetMethod!.IsInitOnly) { Common.ReportExportedMemberIsReadOnly(context, property); continue; diff --git a/modules/mono/editor/bindings_generator.cpp b/modules/mono/editor/bindings_generator.cpp index 6559cbf75d..6cfdb15627 100644 --- a/modules/mono/editor/bindings_generator.cpp +++ b/modules/mono/editor/bindings_generator.cpp @@ -3650,7 +3650,7 @@ void BindingsGenerator::_populate_builtin_type_interfaces() { itype = TypeInterface(); itype.name = "Signal"; itype.cname = itype.name; - itype.proxy_name = "SignalInfo"; + itype.proxy_name = "Signal"; itype.cs_type = itype.proxy_name; itype.cs_in_expr = "%0"; itype.c_in = "%5using %0 %1_in = " C_METHOD_MANAGED_TO_SIGNAL "(in %1);\n"; @@ -3732,7 +3732,7 @@ void BindingsGenerator::_populate_builtin_type_interfaces() { itype.cname = itype.name; itype.cs_out = "%5return new %2(%0(%1));"; // For generic Godot collections, Variant.From<T>/As<T> is slower, so we need this special case - itype.cs_variant_to_managed = "VariantUtils.ConvertToArrayObject(%0)"; + itype.cs_variant_to_managed = "VariantUtils.ConvertToArray(%0)"; itype.cs_managed_to_variant = "VariantUtils.CreateFromArray(%0)"; builtin_types.insert(itype.cname, itype); @@ -3759,7 +3759,7 @@ void BindingsGenerator::_populate_builtin_type_interfaces() { itype.cname = itype.name; itype.cs_out = "%5return new %2(%0(%1));"; // For generic Godot collections, Variant.From<T>/As<T> is slower, so we need this special case - itype.cs_variant_to_managed = "VariantUtils.ConvertToDictionaryObject(%0)"; + itype.cs_variant_to_managed = "VariantUtils.ConvertToDictionary(%0)"; itype.cs_managed_to_variant = "VariantUtils.CreateFromDictionary(%0)"; builtin_types.insert(itype.cname, itype); diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Array.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Array.cs index 130776499b..df306e5244 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Array.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Array.cs @@ -499,7 +499,7 @@ namespace Godot.Collections VariantUtils.CreateFromArray(godotArray); private static Array<T> FromVariantFunc(in godot_variant variant) => - VariantUtils.ConvertToArrayObject<T>(variant); + VariantUtils.ConvertToArray<T>(variant); static unsafe Array() { diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Dictionary.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Dictionary.cs index cf25e1f0ae..b5a8742d3d 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Dictionary.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Dictionary.cs @@ -366,7 +366,7 @@ namespace Godot.Collections VariantUtils.CreateFromDictionary(godotDictionary); private static Dictionary<TKey, TValue> FromVariantFunc(in godot_variant variant) => - VariantUtils.ConvertToDictionaryObject<TKey, TValue>(variant); + VariantUtils.ConvertToDictionary<TKey, TValue>(variant); static unsafe Dictionary() { diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/VariantUtils.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/VariantUtils.cs index 6a4717f2c3..f65f926b22 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/VariantUtils.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/VariantUtils.cs @@ -436,7 +436,7 @@ namespace Godot.NativeInterop public static Godot.Object ConvertToGodotObject(in godot_variant p_var) => InteropUtils.UnmanagedGetManaged(ConvertToGodotObjectPtr(p_var)); - public static string ConvertToStringObject(in godot_variant p_var) + public static string ConvertToString(in godot_variant p_var) { switch (p_var.Type) { @@ -455,65 +455,65 @@ namespace Godot.NativeInterop } } - public static godot_string_name ConvertToStringName(in godot_variant p_var) + public static godot_string_name ConvertToNativeStringName(in godot_variant p_var) => p_var.Type == Variant.Type.StringName ? NativeFuncs.godotsharp_string_name_new_copy(p_var.StringName) : NativeFuncs.godotsharp_variant_as_string_name(p_var); [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static StringName ConvertToStringNameObject(in godot_variant p_var) - => StringName.CreateTakingOwnershipOfDisposableValue(ConvertToStringName(p_var)); + public static StringName ConvertToStringName(in godot_variant p_var) + => StringName.CreateTakingOwnershipOfDisposableValue(ConvertToNativeStringName(p_var)); - public static godot_node_path ConvertToNodePath(in godot_variant p_var) + public static godot_node_path ConvertToNativeNodePath(in godot_variant p_var) => p_var.Type == Variant.Type.NodePath ? NativeFuncs.godotsharp_node_path_new_copy(p_var.NodePath) : NativeFuncs.godotsharp_variant_as_node_path(p_var); [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static NodePath ConvertToNodePathObject(in godot_variant p_var) - => NodePath.CreateTakingOwnershipOfDisposableValue(ConvertToNodePath(p_var)); + public static NodePath ConvertToNodePath(in godot_variant p_var) + => NodePath.CreateTakingOwnershipOfDisposableValue(ConvertToNativeNodePath(p_var)); [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static godot_callable ConvertToCallable(in godot_variant p_var) + public static godot_callable ConvertToNativeCallable(in godot_variant p_var) => NativeFuncs.godotsharp_variant_as_callable(p_var); [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Callable ConvertToCallableManaged(in godot_variant p_var) - => Marshaling.ConvertCallableToManaged(ConvertToCallable(p_var)); + public static Callable ConvertToCallable(in godot_variant p_var) + => Marshaling.ConvertCallableToManaged(ConvertToNativeCallable(p_var)); [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static godot_signal ConvertToSignal(in godot_variant p_var) + public static godot_signal ConvertToNativeSignal(in godot_variant p_var) => NativeFuncs.godotsharp_variant_as_signal(p_var); [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Signal ConvertToSignalManaged(in godot_variant p_var) - => Marshaling.ConvertSignalToManaged(ConvertToSignal(p_var)); + public static Signal ConvertToSignal(in godot_variant p_var) + => Marshaling.ConvertSignalToManaged(ConvertToNativeSignal(p_var)); - public static godot_array ConvertToArray(in godot_variant p_var) + public static godot_array ConvertToNativeArray(in godot_variant p_var) => p_var.Type == Variant.Type.Array ? NativeFuncs.godotsharp_array_new_copy(p_var.Array) : NativeFuncs.godotsharp_variant_as_array(p_var); [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Collections.Array ConvertToArrayObject(in godot_variant p_var) - => Collections.Array.CreateTakingOwnershipOfDisposableValue(ConvertToArray(p_var)); + public static Collections.Array ConvertToArray(in godot_variant p_var) + => Collections.Array.CreateTakingOwnershipOfDisposableValue(ConvertToNativeArray(p_var)); [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Array<T> ConvertToArrayObject<T>(in godot_variant p_var) - => Array<T>.CreateTakingOwnershipOfDisposableValue(ConvertToArray(p_var)); + public static Array<T> ConvertToArray<T>(in godot_variant p_var) + => Array<T>.CreateTakingOwnershipOfDisposableValue(ConvertToNativeArray(p_var)); - public static godot_dictionary ConvertToDictionary(in godot_variant p_var) + public static godot_dictionary ConvertToNativeDictionary(in godot_variant p_var) => p_var.Type == Variant.Type.Dictionary ? NativeFuncs.godotsharp_dictionary_new_copy(p_var.Dictionary) : NativeFuncs.godotsharp_variant_as_dictionary(p_var); [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Dictionary ConvertToDictionaryObject(in godot_variant p_var) - => Dictionary.CreateTakingOwnershipOfDisposableValue(ConvertToDictionary(p_var)); + public static Dictionary ConvertToDictionary(in godot_variant p_var) + => Dictionary.CreateTakingOwnershipOfDisposableValue(ConvertToNativeDictionary(p_var)); [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Dictionary<TKey, TValue> ConvertToDictionaryObject<TKey, TValue>(in godot_variant p_var) - => Dictionary<TKey, TValue>.CreateTakingOwnershipOfDisposableValue(ConvertToDictionary(p_var)); + public static Dictionary<TKey, TValue> ConvertToDictionary<TKey, TValue>(in godot_variant p_var) + => Dictionary<TKey, TValue>.CreateTakingOwnershipOfDisposableValue(ConvertToNativeDictionary(p_var)); public static byte[] ConvertAsPackedByteArrayToSystemArray(in godot_variant p_var) { diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/VariantUtils.generic.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/VariantUtils.generic.cs index ebfc713ee4..3d64533269 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/VariantUtils.generic.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/VariantUtils.generic.cs @@ -315,13 +315,13 @@ public partial class VariantUtils return UnsafeAsT(ConvertToPlane(variant)); if (typeof(T) == typeof(Callable)) - return UnsafeAsT(ConvertToCallableManaged(variant)); + return UnsafeAsT(ConvertToCallable(variant)); if (typeof(T) == typeof(Signal)) - return UnsafeAsT(ConvertToSignalManaged(variant)); + return UnsafeAsT(ConvertToSignal(variant)); if (typeof(T) == typeof(string)) - return UnsafeAsT(ConvertToStringObject(variant)); + return UnsafeAsT(ConvertToString(variant)); if (typeof(T) == typeof(byte[])) return UnsafeAsT(ConvertAsPackedByteArrayToSystemArray(variant)); @@ -360,19 +360,19 @@ public partial class VariantUtils return UnsafeAsT(ConvertToSystemArrayOfRID(variant)); if (typeof(T) == typeof(StringName)) - return UnsafeAsT(ConvertToStringNameObject(variant)); + return UnsafeAsT(ConvertToStringName(variant)); if (typeof(T) == typeof(NodePath)) - return UnsafeAsT(ConvertToNodePathObject(variant)); + return UnsafeAsT(ConvertToNodePath(variant)); if (typeof(T) == typeof(RID)) return UnsafeAsT(ConvertToRID(variant)); if (typeof(T) == typeof(Godot.Collections.Dictionary)) - return UnsafeAsT(ConvertToDictionaryObject(variant)); + return UnsafeAsT(ConvertToDictionary(variant)); if (typeof(T) == typeof(Godot.Collections.Array)) - return UnsafeAsT(ConvertToArrayObject(variant)); + return UnsafeAsT(ConvertToArray(variant)); if (typeof(T) == typeof(Variant)) return UnsafeAsT(Variant.CreateCopyingBorrowed(variant)); diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Variant.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Variant.cs index c4c53a39f9..da12309217 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Variant.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Variant.cs @@ -212,7 +212,7 @@ public partial struct Variant : IDisposable [MethodImpl(MethodImplOptions.AggressiveInlining)] public string AsString() => - VariantUtils.ConvertToStringObject((godot_variant)NativeVar); + VariantUtils.ConvertToString((godot_variant)NativeVar); [MethodImpl(MethodImplOptions.AggressiveInlining)] public Vector2 AsVector2() => @@ -280,11 +280,11 @@ public partial struct Variant : IDisposable [MethodImpl(MethodImplOptions.AggressiveInlining)] public Callable AsCallable() => - VariantUtils.ConvertToCallableManaged((godot_variant)NativeVar); + VariantUtils.ConvertToCallable((godot_variant)NativeVar); [MethodImpl(MethodImplOptions.AggressiveInlining)] public Signal AsSignal() => - VariantUtils.ConvertToSignalManaged((godot_variant)NativeVar); + VariantUtils.ConvertToSignal((godot_variant)NativeVar); [MethodImpl(MethodImplOptions.AggressiveInlining)] public byte[] AsByteArray() => @@ -329,11 +329,11 @@ public partial struct Variant : IDisposable [MethodImpl(MethodImplOptions.AggressiveInlining)] public Collections.Dictionary<TKey, TValue> AsGodotDictionary<TKey, TValue>() => - VariantUtils.ConvertToDictionaryObject<TKey, TValue>((godot_variant)NativeVar); + VariantUtils.ConvertToDictionary<TKey, TValue>((godot_variant)NativeVar); [MethodImpl(MethodImplOptions.AggressiveInlining)] public Collections.Array<T> AsGodotArray<T>() => - VariantUtils.ConvertToArrayObject<T>((godot_variant)NativeVar); + VariantUtils.ConvertToArray<T>((godot_variant)NativeVar); [MethodImpl(MethodImplOptions.AggressiveInlining)] public StringName[] AsSystemArrayOfStringName() => @@ -353,11 +353,11 @@ public partial struct Variant : IDisposable [MethodImpl(MethodImplOptions.AggressiveInlining)] public StringName AsStringName() => - VariantUtils.ConvertToStringNameObject((godot_variant)NativeVar); + VariantUtils.ConvertToStringName((godot_variant)NativeVar); [MethodImpl(MethodImplOptions.AggressiveInlining)] public NodePath AsNodePath() => - VariantUtils.ConvertToNodePathObject((godot_variant)NativeVar); + VariantUtils.ConvertToNodePath((godot_variant)NativeVar); [MethodImpl(MethodImplOptions.AggressiveInlining)] public RID AsRID() => @@ -365,11 +365,11 @@ public partial struct Variant : IDisposable [MethodImpl(MethodImplOptions.AggressiveInlining)] public Collections.Dictionary AsGodotDictionary() => - VariantUtils.ConvertToDictionaryObject((godot_variant)NativeVar); + VariantUtils.ConvertToDictionary((godot_variant)NativeVar); [MethodImpl(MethodImplOptions.AggressiveInlining)] public Collections.Array AsGodotArray() => - VariantUtils.ConvertToArrayObject((godot_variant)NativeVar); + VariantUtils.ConvertToArray((godot_variant)NativeVar); // Explicit conversion operators to supported types diff --git a/servers/extensions/physics_server_3d_extension.cpp b/servers/extensions/physics_server_3d_extension.cpp index 811ff231fc..4ed2bb49d4 100644 --- a/servers/extensions/physics_server_3d_extension.cpp +++ b/servers/extensions/physics_server_3d_extension.cpp @@ -400,6 +400,9 @@ void PhysicsServer3DExtension::_bind_methods() { GDVIRTUAL_BIND(_joint_set_solver_priority, "joint", "priority"); GDVIRTUAL_BIND(_joint_get_solver_priority, "joint"); + GDVIRTUAL_BIND(_joint_disable_collisions_between_bodies, "joint", "disable"); + GDVIRTUAL_BIND(_joint_is_disabled_collisions_between_bodies, "joint"); + GDVIRTUAL_BIND(_free_rid, "rid"); GDVIRTUAL_BIND(_set_active, "active"); diff --git a/servers/physics_server_2d.cpp b/servers/physics_server_2d.cpp index c5a93cc390..20f23ae031 100644 --- a/servers/physics_server_2d.cpp +++ b/servers/physics_server_2d.cpp @@ -765,6 +765,9 @@ void PhysicsServer2D::_bind_methods() { ClassDB::bind_method(D_METHOD("joint_set_param", "joint", "param", "value"), &PhysicsServer2D::joint_set_param); ClassDB::bind_method(D_METHOD("joint_get_param", "joint", "param"), &PhysicsServer2D::joint_get_param); + ClassDB::bind_method(D_METHOD("joint_disable_collisions_between_bodies", "joint", "disable"), &PhysicsServer2D::joint_disable_collisions_between_bodies); + ClassDB::bind_method(D_METHOD("joint_is_disabled_collisions_between_bodies", "joint"), &PhysicsServer2D::joint_is_disabled_collisions_between_bodies); + ClassDB::bind_method(D_METHOD("joint_make_pin", "joint", "anchor", "body_a", "body_b"), &PhysicsServer2D::joint_make_pin, DEFVAL(RID())); ClassDB::bind_method(D_METHOD("joint_make_groove", "joint", "groove1_a", "groove2_a", "anchor_b", "body_a", "body_b"), &PhysicsServer2D::joint_make_groove, DEFVAL(RID()), DEFVAL(RID())); ClassDB::bind_method(D_METHOD("joint_make_damped_spring", "joint", "anchor_a", "anchor_b", "body_a", "body_b"), &PhysicsServer2D::joint_make_damped_spring, DEFVAL(RID())); diff --git a/servers/physics_server_3d.cpp b/servers/physics_server_3d.cpp index aecb687d5f..25912e9aca 100644 --- a/servers/physics_server_3d.cpp +++ b/servers/physics_server_3d.cpp @@ -943,6 +943,9 @@ void PhysicsServer3D::_bind_methods() { ClassDB::bind_method(D_METHOD("joint_set_solver_priority", "joint", "priority"), &PhysicsServer3D::joint_set_solver_priority); ClassDB::bind_method(D_METHOD("joint_get_solver_priority", "joint"), &PhysicsServer3D::joint_get_solver_priority); + ClassDB::bind_method(D_METHOD("joint_disable_collisions_between_bodies", "joint", "disable"), &PhysicsServer3D::joint_disable_collisions_between_bodies); + ClassDB::bind_method(D_METHOD("joint_is_disabled_collisions_between_bodies", "joint"), &PhysicsServer3D::joint_is_disabled_collisions_between_bodies); + ClassDB::bind_method(D_METHOD("joint_make_generic_6dof", "joint", "body_A", "local_ref_A", "body_B", "local_ref_B"), &PhysicsServer3D::joint_make_generic_6dof); ClassDB::bind_method(D_METHOD("generic_6dof_joint_set_param", "joint", "axis", "param", "value"), &PhysicsServer3D::generic_6dof_joint_set_param); |