diff options
-rw-r--r-- | core/array.cpp | 1 | ||||
-rw-r--r-- | doc/classes/SurfaceTool.xml | 11 | ||||
-rw-r--r-- | modules/mono/editor/GodotSharpTools/Editor/GodotSharpExport.cs | 6 | ||||
-rw-r--r-- | servers/audio_server.cpp | 1 |
4 files changed, 14 insertions, 5 deletions
diff --git a/core/array.cpp b/core/array.cpp index 9f09ddbe15..9708452850 100644 --- a/core/array.cpp +++ b/core/array.cpp @@ -258,7 +258,6 @@ struct _ArrayVariantSortCustom { Array &Array::sort_custom(Object *p_obj, const StringName &p_function) { ERR_FAIL_NULL_V(p_obj, *this); - ERR_FAIL_COND_V(!p_obj->has_method(p_function), *this); SortArray<Variant, _ArrayVariantSortCustom, true> avs; avs.compare.obj = p_obj; diff --git a/doc/classes/SurfaceTool.xml b/doc/classes/SurfaceTool.xml index deda7bc292..4f9ac68e47 100644 --- a/doc/classes/SurfaceTool.xml +++ b/doc/classes/SurfaceTool.xml @@ -14,6 +14,7 @@ [/codeblock] The [code]SurfaceTool[/code] now contains one vertex of a triangle which has a UV coordinate and a specified [Color]. If another vertex were added without calls to [method add_uv] or [method add_color] then the last values would be used. It is very important that vertex attributes are passed [b]before[/b] the call to [method add_vertex], failure to do this will result in an error when committing the vertex information to a mesh. + Additionally, the attributes used before the first vertex is added determine the format of the mesh. For example if you only add UVs to the first vertex, you cannot add color to any of the subsequent vertices. </description> <tutorials> </tutorials> @@ -26,7 +27,7 @@ <argument index="0" name="bones" type="PoolIntArray"> </argument> <description> - Add an array of bones for the next Vertex to use. + Add an array of bones for the next Vertex to use. Array must contain 4 integers. </description> </method> <method name="add_color"> @@ -99,6 +100,7 @@ </argument> <description> Insert a triangle fan made of array data into [Mesh] being constructed. + Requires primitive type be set to [code]PRIMITIVE_TRIANGLES[/code]. </description> </method> <method name="add_uv"> @@ -134,7 +136,7 @@ <argument index="0" name="weights" type="PoolRealArray"> </argument> <description> - Specify weight value for next Vertex to use. + Specify weight values for next Vertex to use. Array must contain 4 values. </description> </method> <method name="append_from"> @@ -147,6 +149,7 @@ <argument index="2" name="transform" type="Transform"> </argument> <description> + Append vertices from a given [Mesh] surface onto the current vertex array with specified [Transform]. </description> </method> <method name="begin"> @@ -184,6 +187,7 @@ <argument index="1" name="surface" type="int"> </argument> <description> + Creates a vertex array from an existing [Mesh]. </description> </method> <method name="deindex"> @@ -201,12 +205,15 @@ <description> Generates normals from Vertices so you do not have to do it manually. Setting "flip" [code]true[/code] inverts resulting normals. + Requires primitive type to be set to [code]PRIMITIVE_TRIANGLES[/code]. </description> </method> <method name="generate_tangents"> <return type="void"> </return> <description> + Generates a tangent vector for each vertex. + Requires that each vertex have UVs and normals set already. </description> </method> <method name="index"> diff --git a/modules/mono/editor/GodotSharpTools/Editor/GodotSharpExport.cs b/modules/mono/editor/GodotSharpTools/Editor/GodotSharpExport.cs index 9f0d562ef7..5fd708d539 100644 --- a/modules/mono/editor/GodotSharpTools/Editor/GodotSharpExport.cs +++ b/modules/mono/editor/GodotSharpTools/Editor/GodotSharpExport.cs @@ -41,9 +41,11 @@ namespace GodotSharpTools.Editor string outputDataDir = Path.Combine(outputDir, GetDataDirName()); - Directory.Delete(outputDataDir, recursive: true); // Clean first + if (Directory.Exists(outputDataDir)) + Directory.Delete(outputDataDir, recursive: true); // Clean first + Directory.CreateDirectory(outputDataDir); - + foreach (string dir in Directory.GetDirectories(templateDirPath, "*", SearchOption.AllDirectories)) { Directory.CreateDirectory(Path.Combine(outputDataDir, dir.Substring(templateDirPath.Length + 1))); diff --git a/servers/audio_server.cpp b/servers/audio_server.cpp index fead2f54da..d36057b465 100644 --- a/servers/audio_server.cpp +++ b/servers/audio_server.cpp @@ -1297,6 +1297,7 @@ void AudioServer::_bind_methods() { ADD_SIGNAL(MethodInfo("bus_layout_changed")); BIND_ENUM_CONSTANT(SPEAKER_MODE_STEREO); + BIND_ENUM_CONSTANT(SPEAKER_SURROUND_31); BIND_ENUM_CONSTANT(SPEAKER_SURROUND_51); BIND_ENUM_CONSTANT(SPEAKER_SURROUND_71); } |