diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/astcenc/SCsub | 1 | ||||
-rw-r--r-- | modules/csg/csg.cpp | 135 | ||||
-rw-r--r-- | modules/csg/csg.h | 17 | ||||
-rw-r--r-- | modules/csg/csg_shape.cpp | 2 | ||||
-rw-r--r-- | modules/csg/doc_classes/CSGShape3D.xml | 2 | ||||
-rw-r--r-- | modules/etcpak/image_compress_etcpak.cpp | 2 | ||||
-rw-r--r-- | modules/gdscript/doc_classes/@GDScript.xml | 3 | ||||
-rw-r--r-- | modules/gdscript/language_server/godot_lsp.h | 4 | ||||
-rw-r--r-- | modules/gltf/doc_classes/GLTFAccessor.xml | 2 | ||||
-rw-r--r-- | modules/gltf/editor/editor_scene_importer_blend.cpp | 4 | ||||
-rw-r--r-- | modules/gltf/structures/gltf_accessor.h | 2 | ||||
-rw-r--r-- | modules/noise/fastnoise_lite.cpp | 2 | ||||
-rw-r--r-- | modules/openxr/action_map/openxr_action_map.cpp | 4 | ||||
-rw-r--r-- | modules/openxr/extensions/openxr_htc_controller_extension.cpp | 3 | ||||
-rw-r--r-- | modules/text_server_adv/SCsub | 6 | ||||
-rw-r--r-- | modules/text_server_fb/SCsub | 6 |
16 files changed, 143 insertions, 52 deletions
diff --git a/modules/astcenc/SCsub b/modules/astcenc/SCsub index 0f04f2bc28..691c74b4a7 100644 --- a/modules/astcenc/SCsub +++ b/modules/astcenc/SCsub @@ -29,7 +29,6 @@ thirdparty_sources = [ "astcenc_partition_tables.cpp", "astcenc_percentile_tables.cpp", "astcenc_pick_best_endpoint_format.cpp", - "astcenc_platform_isa_detection.cpp", "astcenc_quantization.cpp", "astcenc_symbolic_physical.cpp", "astcenc_weight_align.cpp", diff --git a/modules/csg/csg.cpp b/modules/csg/csg.cpp index dee95d1ac5..878664bb9c 100644 --- a/modules/csg/csg.cpp +++ b/modules/csg/csg.cpp @@ -467,7 +467,7 @@ void CSGBrushOperation::merge_brushes(Operation p_operation, const CSGBrush &p_b // Use a limit to speed up bvh and limit the depth. #define BVH_LIMIT 8 -int CSGBrushOperation::MeshMerge::_create_bvh(FaceBVH *facebvhptr, FaceBVH **facebvhptrptr, int p_from, int p_size, int p_depth, int &r_max_depth, int &r_max_alloc) { +int CSGBrushOperation::MeshMerge::_create_bvh(FaceBVH *r_facebvhptr, FaceBVH **r_facebvhptrptr, int p_from, int p_size, int p_depth, int &r_max_depth, int &r_max_alloc) { if (p_depth > r_max_depth) { r_max_depth = p_depth; } @@ -478,15 +478,15 @@ int CSGBrushOperation::MeshMerge::_create_bvh(FaceBVH *facebvhptr, FaceBVH **fac if (p_size <= BVH_LIMIT) { for (int i = 0; i < p_size - 1; i++) { - facebvhptrptr[p_from + i]->next = facebvhptrptr[p_from + i + 1] - facebvhptr; + r_facebvhptrptr[p_from + i]->next = r_facebvhptrptr[p_from + i + 1] - r_facebvhptr; } - return facebvhptrptr[p_from] - facebvhptr; + return r_facebvhptrptr[p_from] - r_facebvhptr; } AABB aabb; - aabb = facebvhptrptr[p_from]->aabb; + aabb = r_facebvhptrptr[p_from]->aabb; for (int i = 1; i < p_size; i++) { - aabb.merge_with(facebvhptrptr[p_from + i]->aabb); + aabb.merge_with(r_facebvhptrptr[p_from + i]->aabb); } int li = aabb.get_longest_axis_index(); @@ -494,28 +494,28 @@ int CSGBrushOperation::MeshMerge::_create_bvh(FaceBVH *facebvhptr, FaceBVH **fac switch (li) { case Vector3::AXIS_X: { SortArray<FaceBVH *, FaceBVHCmpX> sort_x; - sort_x.nth_element(0, p_size, p_size / 2, &facebvhptrptr[p_from]); + sort_x.nth_element(0, p_size, p_size / 2, &r_facebvhptrptr[p_from]); //sort_x.sort(&p_bb[p_from],p_size); } break; case Vector3::AXIS_Y: { SortArray<FaceBVH *, FaceBVHCmpY> sort_y; - sort_y.nth_element(0, p_size, p_size / 2, &facebvhptrptr[p_from]); + sort_y.nth_element(0, p_size, p_size / 2, &r_facebvhptrptr[p_from]); //sort_y.sort(&p_bb[p_from],p_size); } break; case Vector3::AXIS_Z: { SortArray<FaceBVH *, FaceBVHCmpZ> sort_z; - sort_z.nth_element(0, p_size, p_size / 2, &facebvhptrptr[p_from]); + sort_z.nth_element(0, p_size, p_size / 2, &r_facebvhptrptr[p_from]); //sort_z.sort(&p_bb[p_from],p_size); } break; } - int left = _create_bvh(facebvhptr, facebvhptrptr, p_from, p_size / 2, p_depth + 1, r_max_depth, r_max_alloc); - int right = _create_bvh(facebvhptr, facebvhptrptr, p_from + p_size / 2, p_size - p_size / 2, p_depth + 1, r_max_depth, r_max_alloc); + int left = _create_bvh(r_facebvhptr, r_facebvhptrptr, p_from, p_size / 2, p_depth + 1, r_max_depth, r_max_alloc); + int right = _create_bvh(r_facebvhptr, r_facebvhptrptr, p_from + p_size / 2, p_size - p_size / 2, p_depth + 1, r_max_depth, r_max_alloc); int index = r_max_alloc++; - FaceBVH *_new = &facebvhptr[index]; + FaceBVH *_new = &r_facebvhptr[index]; _new->aabb = aabb; _new->center = aabb.get_center(); _new->face = -1; @@ -526,20 +526,22 @@ int CSGBrushOperation::MeshMerge::_create_bvh(FaceBVH *facebvhptr, FaceBVH **fac return index; } -void CSGBrushOperation::MeshMerge::_add_distance(List<real_t> &r_intersectionsA, List<real_t> &r_intersectionsB, bool p_from_B, real_t p_distance) const { - List<real_t> &intersections = p_from_B ? r_intersectionsB : r_intersectionsA; +void CSGBrushOperation::MeshMerge::_add_distance(List<IntersectionDistance> &r_intersectionsA, List<IntersectionDistance> &r_intersectionsB, bool p_from_B, real_t p_distance_squared, bool p_is_conormal) const { + List<IntersectionDistance> &intersections = p_from_B ? r_intersectionsB : r_intersectionsA; // Check if distance exists. - for (const real_t E : intersections) { - if (Math::is_equal_approx(E, p_distance)) { + for (const IntersectionDistance E : intersections) { + if (E.is_conormal == p_is_conormal && Math::is_equal_approx(E.distance_squared, p_distance_squared)) { return; } } - - intersections.push_back(p_distance); + IntersectionDistance distance; + distance.is_conormal = p_is_conormal; + distance.distance_squared = p_distance_squared; + intersections.push_back(distance); } -bool CSGBrushOperation::MeshMerge::_bvh_inside(FaceBVH *facebvhptr, int p_max_depth, int p_bvh_first, int p_face_idx) const { +bool CSGBrushOperation::MeshMerge::_bvh_inside(FaceBVH *r_facebvhptr, int p_max_depth, int p_bvh_first, int p_face_idx) const { Face face = faces[p_face_idx]; Vector3 face_points[3] = { points[face.points[0]], @@ -561,8 +563,11 @@ bool CSGBrushOperation::MeshMerge::_bvh_inside(FaceBVH *facebvhptr, int p_max_de VISITED_BIT_MASK = ~NODE_IDX_MASK }; - List<real_t> intersectionsA; - List<real_t> intersectionsB; + List<IntersectionDistance> intersectionsA; + List<IntersectionDistance> intersectionsB; + + Intersection closest_intersection; + closest_intersection.found = false; int level = 0; int pos = p_bvh_first; @@ -570,7 +575,7 @@ bool CSGBrushOperation::MeshMerge::_bvh_inside(FaceBVH *facebvhptr, int p_max_de while (true) { uint32_t node = stack[level] & NODE_IDX_MASK; - const FaceBVH *current_facebvhptr = &(facebvhptr[node]); + const FaceBVH *current_facebvhptr = &(r_facebvhptr[node]); bool done = false; switch (stack[level] >> VISITED_BIT_SHIFT) { @@ -587,22 +592,66 @@ bool CSGBrushOperation::MeshMerge::_bvh_inside(FaceBVH *facebvhptr, int p_max_de }; Vector3 current_normal = Plane(current_points[0], current_points[1], current_points[2]).normal; Vector3 intersection_point; - // Check if faces are co-planar. if (current_normal.is_equal_approx(face_normal) && is_point_in_triangle(face_center, current_points)) { // Only add an intersection if not a B face. if (!face.from_b) { - _add_distance(intersectionsA, intersectionsB, current_face.from_b, 0); + _add_distance(intersectionsA, intersectionsB, current_face.from_b, 0, true); } } else if (ray_intersects_triangle(face_center, face_normal, current_points, CMP_EPSILON, intersection_point)) { - real_t distance = face_center.distance_to(intersection_point); - _add_distance(intersectionsA, intersectionsB, current_face.from_b, distance); + real_t distance_squared = face_center.distance_squared_to(intersection_point); + real_t inner = current_normal.dot(face_normal); + // If the faces are perpendicular, ignore this face. + // The triangles on the side should be intersected and result in the correct behavior. + if (!Math::is_zero_approx(inner)) { + _add_distance(intersectionsA, intersectionsB, current_face.from_b, distance_squared, inner > 0.0f); + } + } + + if (face.from_b != current_face.from_b) { + if (current_normal.is_equal_approx(face_normal) && + is_point_in_triangle(face_center, current_points)) { + // Only add an intersection if not a B face. + if (!face.from_b) { + closest_intersection.found = true; + closest_intersection.conormal = 1.0f; + closest_intersection.distance_squared = 0.0f; + closest_intersection.origin_angle = -FLT_MAX; + } + } else if (ray_intersects_triangle(face_center, face_normal, current_points, CMP_EPSILON, intersection_point)) { + Intersection potential_intersection; + potential_intersection.found = true; + potential_intersection.conormal = face_normal.dot(current_normal); + potential_intersection.distance_squared = face_center.distance_squared_to(intersection_point); + potential_intersection.origin_angle = Math::abs(potential_intersection.conormal); + real_t intersection_dist_from_face = face_normal.dot(intersection_point - face_center); + for (int i = 0; i < 3; i++) { + real_t point_dist_from_face = face_normal.dot(current_points[i] - face_center); + if (!Math::is_equal_approx(point_dist_from_face, intersection_dist_from_face) && + point_dist_from_face < intersection_dist_from_face) { + potential_intersection.origin_angle = -potential_intersection.origin_angle; + break; + } + } + if (potential_intersection.conormal != 0.0f) { + if (!closest_intersection.found) { + closest_intersection = potential_intersection; + } else if (!Math::is_equal_approx(potential_intersection.distance_squared, closest_intersection.distance_squared) && + potential_intersection.distance_squared < closest_intersection.distance_squared) { + closest_intersection = potential_intersection; + } else if (Math::is_equal_approx(potential_intersection.distance_squared, closest_intersection.distance_squared)) { + if (potential_intersection.origin_angle < closest_intersection.origin_angle) { + closest_intersection = potential_intersection; + } + } + } + } } } if (current_facebvhptr->next != -1) { - current_facebvhptr = &facebvhptr[current_facebvhptr->next]; + current_facebvhptr = &r_facebvhptr[current_facebvhptr->next]; } else { current_facebvhptr = nullptr; } @@ -652,8 +701,11 @@ bool CSGBrushOperation::MeshMerge::_bvh_inside(FaceBVH *facebvhptr, int p_max_de } } - // Inside if face normal intersects other faces an odd number of times. - return (intersectionsA.size() + intersectionsB.size()) & 1; + if (!closest_intersection.found) { + return false; + } else { + return closest_intersection.conormal > 0.0f; + } } void CSGBrushOperation::MeshMerge::mark_inside_faces() { @@ -1016,6 +1068,8 @@ void CSGBrushOperation::Build2DFaces::_merge_faces(const Vector<int> &p_segment_ } void CSGBrushOperation::Build2DFaces::_find_edge_intersections(const Vector2 p_segment_points[2], Vector<int> &r_segment_indices) { + LocalVector<Vector<Vector2>> processed_edges; + // For each face. for (int face_idx = 0; face_idx < faces.size(); ++face_idx) { Face2D face = faces[face_idx]; @@ -1027,17 +1081,32 @@ void CSGBrushOperation::Build2DFaces::_find_edge_intersections(const Vector2 p_s // Check each edge. for (int face_edge_idx = 0; face_edge_idx < 3; ++face_edge_idx) { - Vector2 edge_points[2] = { + Vector<Vector2> edge_points_and_uvs = { face_vertices[face_edge_idx].point, - face_vertices[(face_edge_idx + 1) % 3].point - }; - Vector2 edge_uvs[2] = { + face_vertices[(face_edge_idx + 1) % 3].point, face_vertices[face_edge_idx].uv, face_vertices[(face_edge_idx + 1) % 3].uv }; - Vector2 intersection_point; + + Vector2 edge_points[2] = { + edge_points_and_uvs[0], + edge_points_and_uvs[1], + }; + Vector2 edge_uvs[2] = { + edge_points_and_uvs[2], + edge_points_and_uvs[3], + }; + + // Check if edge has already been processed. + if (processed_edges.find(edge_points_and_uvs) != -1) { + continue; + } + + processed_edges.push_back(edge_points_and_uvs); // First check if the ends of the segment are on the edge. + Vector2 intersection_point; + bool on_edge = false; for (int edge_point_idx = 0; edge_point_idx < 2; ++edge_point_idx) { intersection_point = Geometry2D::get_closest_point_to_segment(p_segment_points[edge_point_idx], edge_points); diff --git a/modules/csg/csg.h b/modules/csg/csg.h index 1513a01f9e..2a0831e1ce 100644 --- a/modules/csg/csg.h +++ b/modules/csg/csg.h @@ -135,6 +135,17 @@ struct CSGBrushOperation { return h; } }; + struct Intersection { + bool found = false; + real_t conormal = FLT_MAX; + real_t distance_squared = FLT_MAX; + real_t origin_angle = FLT_MAX; + }; + + struct IntersectionDistance { + bool is_conormal; + real_t distance_squared; + }; Vector<Vector3> points; Vector<Face> faces; @@ -143,9 +154,9 @@ struct CSGBrushOperation { OAHashMap<VertexKey, int, VertexKeyHash> snap_cache; float vertex_snap = 0.0; - inline void _add_distance(List<real_t> &r_intersectionsA, List<real_t> &r_intersectionsB, bool p_from_B, real_t p_distance) const; - inline bool _bvh_inside(FaceBVH *facebvhptr, int p_max_depth, int p_bvh_first, int p_face_idx) const; - inline int _create_bvh(FaceBVH *facebvhptr, FaceBVH **facebvhptrptr, int p_from, int p_size, int p_depth, int &r_max_depth, int &r_max_alloc); + inline void _add_distance(List<IntersectionDistance> &r_intersectionsA, List<IntersectionDistance> &r_intersectionsB, bool p_from_B, real_t p_distance, bool p_is_conormal) const; + inline bool _bvh_inside(FaceBVH *r_facebvhptr, int p_max_depth, int p_bvh_first, int p_face_idx) const; + inline int _create_bvh(FaceBVH *r_facebvhptr, FaceBVH **r_facebvhptrptr, int p_from, int p_size, int p_depth, int &r_max_depth, int &r_max_alloc); void add_face(const Vector3 p_points[3], const Vector2 p_uvs[3], bool p_smooth, bool p_invert, const Ref<Material> &p_material, bool p_from_b); void mark_inside_faces(); diff --git a/modules/csg/csg_shape.cpp b/modules/csg/csg_shape.cpp index afb8e62eea..ba0d49c993 100644 --- a/modules/csg/csg_shape.cpp +++ b/modules/csg/csg_shape.cpp @@ -653,7 +653,7 @@ void CSGShape3D::_bind_methods() { ClassDB::bind_method(D_METHOD("get_meshes"), &CSGShape3D::get_meshes); ADD_PROPERTY(PropertyInfo(Variant::INT, "operation", PROPERTY_HINT_ENUM, "Union,Intersection,Subtraction"), "set_operation", "get_operation"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "snap", PROPERTY_HINT_RANGE, "0.0001,1,0.001,suffix:m"), "set_snap", "get_snap"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "snap", PROPERTY_HINT_RANGE, "0.000001,1,0.000001,suffix:m"), "set_snap", "get_snap"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "calculate_tangents"), "set_calculate_tangents", "is_calculating_tangents"); ADD_GROUP("Collision", "collision_"); diff --git a/modules/csg/doc_classes/CSGShape3D.xml b/modules/csg/doc_classes/CSGShape3D.xml index 06f8f5a403..c29c3c789e 100644 --- a/modules/csg/doc_classes/CSGShape3D.xml +++ b/modules/csg/doc_classes/CSGShape3D.xml @@ -73,7 +73,7 @@ The operation that is performed on this shape. This is ignored for the first CSG child node as the operation is between this node and the previous child of this nodes parent. </member> <member name="snap" type="float" setter="set_snap" getter="get_snap" default="0.001"> - Snap makes the mesh snap to a given distance so that the faces of two meshes can be perfectly aligned. A lower value results in greater precision but may be harder to adjust. + Snap makes the mesh vertices snap to a given distance so that the faces of two meshes can be perfectly aligned. A lower value results in greater precision but may be harder to adjust. </member> <member name="use_collision" type="bool" setter="set_use_collision" getter="is_using_collision" default="false"> Adds a collision shape to the physics engine for our CSG shape. This will always act like a static body. Note that the collision shape is still active even if the CSG shape itself is hidden. See also [member collision_mask] and [member collision_priority]. diff --git a/modules/etcpak/image_compress_etcpak.cpp b/modules/etcpak/image_compress_etcpak.cpp index 16a59d3880..14cce2686c 100644 --- a/modules/etcpak/image_compress_etcpak.cpp +++ b/modules/etcpak/image_compress_etcpak.cpp @@ -66,7 +66,7 @@ EtcpakType _determine_dxt_type(Image::UsedChannels p_channels) { case Image::USED_CHANNELS_RG: return EtcpakType::ETCPAK_TYPE_DXT5_RA_AS_RG; case Image::USED_CHANNELS_RGB: - return EtcpakType::ETCPAK_TYPE_DXT5; + return EtcpakType::ETCPAK_TYPE_DXT1; case Image::USED_CHANNELS_RGBA: return EtcpakType::ETCPAK_TYPE_DXT5; default: diff --git a/modules/gdscript/doc_classes/@GDScript.xml b/modules/gdscript/doc_classes/@GDScript.xml index b05de11882..04877e521a 100644 --- a/modules/gdscript/doc_classes/@GDScript.xml +++ b/modules/gdscript/doc_classes/@GDScript.xml @@ -139,7 +139,7 @@ print(is_instance_of(a, MyClass)) print(is_instance_of(a, MyClass.InnerClass)) [/codeblock] - [b]Note:[/b] If [param value] and/or [param type] are freed objects (see [method @GlobalScope.is_instance_valid]), or [param type] is not one of the above options, this method will raise an runtime error. + [b]Note:[/b] If [param value] and/or [param type] are freed objects (see [method @GlobalScope.is_instance_valid]), or [param type] is not one of the above options, this method will raise a runtime error. See also [method @GlobalScope.typeof], [method type_exists], [method Array.is_same_typed] (and other [Array] methods). </description> </method> @@ -170,6 +170,7 @@ [b]Important:[/b] The path must be absolute. A relative path will always return [code]null[/code]. This function is a simplified version of [method ResourceLoader.load], which can be used for more advanced scenarios. [b]Note:[/b] Files have to be imported into the engine first to load them using this function. If you want to load [Image]s at run-time, you may use [method Image.load]. If you want to import audio files, you can use the snippet described in [member AudioStreamMP3.data]. + [b]Note:[/b] If [member ProjectSettings.editor/export/convert_text_resources_to_binary] is [code]true[/code], [method @GDScript.load] will not be able to read converted files in an exported project. If you rely on run-time loading of files present within the PCK, set [member ProjectSettings.editor/export/convert_text_resources_to_binary] to [code]false[/code]. </description> </method> <method name="preload"> diff --git a/modules/gdscript/language_server/godot_lsp.h b/modules/gdscript/language_server/godot_lsp.h index 5b5327bdb7..b9a54cf818 100644 --- a/modules/gdscript/language_server/godot_lsp.h +++ b/modules/gdscript/language_server/godot_lsp.h @@ -1005,7 +1005,9 @@ struct CompletionItem { if (commitCharacters.size()) { dict["commitCharacters"] = commitCharacters; } - dict["command"] = command.to_json(); + if (!command.command.is_empty()) { + dict["command"] = command.to_json(); + } } return dict; } diff --git a/modules/gltf/doc_classes/GLTFAccessor.xml b/modules/gltf/doc_classes/GLTFAccessor.xml index b73a4f8c5f..a60ea81b17 100644 --- a/modules/gltf/doc_classes/GLTFAccessor.xml +++ b/modules/gltf/doc_classes/GLTFAccessor.xml @@ -7,7 +7,7 @@ <tutorials> </tutorials> <members> - <member name="buffer_view" type="int" setter="set_buffer_view" getter="get_buffer_view" default="0"> + <member name="buffer_view" type="int" setter="set_buffer_view" getter="get_buffer_view" default="-1"> </member> <member name="byte_offset" type="int" setter="set_byte_offset" getter="get_byte_offset" default="0"> </member> diff --git a/modules/gltf/editor/editor_scene_importer_blend.cpp b/modules/gltf/editor/editor_scene_importer_blend.cpp index a736e36c6a..51e00011db 100644 --- a/modules/gltf/editor/editor_scene_importer_blend.cpp +++ b/modules/gltf/editor/editor_scene_importer_blend.cpp @@ -466,8 +466,8 @@ bool EditorFileSystemImportFormatSupportQueryBlend::query() { } bool found = false; - for (const String &path : mdfind_paths) { - found = _autodetect_path(path.path_join("Contents/MacOS")); + for (const String &found_path : mdfind_paths) { + found = _autodetect_path(found_path.path_join("Contents/MacOS")); if (found) { break; } diff --git a/modules/gltf/structures/gltf_accessor.h b/modules/gltf/structures/gltf_accessor.h index 5b4afc79c4..1a5a910048 100644 --- a/modules/gltf/structures/gltf_accessor.h +++ b/modules/gltf/structures/gltf_accessor.h @@ -39,7 +39,7 @@ struct GLTFAccessor : public Resource { friend class GLTFDocument; private: - GLTFBufferViewIndex buffer_view = 0; + GLTFBufferViewIndex buffer_view = -1; int byte_offset = 0; int component_type = 0; bool normalized = false; diff --git a/modules/noise/fastnoise_lite.cpp b/modules/noise/fastnoise_lite.cpp index 224c082c0f..4aea98c4de 100644 --- a/modules/noise/fastnoise_lite.cpp +++ b/modules/noise/fastnoise_lite.cpp @@ -416,7 +416,7 @@ void FastNoiseLite::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::INT, "noise_type", PROPERTY_HINT_ENUM, "Simplex,Simplex Smooth,Cellular,Perlin,Value Cubic,Value"), "set_noise_type", "get_noise_type"); ADD_PROPERTY(PropertyInfo(Variant::INT, "seed"), "set_seed", "get_seed"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "frequency", PROPERTY_HINT_RANGE, ".001,1"), "set_frequency", "get_frequency"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "frequency", PROPERTY_HINT_RANGE, ".0001,1,.0001"), "set_frequency", "get_frequency"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "offset", PROPERTY_HINT_RANGE, "-999999999,999999999,0.01"), "set_offset", "get_offset"); ADD_GROUP("Fractal", "fractal_"); diff --git a/modules/openxr/action_map/openxr_action_map.cpp b/modules/openxr/action_map/openxr_action_map.cpp index d2f6be2233..63abbf0d71 100644 --- a/modules/openxr/action_map/openxr_action_map.cpp +++ b/modules/openxr/action_map/openxr_action_map.cpp @@ -415,7 +415,7 @@ void OpenXRActionMap::create_default_action_sets() { profile->add_new_binding(grip_pose, "/user/hand/left/input/grip/pose,/user/hand/right/input/grip/pose"); profile->add_new_binding(palm_pose, "/user/hand/left/input/palm_ext/pose,/user/hand/right/input/palm_ext/pose"); profile->add_new_binding(menu_button, "/user/hand/left/input/menu/click"); - profile->add_new_binding(select_button, "/user/hand/left/input/system/click"); // we'll map system to select + profile->add_new_binding(select_button, "/user/hand/right/input/system/click"); // we'll map system to select profile->add_new_binding(ax_button, "/user/hand/left/input/x/click,/user/hand/right/input/a/click"); // x on left hand, a on right hand profile->add_new_binding(by_button, "/user/hand/left/input/y/click,/user/hand/right/input/b/click"); // y on left hand, b on right hand profile->add_new_binding(trigger, "/user/hand/left/input/trigger/value,/user/hand/right/input/trigger/value"); @@ -439,7 +439,7 @@ void OpenXRActionMap::create_default_action_sets() { profile->add_new_binding(grip_pose, "/user/hand/left/input/grip/pose,/user/hand/right/input/grip/pose"); profile->add_new_binding(palm_pose, "/user/hand/left/input/palm_ext/pose,/user/hand/right/input/palm_ext/pose"); profile->add_new_binding(menu_button, "/user/hand/left/input/menu/click"); - profile->add_new_binding(select_button, "/user/hand/left/input/system/click"); // we'll map system to select + profile->add_new_binding(select_button, "/user/hand/right/input/system/click"); // we'll map system to select profile->add_new_binding(ax_button, "/user/hand/left/input/x/click,/user/hand/right/input/a/click"); // x on left hand, a on right hand profile->add_new_binding(by_button, "/user/hand/left/input/y/click,/user/hand/right/input/b/click"); // y on left hand, b on right hand profile->add_new_binding(trigger, "/user/hand/left/input/trigger/value,/user/hand/right/input/trigger/value"); diff --git a/modules/openxr/extensions/openxr_htc_controller_extension.cpp b/modules/openxr/extensions/openxr_htc_controller_extension.cpp index 4d141b0695..116762ee8d 100644 --- a/modules/openxr/extensions/openxr_htc_controller_extension.cpp +++ b/modules/openxr/extensions/openxr_htc_controller_extension.cpp @@ -108,7 +108,7 @@ void OpenXRHTCControllerExtension::on_register_metadata() { metadata->register_io_path("/interaction_profiles/htc/vive_focus3_controller", "Trigger touch", "/user/hand/left", "/user/hand/left/input/trigger/touch", "", OpenXRAction::OPENXR_ACTION_BOOL); metadata->register_io_path("/interaction_profiles/htc/vive_focus3_controller", "Trigger", "/user/hand/right", "/user/hand/right/input/trigger/value", "", OpenXRAction::OPENXR_ACTION_FLOAT); metadata->register_io_path("/interaction_profiles/htc/vive_focus3_controller", "Trigger click", "/user/hand/right", "/user/hand/right/input/trigger/click", "", OpenXRAction::OPENXR_ACTION_BOOL); - metadata->register_io_path("/interaction_profiles/htc/vive_focus3_controller", "Trigger touch", "/user/hand/right", "/user/hand/right/input/trigger/touch ", "", OpenXRAction::OPENXR_ACTION_BOOL); + metadata->register_io_path("/interaction_profiles/htc/vive_focus3_controller", "Trigger touch", "/user/hand/right", "/user/hand/right/input/trigger/touch", "", OpenXRAction::OPENXR_ACTION_BOOL); metadata->register_io_path("/interaction_profiles/htc/vive_focus3_controller", "Squeeze click", "/user/hand/left", "/user/hand/left/input/squeeze/click", "", OpenXRAction::OPENXR_ACTION_BOOL); metadata->register_io_path("/interaction_profiles/htc/vive_focus3_controller", "Squeeze touch", "/user/hand/left", "/user/hand/left/input/squeeze/touch", "", OpenXRAction::OPENXR_ACTION_BOOL); @@ -122,6 +122,7 @@ void OpenXRHTCControllerExtension::on_register_metadata() { metadata->register_io_path("/interaction_profiles/htc/vive_focus3_controller", "Thumbstick click", "/user/hand/right", "/user/hand/right/input/thumbstick/click", "", OpenXRAction::OPENXR_ACTION_BOOL); metadata->register_io_path("/interaction_profiles/htc/vive_focus3_controller", "Thumbstick touch", "/user/hand/right", "/user/hand/right/input/thumbstick/touch", "", OpenXRAction::OPENXR_ACTION_BOOL); + metadata->register_io_path("/interaction_profiles/htc/vive_focus3_controller", "Thumbrest touch", "/user/hand/left", "/user/hand/left/input/thumbrest/touch", "", OpenXRAction::OPENXR_ACTION_BOOL); metadata->register_io_path("/interaction_profiles/htc/vive_focus3_controller", "Thumbrest touch", "/user/hand/right", "/user/hand/right/input/thumbrest/touch", "", OpenXRAction::OPENXR_ACTION_BOOL); metadata->register_io_path("/interaction_profiles/htc/vive_focus3_controller", "Haptic output", "/user/hand/left", "/user/hand/left/output/haptic", "", OpenXRAction::OPENXR_ACTION_HAPTIC); diff --git a/modules/text_server_adv/SCsub b/modules/text_server_adv/SCsub index b7b7dccdb0..30a263e0c1 100644 --- a/modules/text_server_adv/SCsub +++ b/modules/text_server_adv/SCsub @@ -513,7 +513,11 @@ if env["builtin_icu4c"]: module_obj = [] if env["builtin_msdfgen"] and msdfgen_enabled: - env_text_server_adv.Prepend(CPPPATH=["#thirdparty/msdfgen"]) + # Treat msdfgen headers as system headers to avoid raising warnings. Not supported on MSVC. + if not env.msvc: + env_text_server_adv.Append(CPPFLAGS=["-isystem", Dir("#thirdparty/msdfgen").path]) + else: + env_text_server_adv.Prepend(CPPPATH=["#thirdparty/msdfgen"]) if env["builtin_freetype"] and freetype_enabled: env_text_server_adv.Append(CPPDEFINES=["FT_CONFIG_OPTION_USE_BROTLI"]) diff --git a/modules/text_server_fb/SCsub b/modules/text_server_fb/SCsub index f1d57ec4d3..582e622147 100644 --- a/modules/text_server_fb/SCsub +++ b/modules/text_server_fb/SCsub @@ -12,7 +12,11 @@ if "svg" in env.module_list: env_text_server_fb.Prepend(CPPPATH=["#thirdparty/thorvg/inc", "#thirdparty/thorvg/src/lib"]) if env["builtin_msdfgen"] and msdfgen_enabled: - env_text_server_fb.Prepend(CPPPATH=["#thirdparty/msdfgen"]) + # Treat msdfgen headers as system headers to avoid raising warnings. Not supported on MSVC. + if not env.msvc: + env_text_server_fb.Append(CPPFLAGS=["-isystem", Dir("#thirdparty/msdfgen").path]) + else: + env_text_server_fb.Prepend(CPPPATH=["#thirdparty/msdfgen"]) if env["builtin_freetype"] and freetype_enabled: env_text_server_fb.Append(CPPDEFINES=["FT_CONFIG_OPTION_USE_BROTLI"]) |