From b912905d233be9e6ca544fdf99bddcdc6990a7e3 Mon Sep 17 00:00:00 2001 From: Paragoumba <22895992+Paragoumba@users.noreply.github.com> Date: Tue, 14 Mar 2023 19:58:02 +0100 Subject: Fix xml namespace in org.godotengine.Godot.xml (cherry picked from commit 1ba14e838ae2c7956bab5b4f10a8d2c04846ec53) --- misc/dist/linux/org.godotengine.Godot.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/dist/linux/org.godotengine.Godot.xml b/misc/dist/linux/org.godotengine.Godot.xml index 2f06bb3639..d4452018c4 100644 --- a/misc/dist/linux/org.godotengine.Godot.xml +++ b/misc/dist/linux/org.godotengine.Godot.xml @@ -1,5 +1,5 @@ - + Godot Engine project -- cgit v1.2.3 From 040b432a1273b2fc98734e178b478603997d9605 Mon Sep 17 00:00:00 2001 From: Brennen Shaughnessy Date: Fri, 31 Mar 2023 19:40:45 -0400 Subject: Fixed property hint for platform layers on 3D physics body (cherry picked from commit 2d16fe681d25d4119099e876ef809358cc45fa8a) --- scene/3d/physics_body_3d.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scene/3d/physics_body_3d.cpp b/scene/3d/physics_body_3d.cpp index ab5b054bb3..89bb1b5c65 100644 --- a/scene/3d/physics_body_3d.cpp +++ b/scene/3d/physics_body_3d.cpp @@ -2032,8 +2032,8 @@ void CharacterBody3D::_bind_methods() { ADD_GROUP("Moving Platform", "platform_"); ADD_PROPERTY(PropertyInfo(Variant::INT, "platform_on_leave", PROPERTY_HINT_ENUM, "Add Velocity,Add Upward Velocity,Do Nothing", PROPERTY_USAGE_DEFAULT), "set_platform_on_leave", "get_platform_on_leave"); - ADD_PROPERTY(PropertyInfo(Variant::INT, "platform_floor_layers", PROPERTY_HINT_LAYERS_2D_PHYSICS), "set_platform_floor_layers", "get_platform_floor_layers"); - ADD_PROPERTY(PropertyInfo(Variant::INT, "platform_wall_layers", PROPERTY_HINT_LAYERS_2D_PHYSICS), "set_platform_wall_layers", "get_platform_wall_layers"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "platform_floor_layers", PROPERTY_HINT_LAYERS_3D_PHYSICS), "set_platform_floor_layers", "get_platform_floor_layers"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "platform_wall_layers", PROPERTY_HINT_LAYERS_3D_PHYSICS), "set_platform_wall_layers", "get_platform_wall_layers"); ADD_GROUP("Collision", ""); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "safe_margin", PROPERTY_HINT_RANGE, "0.001,256,0.001,suffix:m"), "set_safe_margin", "get_safe_margin"); -- cgit v1.2.3 From 87929d9ab0aa8ff8ffaa322b82a79091d252dfbd Mon Sep 17 00:00:00 2001 From: kobewi Date: Sun, 2 Apr 2023 13:38:30 +0200 Subject: Add _get_configuration_warnings() example (cherry picked from commit c4e08a4e1ac736c27d8b803c233d673f3fabf10a) --- doc/classes/Node.xml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml index d904d20335..b927645485 100644 --- a/doc/classes/Node.xml +++ b/doc/classes/Node.xml @@ -42,6 +42,18 @@ The elements in the array returned from this method are displayed as warnings in the Scene dock if the script that overrides it is a [code]tool[/code] script. Returning an empty array produces no warnings. Call [method update_configuration_warnings] when the warnings need to be updated for this node. + [codeblock] + @export var energy = 0: + set(value): + energy = value + update_configuration_warnings() + + func _get_configuration_warnings(): + if energy < 0: + return ["Energy must be 0 or greater."] + else: + return [] + [/codeblock] -- cgit v1.2.3 From 1deda0f003bc61e3fc34a1ecdbe9a9c7481ee7d9 Mon Sep 17 00:00:00 2001 From: smix8 <52464204+smix8@users.noreply.github.com> Date: Thu, 30 Mar 2023 23:17:08 +0200 Subject: Add navigation renames to 3to4 converter Adds navigation renames to 3to4 converter. (cherry picked from commit 0c1e585a1d54aa2f3356ae40b587ef18b93867e5) --- editor/renames_map_3_to_4.cpp | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/editor/renames_map_3_to_4.cpp b/editor/renames_map_3_to_4.cpp index cb885b45e4..c31d274225 100644 --- a/editor/renames_map_3_to_4.cpp +++ b/editor/renames_map_3_to_4.cpp @@ -134,6 +134,7 @@ const char *RenamesMap3To4::enum_renames[][2] = { { "PAUSE_MODE_STOP", "PROCESS_MODE_PAUSABLE" }, // Node { "RENDER_DRAW_CALLS_IN_FRAME", "RENDER_TOTAL_DRAW_CALLS_IN_FRAME" }, // Performance { "RENDER_OBJECTS_IN_FRAME", "RENDER_TOTAL_OBJECTS_IN_FRAME" }, // Performance + { "SOURCE_GEOMETRY_NAVMESH_CHILDREN", "SOURCE_GEOMETRY_ROOT_NODE_CHILDREN" }, // NavigationMesh { "TEXTURE_TYPE_2D_ARRAY", "TEXTURE_LAYERED_2D_ARRAY" }, // RenderingServer { "TEXTURE_TYPE_CUBEMAP", "TEXTURE_LAYERED_CUBEMAP_ARRAY" }, // RenderingServer { "TRACKER_LEFT_HAND", "TRACKER_HAND_LEFT" }, // XRPositionalTracker @@ -309,6 +310,7 @@ const char *RenamesMap3To4::gdscript_function_renames[][2] = { { "get_endian_swap", "is_big_endian" }, // File { "get_error_string", "get_error_message" }, // JSON { "get_filename", "get_scene_file_path" }, // Node -- WARNING: This may be used in a lot of other places. + { "get_final_location", "get_final_position" }, // NavigationAgent2D, NavigationAgent3D { "get_focus_neighbour", "get_focus_neighbor" }, // Control { "get_follow_smoothing", "get_position_smoothing_speed" }, // Camera2D { "get_font_types", "get_font_type_list" }, // Theme @@ -328,6 +330,8 @@ const char *RenamesMap3To4::gdscript_function_renames[][2] = { { "get_importer_name", "_get_importer_name" }, // EditorImportPlugin { "get_interior_ambient", "get_ambient_color" }, // ReflectionProbe { "get_interior_ambient_energy", "get_ambient_color_energy" }, // ReflectionProbe + { "get_item_navmesh", "get_item_navigation_mesh" }, // MeshLibrary + { "get_item_navmesh_transform", "get_item_navigation_mesh_transform" }, // MeshLibrary { "get_iterations_per_second", "get_physics_ticks_per_second" }, // Engine { "get_last_mouse_speed", "get_last_mouse_velocity" }, // Input { "get_layer_mask_bit", "get_layer_mask_value" }, // VisualInstance3D @@ -336,11 +340,14 @@ const char *RenamesMap3To4::gdscript_function_renames[][2] = { { "get_metakey", "is_meta_pressed" }, // InputEventWithModifiers { "get_mid_height", "get_height" }, // CapsuleMesh { "get_motion_remainder", "get_remainder" }, // PhysicsTestMotionResult2D + { "get_nav_path", "get_current_navigation_path" }, // NavigationAgent2D, NavigationAgent3D + { "get_nav_path_index", "get_current_navigation_path_index" }, // NavigationAgent2D, NavigationAgent3D { "get_neighbor_dist", "get_neighbor_distance" }, // NavigationAgent2D, NavigationAgent3D { "get_network_connected_peers", "get_peers" }, // Multiplayer API { "get_network_master", "get_multiplayer_authority" }, // Node { "get_network_peer", "get_multiplayer_peer" }, // Multiplayer API { "get_network_unique_id", "get_unique_id" }, // Multiplayer API + { "get_next_location", "get_next_path_position" }, // NavigationAgent2D, NavigationAgent3D { "get_ok", "get_ok_button" }, // AcceptDialog { "get_oneshot", "get_one_shot" }, // AnimatedTexture { "get_option_visibility", "_get_option_visibility" }, // EditorImportPlugin @@ -379,6 +386,7 @@ const char *RenamesMap3To4::gdscript_function_renames[][2] = { { "get_surface_material_count", "get_surface_override_material_count" }, // MeshInstance3D { "get_tab_disabled", "is_tab_disabled" }, // Tab { "get_tab_hidden", "is_tab_hidden" }, // Tab + { "get_target_location", "get_target_position" }, // NavigationAgent2D, NavigationAgent3D { "get_text_align", "get_text_alignment" }, // Button { "get_theme_item_types", "get_theme_item_type_list" }, // Theme { "get_timer_process_mode", "get_timer_process_callback" }, // Timer @@ -387,6 +395,7 @@ const char *RenamesMap3To4::gdscript_function_renames[][2] = { { "get_unit_db", "get_volume_db" }, // AudioStreamPlayer3D { "get_unit_offset", "get_progress_ratio" }, // PathFollow2D, PathFollow3D { "get_use_in_baked_light", "is_baking_navigation" }, // GridMap + { "get_verts_per_poly", "get_vertices_per_polygon" }, // NavigationMesh { "get_v_scrollbar", "get_v_scroll_bar" }, // ScrollContainer { "get_visible_name", "_get_visible_name" }, // EditorImportPlugin { "get_window_layout", "_get_window_layout" }, // EditorPlugin @@ -467,6 +476,9 @@ const char *RenamesMap3To4::gdscript_function_renames[][2] = { { "property_list_changed_notify", "notify_property_list_changed" }, // Object { "recognize", "_recognize" }, // ResourceFormatLoader { "regen_normalmaps", "regen_normal_maps" }, // ArrayMesh + { "region_bake_navmesh", "region_bake_navigation_mesh" }, // Navigation3DServer + { "region_set_navmesh", "region_set_navigation_mesh" }, // Navigation3DServer + { "region_set_navpoly", "region_set_navigation_polygon" }, // Navigation2DServer { "remove_animation", "remove_animation_library" }, // AnimationPlayer { "remove_color_override", "remove_theme_color_override" }, // Control { "remove_constant_override", "remove_theme_constant_override" }, // Control @@ -522,6 +534,8 @@ const char *RenamesMap3To4::gdscript_function_renames[][2] = { { "set_invert_faces", "set_flip_faces" }, // CSGPrimitive3D { "set_is_initialized", "_is_initialized" }, // XRInterface { "set_is_primary", "set_primary" }, // XRInterface + { "set_item_navmesh", "set_item_navigation_mesh" }, // MeshLibrary + { "set_item_navmesh_transform", "set_item_navigation_mesh_transform" }, // MeshLibrary { "set_iterations_per_second", "set_physics_ticks_per_second" }, // Engine { "set_layer_mask_bit", "set_layer_mask_value" }, // VisualInstance3D { "set_margins_preset", "set_offsets_preset" }, // Control @@ -554,6 +568,7 @@ const char *RenamesMap3To4::gdscript_function_renames[][2] = { { "set_surface_material", "set_surface_override_material" }, // MeshInstance3D -- Breaks ImporterMesh. { "set_tab_align", "set_tab_alignment" }, // TabContainer { "set_tangent", "surface_set_tangent" }, // ImmediateGeometry -- Breaks SurfaceTool. + { "set_target_location", "set_target_position" }, // NavigationAgent2D, NavigationAgent3D { "set_text_align", "set_text_alignment" }, // Button { "set_timer_process_mode", "set_timer_process_callback" }, // Timer { "set_translation", "set_position" }, // Node3D -- This breaks GLTFNode, but it is used rarely. @@ -561,6 +576,7 @@ const char *RenamesMap3To4::gdscript_function_renames[][2] = { { "set_unit_db", "set_volume_db" }, // AudioStreamPlayer3D { "set_unit_offset", "set_progress_ratio" }, // PathFollow2D, PathFollow3D { "set_uv2", "surface_set_uv2" }, // ImmediateMesh -- Breaks SurfaceTool. + { "set_verts_per_poly", "set_vertices_per_polygon" }, // NavigationMesh { "set_v_drag_enabled", "set_drag_vertical_enabled" }, // Camera2D { "set_valign", "set_vertical_alignment" }, // Label { "set_window_layout", "_set_window_layout" }, // EditorPlugin @@ -717,6 +733,7 @@ const char *RenamesMap3To4::csharp_function_renames[][2] = { { "GetEnabledFocusMode", "GetFocusMode" }, // BaseButton { "GetEndianSwap", "IsBigEndian" }, // File { "GetErrorString", "GetErrorMessage" }, // JSON + { "GetFinalLocation", "GetFinalPosition" }, // NavigationAgent2D, NavigationAgent3D { "GetFocusNeighbour", "GetFocusNeighbor" }, // Control { "GetFollowSmoothing", "GetPositionSmoothingSpeed" }, // Camera2D { "GetFontTypes", "GetFontTypeList" }, // Theme @@ -736,6 +753,8 @@ const char *RenamesMap3To4::csharp_function_renames[][2] = { { "GetImporterName", "_GetImporterName" }, // EditorImportPlugin { "GetInteriorAmbient", "GetAmbientColor" }, // ReflectionProbe { "GetInteriorAmbientEnergy", "GetAmbientColorEnergy" }, // ReflectionProbe + { "GetItemNavmesh", "GetItemMavigationMesh" }, // MeshLibrary + { "GetItemNavmeshTransform", "GetItemNavigationMeshTransform" }, // MeshLibrary { "GetIterationsPerSecond", "GetPhysicsTicksPerSecond" }, // Engine { "GetLastMouseSpeed", "GetLastMouseVelocity" }, // Input { "GetLayerMaskBit", "GetLayerMaskValue" }, // VisualInstance3D @@ -744,11 +763,14 @@ const char *RenamesMap3To4::csharp_function_renames[][2] = { { "GetMetakey", "IsMetaPressed" }, // InputEventWithModifiers { "GetMidHeight", "GetHeight" }, // CapsuleMesh { "GetMotionRemainder", "GetRemainder" }, // PhysicsTestMotionResult2D + { "GetNavPath", "GetCurrentNavigationPath" }, // NavigationAgent2D, NavigationAgent3D + { "GetNavPathIndex", "GetCurrentNavigationPathIndex" }, // NavigationAgent2D, NavigationAgent3D { "GetNeighborDist", "GetNeighborDistance" }, // NavigationAgent2D, NavigationAgent3D { "GetNetworkConnectedPeers", "GetPeers" }, // Multiplayer API { "GetNetworkMaster", "GetMultiplayerAuthority" }, // Node { "GetNetworkPeer", "GetMultiplayerPeer" }, // Multiplayer API { "GetNetworkUniqueId", "GetUniqueId" }, // Multiplayer API + { "GetNextLocation", "GetNextPathPosition" }, // NavigationAgent2D, NavigationAgent3D { "GetOneshot", "GetOneShot" }, // AnimatedTexture { "GetOk", "GetOkButton" }, // AcceptDialog { "GetOptionVisibility", "_GetOptionVisibility" }, // EditorImportPlugin @@ -784,6 +806,7 @@ const char *RenamesMap3To4::csharp_function_renames[][2] = { { "GetSurfaceMaterialCount", "GetSurfaceOverrideMaterialCount" }, // MeshInstance3D { "GetTabDisabled", "IsTabDisabled" }, // Tab { "GetTabHidden", "IsTabHidden" }, // Tab + { "GetTargetLocation", "GetTargetPosition" }, // NavigationAgent2D, NavigationAgent3D { "GetTextAlign", "GetTextAlignment" }, // Button { "GetThemeItemTypes", "GetThemeItemTypeList" }, // Theme { "GetTimerProcessMode", "GetTimerProcessCallback" }, // Timer @@ -792,6 +815,7 @@ const char *RenamesMap3To4::csharp_function_renames[][2] = { { "GetUnitDb", "GetVolumeDb" }, // AudioStreamPlayer3D { "GetUnitOffset", "GetProgressRatio" }, // PathFollow2D, PathFollow3D { "GetUseInBakedLight", "IsBakingNavigation" }, // GridMap + { "GetVertsPerPoly", "GetVerticesPerPolygon" }, // NavigationMesh { "GetVScrollbar", "GetVScrollBar" }, // ScrollContainer { "GetVisibleName", "_GetVisibleName" }, // EditorImportPlugin { "GetWindowLayout", "_GetWindowLayout" }, // EditorPlugin @@ -868,6 +892,9 @@ const char *RenamesMap3To4::csharp_function_renames[][2] = { { "PropertyListChangedNotify", "NotifyPropertyListChanged" }, // Object { "Recognize", "_Recognize" }, // ResourceFormatLoader { "RegenNormalmaps", "RegenNormalMaps" }, // ArrayMesh + { "RegionBakeNavmesh", "region_bake_navigation_mesh" }, // Navigation3DServer + { "RegionSetNavmesh", "RegionSetNavigationMesh" }, // Navigation3DServer + { "RegionSetNavpoly", "RegionSetNavigationPolygon" }, // Navigation2DServer { "RemoveAnimation", "RemoveAnimationLibrary" }, // AnimationPlayer { "RemoveColorOverride", "RemoveThemeColorOverride" }, // Control { "RemoveConstantOverride", "RemoveThemeConstantOverride" }, // Control @@ -919,6 +946,8 @@ const char *RenamesMap3To4::csharp_function_renames[][2] = { { "SetInteriorAmbientEnergy", "SetAmbientColorEnergy" }, // ReflectionProbe { "SetIsInitialized", "_IsInitialized" }, // XRInterface { "SetIsPrimary", "SetPrimary" }, // XRInterface + { "SetItemNavmesh", "SetItemNavigationMesh" }, // MeshLibrary + { "SetItemNavmeshTransform", "SetItemNavigationMeshTransform" }, // MeshLibrary { "SetIterationsPerSecond", "SetPhysicsTicksPerSecond" }, // Engine { "SetLayerMaskBit", "SetLayerMaskValue" }, // VisualInstance3D { "SetMarginsPreset", "SetOffsetsPreset" }, // Control @@ -950,6 +979,7 @@ const char *RenamesMap3To4::csharp_function_renames[][2] = { { "SetSurfaceMaterial", "SetSurfaceOverrideMaterial" }, // MeshInstance3D -- Breaks ImporterMesh. { "SetTabAlign", "SetTabAlignment" }, // TabContainer { "SetTangent", "SurfaceSetTangent" }, // ImmediateGeometry -- Breaks SurfaceTool. + { "SetTargetLocation", "SetTargetPosition" }, // NavigationAgent2D, NavigationAgent3D { "SetTextAlign", "SetTextAlignment" }, // Button { "SetTimerProcessMode", "SetTimerProcessCallback" }, // Timer { "SetTonemapAutoExposure", "SetTonemapAutoExposureEnabled" }, // Environment @@ -958,6 +988,7 @@ const char *RenamesMap3To4::csharp_function_renames[][2] = { { "SetUnitDb", "SetVolumeDb" }, // AudioStreamPlayer3D { "SetUnitOffset", "SetProgressRatio" }, // PathFollow2D, PathFollow3D { "SetUv2", "SurfaceSetUv2" }, // ImmediateMesh -- Breaks SurfaceTool. + { "SetVertsPerPoly", "SetVerticesPerPolygon" }, // NavigationMesh { "SetVDragEnabled", "SetDragVerticalEnabled" }, // Camera2D { "SetValign", "SetVerticalAlignment" }, // Label { "SetWindowLayout", "_SetWindowLayout" }, // EditorPlugin @@ -1091,6 +1122,8 @@ const char *RenamesMap3To4::gdscript_properties_renames[][2] = { { "margin_right", "offset_right" }, // Control -- Breaks NinePatchRect, StyleBox. { "margin_top", "offset_top" }, // Control -- Breaks NinePatchRect, StyleBox. { "mid_height", "height" }, // CapsuleMesh + { "navpoly", "navigation_polygon" }, // NavigationRegion2D + { "navmesh", "navigation_mesh" }, // NavigationRegion3D { "neighbor_dist", "neighbor_distance" }, // NavigationAgent2D, NavigationAgent3D { "octaves", "fractal_octaves" }, // OpenSimplexNoise -> FastNoiseLite { "offset_h", "drag_horizontal_offset" }, // Camera2D @@ -1101,6 +1134,7 @@ const char *RenamesMap3To4::gdscript_properties_renames[][2] = { { "out_of_range_mode", "max_polyphony" }, // AudioStreamPlayer3D { "pause_mode", "process_mode" }, // Node { "physical_scancode", "physical_keycode" }, // InputEventKey + { "polygon_verts_per_poly", "polygon_vertices_per_polyon" }, // NavigationMesh { "popup_exclusive", "exclusive" }, // Window { "proximity_fade_enable", "proximity_fade_enabled" }, // Material { "rect_position", "position" }, // Control @@ -1131,6 +1165,7 @@ const char *RenamesMap3To4::gdscript_properties_renames[][2] = { { "table_hseparation", "table_h_separation" }, // Theme { "table_vseparation", "table_v_separation" }, // Theme { "tangent", "orthogonal" }, // Vector2 + { "target_location", "target_position" }, // NavigationAgent2D, NavigationAgent3D { "toplevel", "top_level" }, // Node { "translation", "position" }, // Node3D { "unit_db", "volume_db" }, // AudioStreamPlayer3D @@ -1186,6 +1221,8 @@ const char *RenamesMap3To4::csharp_properties_renames[][2] = { { "MarginRight", "OffsetRight" }, // Control -- Breaks NinePatchRect, StyleBox. { "MarginTop", "OffsetTop" }, // Control -- Breaks NinePatchRect, StyleBox. { "MidHeight", "Height" }, // CapsuleMesh + { "Navpoly", "NavigationPolygon" }, // NavigationRegion2D + { "Navmesh", "NavigationMesh" }, // NavigationRegion3D { "NeighborDist", "NeighborDistance" }, // NavigationAgent2D, NavigationAgent3D { "Octaves", "FractalOctaves" }, // OpenSimplexNoise -> FastNoiseLite { "OffsetH", "DragHorizontalOffset" }, // Camera2D @@ -1227,6 +1264,7 @@ const char *RenamesMap3To4::csharp_properties_renames[][2] = { { "TableHseparation", "TableHSeparation" }, // Theme { "TableVseparation", "TableVSeparation" }, // Theme { "Tangent", "Orthogonal" }, // Vector2 + { "TargetLocation", "TargetPosition" }, // NavigationAgent2D, NavigationAgent3D { "Toplevel", "TopLevel" }, // Node { "Translation", "Position" }, // Node3D { "UnitDb", "VolumeDb" }, // AudioStreamPlayer3D -- cgit v1.2.3 From c114a7bab4d326ded2e0df8300f7fdf421f70d1d Mon Sep 17 00:00:00 2001 From: skyace65 Date: Sun, 2 Apr 2023 19:45:55 -0400 Subject: Remove reference to clipboard in OS class doc (cherry picked from commit a65d99b541578c52beb177ff7290dd68940a3807) --- doc/classes/OS.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index 92ee2fb40b..10818e0dec 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -4,7 +4,7 @@ Operating System functions. - Operating System functions. [OS] wraps the most common functionality to communicate with the host operating system, such as the clipboard, video driver, delays, environment variables, execution of binaries, command line, etc. + Operating System functions. [OS] wraps the most common functionality to communicate with the host operating system, such as the video driver, delays, environment variables, execution of binaries, command line, etc. [b]Note:[/b] In Godot 4, [OS] functions related to window management were moved to the [DisplayServer] singleton. -- cgit v1.2.3 From 0c24ee363fb41087e94a8c50bb50703943d50120 Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Sun, 2 Apr 2023 20:53:00 +0300 Subject: [TextEdit] Fix block caret size at the end of the line. (cherry picked from commit efe04af446cd042c6505722ef2608aa03dc63435) --- scene/gui/text_edit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 30bac0f58c..0560b9f2e4 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -1385,7 +1385,7 @@ void TextEdit::_notification(int p_what) { ts_caret.l_caret.position.y += ts_caret.l_caret.size.y; ts_caret.l_caret.size.y = caret_width; } - if (ts_caret.l_caret.position.x >= TS->shaped_text_get_size(rid).x) { + if (Math::ceil(ts_caret.l_caret.position.x) >= TS->shaped_text_get_size(rid).x) { ts_caret.l_caret.size.x = font->get_char_size('m', font_size).x; } else { ts_caret.l_caret.size.x = 3 * caret_width; -- cgit v1.2.3 From 103d23539fdb0621383fab6afafa184c19fae8e3 Mon Sep 17 00:00:00 2001 From: kleonc <9283098+kleonc@users.noreply.github.com> Date: Sat, 1 Apr 2023 16:26:56 +0200 Subject: Improve CanvasItem.self_modulate docs (cherry picked from commit 4fb9aa22948dadf3f18dd73f6c9fca2e41da53d0) --- doc/classes/CanvasItem.xml | 7 ++++--- doc/classes/Node.xml | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml index f99d90d32c..572963b406 100644 --- a/doc/classes/CanvasItem.xml +++ b/doc/classes/CanvasItem.xml @@ -569,13 +569,14 @@ The rendering layers in which this [CanvasItem] responds to [Light2D] nodes. - The material applied to textures on this [CanvasItem]. + The material applied to this [CanvasItem]. - The color applied to textures on this [CanvasItem]. + The color applied to this [CanvasItem]. This property does affect child [CanvasItem]s, unlike [member self_modulate] which only affects the node itself. - The color applied to textures on this [CanvasItem]. This is not inherited by children [CanvasItem]s. + The color applied to this [CanvasItem]. This property does [b]not[/b] affect child [CanvasItem]s, unlike [member modulate] which affects both the node itself and its children. + [b]Note:[/b] Internal children (e.g. sliders in [ColorPicker] or tab bar in [TabContainer]) are also not affected by this property (see [code]include_internal[/code] parameter of [method Node.get_child] and other similar methods). If [code]true[/code], the object draws behind its parent. diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml index b927645485..4aa291e2e7 100644 --- a/doc/classes/Node.xml +++ b/doc/classes/Node.xml @@ -139,7 +139,7 @@ Adds a child [param node]. Nodes can have any number of children, but every child must have a unique name. Child nodes are automatically deleted when the parent node is deleted, so an entire scene can be removed by deleting its topmost node. If [param force_readable_name] is [code]true[/code], improves the readability of the added [param node]. If not named, the [param node] is renamed to its type, and if it shares [member name] with a sibling, a number is suffixed more appropriately. This operation is very slow. As such, it is recommended leaving this to [code]false[/code], which assigns a dummy name featuring [code]@[/code] in both situations. - If [param internal] is different than [constant INTERNAL_MODE_DISABLED], the child will be added as internal node. Such nodes are ignored by methods like [method get_children], unless their parameter [code]include_internal[/code] is [code]true[/code].The intended usage is to hide the internal nodes from the user, so the user won't accidentally delete or modify them. Used by some GUI nodes, e.g. [ColorPicker]. See [enum InternalMode] for available modes. + If [param internal] is different than [constant INTERNAL_MODE_DISABLED], the child will be added as internal node. Such nodes are ignored by methods like [method get_children], unless their parameter [code]include_internal[/code] is [code]true[/code]. The intended usage is to hide the internal nodes from the user, so the user won't accidentally delete or modify them. Used by some GUI nodes, e.g. [ColorPicker]. See [enum InternalMode] for available modes. [b]Note:[/b] If the child node already has a parent, the function will fail. Use [method remove_child] first to remove the node from its current parent. For example: [codeblocks] [gdscript] @@ -218,7 +218,7 @@ - Finds the first descendant of this node whose name matches [param pattern] as in [method String.match]. + Finds the first descendant of this node whose name matches [param pattern] as in [method String.match]. Internal children are also searched over (see [code]internal[/code] parameter in [method add_child]). [param pattern] does not match against the full path, just against individual node names. It is case-sensitive, with [code]"*"[/code] matching zero or more characters and [code]"?"[/code] matching any single character except [code]"."[/code]). If [param recursive] is [code]true[/code], all child nodes are included, even if deeply nested. Nodes are checked in tree order, so this node's first direct child is checked first, then its own direct children, etc., before moving to the second direct child, and so on. If [param recursive] is [code]false[/code], only this node's direct children are matched. If [param owned] is [code]true[/code], this method only finds nodes who have an assigned [member Node.owner]. This is especially important for scenes instantiated through a script, because those scenes don't have an owner. @@ -234,7 +234,7 @@ - Finds descendants of this node whose name matches [param pattern] as in [method String.match], and/or type matches [param type] as in [method Object.is_class]. + Finds descendants of this node whose name matches [param pattern] as in [method String.match], and/or type matches [param type] as in [method Object.is_class]. Internal children are also searched over (see [code]internal[/code] parameter in [method add_child]). [param pattern] does not match against the full path, just against individual node names. It is case-sensitive, with [code]"*"[/code] matching zero or more characters and [code]"?"[/code] matching any single character except [code]"."[/code]). [param type] will check equality or inheritance, and is case-sensitive. [code]"Object"[/code] will match a node whose type is [code]"Node"[/code] but not the other way around. If [param recursive] is [code]true[/code], all child nodes are included, even if deeply nested. Nodes are checked in tree order, so this node's first direct child is checked first, then its own direct children, etc., before moving to the second direct child, and so on. If [param recursive] is [code]false[/code], only this node's direct children are matched. -- cgit v1.2.3 From 1c66b24325dee512c95f725783a9ae9d997ac5d1 Mon Sep 17 00:00:00 2001 From: kobewi Date: Tue, 28 Feb 2023 15:06:21 +0100 Subject: Fill random docs (cherry picked from commit eac65fd0a8e68512a9410e0e78a405b726d303d3) --- doc/classes/ConeTwistJoint3D.xml | 2 ++ doc/classes/FileSystemDock.xml | 12 +++++++++ doc/classes/InputEventFromWindow.xml | 3 +++ doc/classes/InputEventGesture.xml | 1 + doc/classes/InputEventMagnifyGesture.xml | 3 +++ doc/classes/InputEventPanGesture.xml | 3 +++ doc/classes/InputEventShortcut.xml | 3 +++ doc/classes/Node.xml | 2 ++ doc/classes/Node3D.xml | 3 +++ doc/classes/Polygon2D.xml | 3 +++ doc/classes/ProjectSettings.xml | 3 +++ doc/classes/RenderingServer.xml | 42 +++++++++++++++++++++++++++++--- doc/classes/Viewport.xml | 2 ++ 13 files changed, 79 insertions(+), 3 deletions(-) diff --git a/doc/classes/ConeTwistJoint3D.xml b/doc/classes/ConeTwistJoint3D.xml index 1cfe9d197d..ee68b156d7 100644 --- a/doc/classes/ConeTwistJoint3D.xml +++ b/doc/classes/ConeTwistJoint3D.xml @@ -15,6 +15,7 @@ + Returns the value of the specified parameter. @@ -22,6 +23,7 @@ + Sets the value of the specified parameter. diff --git a/doc/classes/FileSystemDock.xml b/doc/classes/FileSystemDock.xml index f76bc2c279..f549695e72 100644 --- a/doc/classes/FileSystemDock.xml +++ b/doc/classes/FileSystemDock.xml @@ -1,8 +1,11 @@ + Editor dock for managing files in the project. + This class is available only in [EditorPlugin]s and can't be instantiated. You can access it using [method EditorInterface.get_file_system_dock]. + While FileSystemDock doesn't expose any methods for file manipulation, you can listen for various file-related signals. @@ -11,49 +14,58 @@ + Sets the given [param path] as currently selected, ensuring that the selected file/directory is visible. + Emitted when the user switches file display mode or split mode. + Emitted when the given [param file] was removed. + Emitted when a file is moved from [param old_file] path to [param new_file] path. + Emitted when a folder is moved from [param old_folder] path to [param new_folder] path. + Emitted when the given [param folder] was removed. + Emitted when a new scene is created that inherits the scene at [param file] path. + Emitted when the given scenes are being instantiated in the editor. + Emitted when an external [param resource] had its file removed. diff --git a/doc/classes/InputEventFromWindow.xml b/doc/classes/InputEventFromWindow.xml index adbf8ccc08..24b084bb5d 100644 --- a/doc/classes/InputEventFromWindow.xml +++ b/doc/classes/InputEventFromWindow.xml @@ -1,13 +1,16 @@ + Base class for [Viewport]-based input events. + InputEventFromWindow represents events specifically received by windows. This includes mouse events, keyboard events in focused windows or touch screen actions. + The ID of a [Window] that received this event. diff --git a/doc/classes/InputEventGesture.xml b/doc/classes/InputEventGesture.xml index 85d1a405b2..578faab6b5 100644 --- a/doc/classes/InputEventGesture.xml +++ b/doc/classes/InputEventGesture.xml @@ -4,6 +4,7 @@ Base class for touch control gestures. + InputEventGesture is sent when a user performs a supported gesture on a touch screen. Gestures can't be emulated using mouse, because they typically require multi-touch. diff --git a/doc/classes/InputEventMagnifyGesture.xml b/doc/classes/InputEventMagnifyGesture.xml index 2063dfda6c..838809423f 100644 --- a/doc/classes/InputEventMagnifyGesture.xml +++ b/doc/classes/InputEventMagnifyGesture.xml @@ -1,13 +1,16 @@ + [InputEvent] that represents a magnifying touch gesture. + Magnify gesture is performed when the user pinches the touch screen. It's typically used for zooming. + The amount (or delta) of the event. This value is higher the faster the gesture is performed. diff --git a/doc/classes/InputEventPanGesture.xml b/doc/classes/InputEventPanGesture.xml index deb76d5d38..e276f68cc3 100644 --- a/doc/classes/InputEventPanGesture.xml +++ b/doc/classes/InputEventPanGesture.xml @@ -1,13 +1,16 @@ + [InputEvent] that represents a panning touch gesture. + Pan gesture is performed when the user swipes the touch screen with two fingers. It's typically used for panning/scrolling. + Panning amount since last pan event. diff --git a/doc/classes/InputEventShortcut.xml b/doc/classes/InputEventShortcut.xml index 58b44132bb..93c1e84be3 100644 --- a/doc/classes/InputEventShortcut.xml +++ b/doc/classes/InputEventShortcut.xml @@ -1,13 +1,16 @@ + [InputEvent] that signifies a triggered keyboard [Shortcut]. + InputEventShortcut is a special event that can be received in [method Node._unhandled_key_input]. It's typically sent by the editor's Command Palette to trigger actions, but can also be sent manually using [method Viewport.push_unhandled_input]. + The [Shortcut] represented by this event. Its [method Shortcut.matches_event] method will always return [code]true[/code] for this event. diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml index 4aa291e2e7..62d708618a 100644 --- a/doc/classes/Node.xml +++ b/doc/classes/Node.xml @@ -954,8 +954,10 @@ Specific to the Android platform. + Notification received from the OS when the window is resized. + Notification received from the OS when the screen's DPI has been changed. Only implemented on macOS. Notification received when the mouse enters the viewport. diff --git a/doc/classes/Node3D.xml b/doc/classes/Node3D.xml index 61e5c44251..581cb68c92 100644 --- a/doc/classes/Node3D.xml +++ b/doc/classes/Node3D.xml @@ -344,10 +344,13 @@ In order for [constant NOTIFICATION_LOCAL_TRANSFORM_CHANGED] to work, users first need to ask for it, with [method set_notify_local_transform]. + The rotation is edited using [Vector3] Euler angles. + The rotation is edited using a [Quaternion]. + The rotation is edited using a [Basis]. In this mode, [member scale] can't be edited separately. diff --git a/doc/classes/Polygon2D.xml b/doc/classes/Polygon2D.xml index a3fc326351..4f24800647 100644 --- a/doc/classes/Polygon2D.xml +++ b/doc/classes/Polygon2D.xml @@ -72,11 +72,13 @@ If [code]true[/code], polygon edges will be anti-aliased. + Internal list of [Bone2D] nodes used by the assigned [member skeleton]. Edited using the Polygon2D editor ("UV" button on the top toolbar). The polygon's fill color. If [code]texture[/code] is defined, it will be multiplied by this color. It will also be the default color for vertices not set in [code]vertex_colors[/code]. + Number of internal vertices, used for UV mapping. Added padding applied to the bounding box when [member invert_enabled] is set to [code]true[/code]. Setting this value too small may result in a "Bad Polygon" error. @@ -95,6 +97,7 @@ The list of polygons, in case more than one is being represented. Every individual polygon is stored as a [PackedInt32Array] where each [int] is an index to a point in [member polygon]. If empty, this property will be ignored, and the resulting single polygon will be composed of all points in [member polygon], using the order they are stored in. + Path to a [Skeleton2D] node used for skeleton-based deformations of this polygon. If empty or invalid, skeletal deformations will not be used. The polygon's fill texture. Use [code]uv[/code] to set texture coordinates. diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 120dda92c4..78b7e073c7 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -1958,8 +1958,10 @@ + If [code]true[/code], [CanvasItem] nodes will internally snap to full pixels. Their position can still be sub-pixel, but the decimals will not have effect. + If [code]true[/code], vertices of [CanvasItem] nodes will snap to full pixels. Only affects the final vertex positions, not the transforms. Sets the number of MSAA samples to use for 2D/Canvas rendering (as a power of two). MSAA is used to reduce aliasing around the edges of polygons. A higher MSAA value results in smoother edges but can be significantly slower on some hardware. This has no effect on shader-induced aliasing or texture aliasing. @@ -2416,6 +2418,7 @@ + Maximum number of threads to be used by [WorkerThreadPool]. Value of [code]-1[/code] means no limit. diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml index 2ba8e40ce2..ec338cb729 100644 --- a/doc/classes/RenderingServer.xml +++ b/doc/classes/RenderingServer.xml @@ -33,6 +33,7 @@ Creates a camera attributes object and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]camera_attributes_[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. + This is the internal equivalent of the [CameraAttributes] resource. @@ -100,6 +101,7 @@ Creates a camera and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]camera_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. + This is the internal equivalent of the [Camera3D] node. @@ -178,6 +180,7 @@ Creates a canvas and returns the assigned [RID]. It can be accessed with the RID that is returned. This RID will be used in all [code]canvas_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. + Canvas has no [Resource] or [Node] equivalent. @@ -350,6 +353,7 @@ + Draws a 2D textured rectangle on the [CanvasItem] pointed to by the [param item] [RID]. See also [method CanvasItem.draw_texture_rect] and [method Texture2D.draw_rect]. @@ -362,6 +366,7 @@ + Draws the specified region of a 2D textured rectangle on the [CanvasItem] pointed to by the [param item] [RID]. See also [method CanvasItem.draw_texture_rect_region] and [method Texture2D.draw_rect_region]. @@ -388,7 +393,9 @@ - Creates a new [CanvasItem] instance and returns its [RID]. + Creates a canvas item and returns the assigned [RID]. It can be accessed with the RID that is returned. This RID will be used in all [code]canvas_item_*[/code] RenderingServer functions. + Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. + This is the internal equivalent of the [CanvasItem] node. @@ -482,6 +489,7 @@ + Sets a color modulation to the [CanvasItem]. This also affects child canvas items. @@ -489,6 +497,7 @@ + Sets a parent [CanvasItem] to the [CanvasItem]. The item will inherit transform, modulation and visibility from its parent, like [CanvasItem] nodes in the scene tree. @@ -496,6 +505,7 @@ + Sets a color self-modulation to the [CanvasItem]. It does not affect the child canvas items. @@ -503,6 +513,7 @@ + Enables or disables Y-sorting of a [CanvasItem]. @@ -510,6 +521,7 @@ + Sets the transform of the [CanvasItem]. It affects where and how the item will be drawn. Child canvas items' transforms are multiplied by their parent's transform. @@ -536,6 +548,8 @@ + Sets the given [CanvasItem] as visibility notifier. [param area] defines the area of detecting visibility. [param enter_callable] is called when the [CanvasItem] enters the screen, [param exit_callable] is called when the [CanvasItem] exits the screen. If [param enable] is [code]false[/code], the item will no longer function as notifier. + This method can be used to manually mimic [VisibleOnScreenNotifier2D]. @@ -543,6 +557,7 @@ + Sets the visibility of the [CanvasItem]. @@ -832,6 +847,9 @@ + Creates a canvas texture and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]canvas_texture_*[/code] RenderingServer functions. + Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. + This is the internal equivalent of the [CanvasTexture] resource. @@ -855,6 +873,7 @@ + Sets the texture filter used by the [CanvasTexture]. @@ -862,6 +881,7 @@ + Sets the texture repeat used by the [CanvasTexture]. @@ -874,6 +894,9 @@ + Creates a decal and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]decal_*[/code] RenderingServer functions. + Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. + This is the internal equivalent of the [Decal] node. @@ -919,6 +942,7 @@ + Sets the color modulation of the [Decal]. @@ -933,6 +957,7 @@ + Sets the size of the [Decal]. @@ -941,6 +966,7 @@ + Sets the texture of the [Decal]. @@ -955,6 +981,7 @@ Creates a directional light and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID can be used in most [code]light_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. To place in a scene, attach this directional light to an instance using [method instance_set_base] using the returned RID. + This is the internal equivalent of the [DirectionalLight3D] node. @@ -983,6 +1010,7 @@ Creates an environment and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]environment_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. + This is the internal equivalent of the [Environment] resource. @@ -1244,7 +1272,9 @@ - Creates a new fog volume and allocates an RID. + Creates a fog volume and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]fog_volume_*[/code] RenderingServer functions. + Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. + This is the internal equivalent of the [FogVolume] node. @@ -1461,6 +1491,7 @@ Creates a visual instance and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]instance_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. An instance is a way of placing a 3D object in the scenario. Objects like particles, meshes, and reflection probes need to be associated with an instance to be visible in the scenario using [method instance_set_base]. + This is the internal equivalent of the [VisualInstance3D] node. @@ -1821,7 +1852,9 @@ - Creates a new [LightmapGI] instance. + Creates a lightmap GI and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]instance_*[/code] RenderingServer functions. + Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. + This is the internal equivalent of the [LightmapGI] node. @@ -1908,6 +1941,7 @@ Creates an empty material and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]material_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. + This is the internal equivalent of the [Material] resource. @@ -1982,6 +2016,7 @@ Creates a new mesh and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]mesh_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. To place in a scene, attach this mesh to an instance using [method instance_set_base] using the returned RID. + This is the internal equivalent of the [Mesh] resource. @@ -2154,6 +2189,7 @@ Creates a new multimesh on the RenderingServer and returns an [RID] handle. This RID will be used in all [code]multimesh_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. To place in a scene, attach this multimesh to an instance using [method instance_set_base] using the returned RID. + This is the internal equivalent of the [MultiMesh] resource. diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml index e76f805e3c..8d92616d6f 100644 --- a/doc/classes/Viewport.xml +++ b/doc/classes/Viewport.xml @@ -76,6 +76,7 @@ + Returns rendering statistics of the given type. See [enum RenderInfoType] and [enum RenderInfo] for options. @@ -165,6 +166,7 @@ + Helper method which calls the [code]set_text()[/code] method on the currently focused [Control], provided that it is defined (e.g. if the focused Control is [Button] or [LineEdit]). -- cgit v1.2.3 From ed1eb1e18f0fcb469912cd493ba79be8e880855e Mon Sep 17 00:00:00 2001 From: kobewi Date: Wed, 29 Mar 2023 16:21:22 +0200 Subject: Update UndoRedo description (cherry picked from commit 3a06e6af76a45ecda4d2247f78046f3e08260919) --- doc/classes/EditorUndoRedoManager.xml | 2 ++ doc/classes/UndoRedo.xml | 31 ++++++++++++++++++++++++------- 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/doc/classes/EditorUndoRedoManager.xml b/doc/classes/EditorUndoRedoManager.xml index 4d6938e6aa..bf2acd0805 100644 --- a/doc/classes/EditorUndoRedoManager.xml +++ b/doc/classes/EditorUndoRedoManager.xml @@ -10,6 +10,8 @@ - If the object is a built-in resource, use the scene from its path; - If the object is external resource or anything else, use global history. This guessing can sometimes yield false results, so you can provide a custom context object when creating an action. + [EditorUndoRedoManager] is intended to be used by Godot editor plugins. You can obtain it using [method EditorPlugin.get_undo_redo]. For non-editor uses or plugins that don't need to integrate with the editor's undo history, use [UndoRedo] instead. + The manager's API is mostly the same as in [UndoRedo], so you can refer to its documentation for more examples. The main difference is that [EditorUndoRedoManager] uses object + method name for actions, instead of [Callable]. diff --git a/doc/classes/UndoRedo.xml b/doc/classes/UndoRedo.xml index e43bceb941..3365806b4c 100644 --- a/doc/classes/UndoRedo.xml +++ b/doc/classes/UndoRedo.xml @@ -1,15 +1,15 @@ - Helper to manage undo/redo operations in the editor or custom tools. + General-purpose helper to manage undo/redo operations. - Helper to manage undo/redo operations in the editor or custom tools. It works by registering methods and property changes inside "actions". + UndoRedo works by registering methods and property changes inside "actions". Common behavior is to create an action, then add do/undo calls to functions or property changes, then committing the action. - Here's an example on how to add an action to the Godot editor's own [UndoRedo], from a plugin: + Here's an example on how to add an UndoRedo action: [codeblocks] [gdscript] - var undo_redo = get_undo_redo() # Method of EditorPlugin. + var undo_redo = UndoRedo.new() func do_something(): pass # Put your code here. @@ -20,8 +20,8 @@ func _on_my_button_pressed(): var node = get_node("MyNode2D") undo_redo.create_action("Move the node") - undo_redo.add_do_method(self, "do_something") - undo_redo.add_undo_method(self, "undo_something") + undo_redo.add_do_method(do_something) + undo_redo.add_undo_method(undo_something) undo_redo.add_do_property(node, "position", Vector2(100,100)) undo_redo.add_undo_property(node, "position", node.position) undo_redo.commit_action() @@ -31,7 +31,7 @@ public override void _Ready() { - _undoRedo = GetUndoRedo(); // Method of EditorPlugin. + _undoRedo = new UndoRedo(); } public void DoSomething() @@ -58,6 +58,7 @@ [/codeblocks] [method create_action], [method add_do_method], [method add_undo_method], [method add_do_property], [method add_undo_property], and [method commit_action] should be called one after the other, like in the example. Not doing so could lead to crashes. If you don't need to register a method, you can leave [method add_do_method] and [method add_undo_method] out; the same goes for properties. You can also register more than one method/property. + If you are making an [EditorPlugin] and want to integrate into the editor's undo history, use [EditorUndoRedoManager] instead. @@ -83,6 +84,14 @@ Register a reference for "do" that will be erased if the "do" history is lost. This is useful mostly for new nodes created for the "do" call. Do not use for resources. + [codeblock] + var node = Node2D.new() + undo_redo.create_action("Add node") + undo_redo.add_do_method(add_child.bind(node)) + undo_redo.add_do_reference(node) + undo_redo.add_undo_method(remove_child.bind(node)) + undo_redo.commit_action() + [/codeblock] @@ -106,6 +115,14 @@ Register a reference for "undo" that will be erased if the "undo" history is lost. This is useful mostly for nodes removed with the "do" call (not the "undo" call!). + [codeblock] + var node = $Node2D + undo_redo.create_action("Remove node") + undo_redo.add_do_method(remove_child.bind(node)) + undo_redo.add_undo_method(add_child.bind(node)) + undo_redo.add_undo_reference(node) + undo_redo.commit_action() + [/codeblock] -- cgit v1.2.3 From d0e906327d7dd9b0aa1fa97ff7682d1539f45aa2 Mon Sep 17 00:00:00 2001 From: Araraura <25017422+Araraura@users.noreply.github.com> Date: Fri, 31 Mar 2023 20:30:29 +0000 Subject: Fix typo and slightly reword in @GDScript.xml Fix "the every following property" to "then every following property" and change "is added" to "will be added". (cherry picked from commit e1c0df70485266e0385aed4962934bb26cb325e9) --- modules/gdscript/doc_classes/@GDScript.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/gdscript/doc_classes/@GDScript.xml b/modules/gdscript/doc_classes/@GDScript.xml index 13d223b0d9..b05de11882 100644 --- a/modules/gdscript/doc_classes/@GDScript.xml +++ b/modules/gdscript/doc_classes/@GDScript.xml @@ -486,7 +486,7 @@ Define a new group for the following exported properties. This helps to organize properties in the Inspector dock. Groups can be added with an optional [param prefix], which would make group to only consider properties that have this prefix. The grouping will break on the first property that doesn't have a prefix. The prefix is also removed from the property's name in the Inspector dock. - If no [param prefix] is provided, the every following property is added to the group. The group ends when then next group or category is defined. You can also force end a group by using this annotation with empty strings for parameters, [code]@export_group("", "")[/code]. + If no [param prefix] is provided, then every following property will be added to the group. The group ends when then next group or category is defined. You can also force end a group by using this annotation with empty strings for parameters, [code]@export_group("", "")[/code]. Groups cannot be nested, use [annotation @export_subgroup] to add subgroups within groups. See also [constant PROPERTY_USAGE_GROUP]. [codeblock] -- cgit v1.2.3 From 0a8fdde9241c495a1a3b5f58c78910c9eaa12dee Mon Sep 17 00:00:00 2001 From: Yuri Sizov Date: Mon, 3 Apr 2023 19:18:55 +0200 Subject: Add changelog for 4.0.2 --- CHANGELOG.md | 217 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 216 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a386e5a3c..29d7698f61 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,220 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## [4.0.2] - TBD + +See the [release announcement](https://godotengine.org/article/maintenance-release-godot-4-0-2) for details. + +### Added + +#### Core + +- Add a missing `ImageTextureLayered::_images` setter for the C# bindings ([GH-74668](https://github.com/godotengine/godot/pull/74668)). +- Exposing more project settings for documentation ([GH-74727](https://github.com/godotengine/godot/pull/74727)). + +#### Physics + +- Expose the `apply_floor_snap` function to allow manual snap ([GH-73749](https://github.com/godotengine/godot/pull/73749)). + +#### Porting + +- Android: Use the new API for virtual keyboard height detection on Android, bugfix for old API ([GH-74398](https://github.com/godotengine/godot/pull/74398)). +- Android: Configure maven central snapshot versions for the Godot Android library ([GH-74470](https://github.com/godotengine/godot/pull/74470)). +- Android: Add "filesRoot" path to Android provider paths xml ([GH-74673](https://github.com/godotengine/godot/pull/74673)). +- macOS: Re-add support for the `_sc_` inside app bundle. ([GH-73429](https://github.com/godotengine/godot/pull/73429)). + +#### Project converter + +- Add conversion for `Vector2` `tangent()` -> `orthogonal()` ([GH-74515](https://github.com/godotengine/godot/pull/74515)). +- Add navigation renames to the converter ([GH-75513](https://github.com/godotengine/godot/pull/75513)). + +#### Shaders + +- Add drag and drop support for shader include files in shader editor ([GH-74869](https://github.com/godotengine/godot/pull/74869)). + +#### XR + +- Add `XRServer.world_origin` property ([GH-74151](https://github.com/godotengine/godot/pull/74151)). +- Enable access to the Valve Index grip force sensors ([GH-74787](https://github.com/godotengine/godot/pull/74787)). + +### Changed + +#### 2D + +- Use 8×8 default grid size for TextureRegion and 2D polygon editors ([GH-73685](https://github.com/godotengine/godot/pull/73685)). +- Don't allow selecting nodes without owner in the editor ([GH-75492](https://github.com/godotengine/godot/pull/75492)). + +#### Animation + +- Update property keying state without a full Inspector rebuild ([GH-74564](https://github.com/godotengine/godot/pull/74564)). + +#### Buildsystem + +- Exit with non-zero status if there are issues with FreeType dependencies ([GH-74645](https://github.com/godotengine/godot/pull/74645)). +- SCons: Cleanup `pulseaudio` defines for Linux ([GH-74666](https://github.com/godotengine/godot/pull/74666)). + +#### C#/.NET + +- Encode `GodotProjectDir` as Base64 to prevent issues with special characters ([GH-74312](https://github.com/godotengine/godot/pull/74312)). +- Do not print errors about missing references to intentionally ignored members ([GH-75284](https://github.com/godotengine/godot/pull/75284)). + +#### Core + +- Make `Gradient` resort points on `reverse` ([GH-75235](https://github.com/godotengine/godot/pull/75235)). +- Port robust signal (dis)connection to `ShapeCast2D` ([GH-75266](https://github.com/godotengine/godot/pull/75266)). + +#### Editor + +- Improve POT Generation dialog ([GH-74213](https://github.com/godotengine/godot/pull/74213)). +- Hide internal settings from the class reference ([GH-74226](https://github.com/godotengine/godot/pull/74226)). +- Remove disabled plugins from active plugins ([GH-75331](https://github.com/godotengine/godot/pull/75331)). +- More i18n improvements ([GH-75385](https://github.com/godotengine/godot/pull/75385)). + +#### Export + +- Delete unused compression formats from `.import` files when exporting ([GH-74684](https://github.com/godotengine/godot/pull/74684)). + +#### GDScript + +- Make GDScript number highlighting stricter ([GH-74184](https://github.com/godotengine/godot/pull/74184)). + +#### GUI + +- Improve layout direction/locale automatic selection ([GH-73716](https://github.com/godotengine/godot/pull/73716)). +- Add mutex for FreeType face creation/deletion operations in TextServer ([GH-73987](https://github.com/godotengine/godot/pull/73987)). + +#### Input + +- Remove `meta_mem` update on keyup/keydown on Windows ([GH-75172](https://github.com/godotengine/godot/pull/75172)). + +#### Physics + +- Revert attempted fix of trimesh CCD ([GH-74861](https://github.com/godotengine/godot/pull/74861)). + +#### Porting + +- Android: Bump the target SDK version to 33 (Android 13) ([GH-75203](https://github.com/godotengine/godot/pull/75203)). + +#### Project converter + +- Remove Tween properties/signals from renames ([GH-75443](https://github.com/godotengine/godot/pull/75443)). + +#### Rendering + +- Incorporating the availability of screen and depth textures for the GLES3 backend ([GH-72361](https://github.com/godotengine/godot/pull/72361)). + +#### Thirdparty + +- mymindstorm/setup-emsdk updated to 12. + +#### XR + +- Replace OpenXR operating system alert dialog with a warning log message ([GH-73144](https://github.com/godotengine/godot/pull/73144)). +- Check hardware sRGB conversion when an sRGB target is used ([GH-74892](https://github.com/godotengine/godot/pull/74892)). + +### Fixed + +#### 2D + +- Fix preview rendering and transform calculations in the tiles editor ([GH-74982](https://github.com/godotengine/godot/pull/74982)). +- Fix `ENTER_CANVAS` / `VISIBILITY_CHANGED` notification order when `CanvasItem` enters tree ([GH-75238](https://github.com/godotengine/godot/pull/75238)). +- Fix a crash in the tiles editor when merging atlases ([GH-75361](https://github.com/godotengine/godot/pull/75361)). + +#### 3D + +- Fix GridMap signal `cell_size_changed` disconnect error ([GH-74890](https://github.com/godotengine/godot/pull/74890)). + +#### Animation + +- Fix `AnimatedSprite2D` autoplay warning ([GH-75258](https://github.com/godotengine/godot/pull/75258)). + +#### Buildsystem + +- Fix xml namespace in org.godotengine.Godot.xml ([GH-74920](https://github.com/godotengine/godot/pull/74920)). + +#### C#/.NET + +- Fix building projects for MSBuild before 17.3 ([GH-74479](https://github.com/godotengine/godot/pull/74479)). +- Fix `Array.AddRange` index out of bounds ([GH-75357](https://github.com/godotengine/godot/pull/75357)). + +#### Core + +- Fix some race conditions that happen during initialization ([GH-73793](https://github.com/godotengine/godot/pull/73793)). +- Fix crash in resource load ([GH-74166](https://github.com/godotengine/godot/pull/74166)). +- Fix `randfn` to prevent it from generating nan values ([GH-74248](https://github.com/godotengine/godot/pull/74248)). +- Fix Variant hashing for floats ([GH-74600](https://github.com/godotengine/godot/pull/74600)). +- Fix type check for `max`/`min` ([GH-74770](https://github.com/godotengine/godot/pull/74770)). +- Fix `Array.slice()` rounding when step is other than 1 ([GH-74909](https://github.com/godotengine/godot/pull/74909)). + +#### Editor + +- Fix cancelling selection while gizmo editing making uncommitted changes ([GH-71156](https://github.com/godotengine/godot/pull/71156)). +- Fix `EditorUndoRedoManager`'s handling of `MERGE_ENDS` ([GH-74460](https://github.com/godotengine/godot/pull/74460)). +- Fix built-in scripts missing their methods on signal connection ([GH-74495](https://github.com/godotengine/godot/pull/74495)). +- Fix "Download Project Source" for the Web Editor ([GH-75194](https://github.com/godotengine/godot/pull/75194)). +- Fix incorrect sizes of some editor elements ([GH-75379](https://github.com/godotengine/godot/pull/75379), [GH-75381](https://github.com/godotengine/godot/pull/75381)). + +#### Export + +- Fix GDExtensions library export when multiple architectures are set ([GH-74057](https://github.com/godotengine/godot/pull/74057)). + +#### GDScript + +- Fix "Find in Files" search results not opening built-in script ([GH-74401](https://github.com/godotengine/godot/pull/74401)). +- Fix false positive `REDUNDANT_AWAIT` warning ([GH-74949](https://github.com/godotengine/godot/pull/74949)). + +#### GUI + +- Fix scrolling behavior with zero/low page value ([GH-67910](https://github.com/godotengine/godot/pull/67910)). +- Fix some ways to create inconsistent Viewport size states ([GH-73188](https://github.com/godotengine/godot/pull/73188)). +- Fix `GraphNode` resizing when its bottom border is too thin ([GH-73800](https://github.com/godotengine/godot/pull/73800)). +- Fix IME position in the single window mode sub-windows ([GH-74472](https://github.com/godotengine/godot/pull/74472)). +- Fix gutter set width results in receiving only half of the desired size ([GH-74537](https://github.com/godotengine/godot/pull/74537)). +- Fix `get_drag_data` not overridable in some Controls ([GH-75122](https://github.com/godotengine/godot/pull/75122)). +- Fix block caret size at the end of the line ([GH-75597](https://github.com/godotengine/godot/pull/75597)). + +#### Import + +- Fix `ResourceImporterLayeredTexture::import()` `high_quality` variable type ([GH-75244](https://github.com/godotengine/godot/pull/75244)). + +#### Input + +- Fix layout bug in `keyboard_get_keycode_from_physical` on Linux/X11 ([GH-75461](https://github.com/godotengine/godot/pull/75461)). + +#### Navigation + +- Fix GridMap free navigation RID error spam ([GH-74889](https://github.com/godotengine/godot/pull/74889)). +- Fix agents with disabled avoidance getting added to avoidance simulation ([GH-74893](https://github.com/godotengine/godot/pull/74893)). + +#### Networking + +- Fix list handling in `SceneReplicationConfig` ([GH-74552](https://github.com/godotengine/godot/pull/74552)). + +#### Physics + +- Fix `collide_shape` return type ([GH-75260](https://github.com/godotengine/godot/pull/75260)). +- Fix property hint for platform layers on 3D physics body ([GH-75544](https://github.com/godotengine/godot/pull/75544)). + +#### Porting + +- Android: Fix directory access when the running app has the `All files access` permission ([GH-75146](https://github.com/godotengine/godot/pull/75146)). +- macOS: Fix infinite loop caused by global menu callbacks which trigger EditorProgress dialog ([GH-75254](https://github.com/godotengine/godot/pull/75254)). + +#### Rendering + +- Fix spotlight shadows in volumetric fog ([GH-73919](https://github.com/godotengine/godot/pull/73919)). +- Fix issues with point size not functioning correctly in GLES3 ([GH-73966](https://github.com/godotengine/godot/pull/73966)). +- Update GPUParticles2D/3D speed scale on `ENTER_TREE` ([GH-75398](https://github.com/godotengine/godot/pull/75398)). + +#### Shaders + +- Fix ndc calculation for LinearSceneDepth VS node in GLES3 ([GH-74910](https://github.com/godotengine/godot/pull/74910)). + +#### XR + +- Fix typo in OpenXR pose orientation check ([GH-74928](https://github.com/godotengine/godot/pull/74928)). + + ## [4.0.1] - 2023-03-20 See the [release announcement](https://godotengine.org/article/maintenance-release-godot-4-0-1) for details. @@ -954,7 +1168,7 @@ See the [release announcement](https://godotengine.org/article/godot-3-4-is-rele #### Thirdparty -- Bullet uppdated to version 3.17. +- Bullet updated to version 3.17. - Embree updated to version 3.13.0. - MbedTLS updated to version 2.16.11 (security update). - NanoSVG updated to 2021-09-03 git snapshot (security update). @@ -2603,6 +2817,7 @@ See the [release announcement](https://godotengine.org/article/godot-3-3-has-arr - Only WebAssembly is supported now, since all browsers supporting WebGL 2.0 also support WebAssembly. +[4.0.2]: https://github.com/godotengine/godot/compare/4.0.1-stable...4.0.2-stable [4.0.1]: https://github.com/godotengine/godot/compare/4.0-stable...4.0.1-stable [4.0]: https://github.com/godotengine/godot/compare/3.2-stable...4.0-stable [3.5]: https://github.com/godotengine/godot/compare/3.4-stable...3.5-stable -- cgit v1.2.3