summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Franke <arnfranke@yahoo.com>2021-03-16 02:27:53 -0400
committerAaron Franke <arnfranke@yahoo.com>2024-02-26 05:22:45 -0600
commit1cb531ddb6fedb5bed432eeaa17793a9e07f61ac (patch)
treee2c7744134fab73f7d4f1e12e38b53735cb594c2
parent8eb34cb78bc2df3715cfdfcf4562bd36ddf91f7f (diff)
downloadredot-engine-1cb531ddb6fedb5bed432eeaa17793a9e07f61ac.tar.gz
Move 2D-only resources to their own folder
-rw-r--r--editor/plugins/collision_shape_2d_editor_plugin.cpp16
-rw-r--r--editor/plugins/tiles/atlas_merging_dialog.h2
-rw-r--r--editor/plugins/tiles/tile_atlas_view.h2
-rw-r--r--editor/plugins/tiles/tile_set_atlas_source_editor.h2
-rw-r--r--editor/plugins/tiles/tile_set_editor.h2
-rw-r--r--editor/plugins/tiles/tile_set_scenes_collection_source_editor.h2
-rw-r--r--editor/plugins/tiles/tiles_editor_plugin.cpp2
-rw-r--r--modules/navigation/2d/nav_mesh_generator_2d.cpp10
-rw-r--r--scene/2d/collision_object_2d.h2
-rw-r--r--scene/2d/collision_polygon_2d.cpp4
-rw-r--r--scene/2d/collision_shape_2d.cpp4
-rw-r--r--scene/2d/collision_shape_2d.h2
-rw-r--r--scene/2d/shape_cast_2d.cpp2
-rw-r--r--scene/2d/shape_cast_2d.h2
-rw-r--r--scene/2d/skeleton_2d.h2
-rw-r--r--scene/2d/tile_map.h2
-rw-r--r--scene/2d/tile_map_layer.h2
-rw-r--r--scene/2d/tile_map_layer_group.cpp2
-rw-r--r--scene/2d/touch_screen_button.h2
-rw-r--r--scene/register_scene_types.cpp38
-rw-r--r--scene/resources/2d/SCsub6
-rw-r--r--scene/resources/2d/capsule_shape_2d.cpp (renamed from scene/resources/capsule_shape_2d.cpp)0
-rw-r--r--scene/resources/2d/capsule_shape_2d.h (renamed from scene/resources/capsule_shape_2d.h)2
-rw-r--r--scene/resources/2d/circle_shape_2d.cpp (renamed from scene/resources/circle_shape_2d.cpp)0
-rw-r--r--scene/resources/2d/circle_shape_2d.h (renamed from scene/resources/circle_shape_2d.h)2
-rw-r--r--scene/resources/2d/concave_polygon_shape_2d.cpp (renamed from scene/resources/concave_polygon_shape_2d.cpp)0
-rw-r--r--scene/resources/2d/concave_polygon_shape_2d.h (renamed from scene/resources/concave_polygon_shape_2d.h)2
-rw-r--r--scene/resources/2d/convex_polygon_shape_2d.cpp (renamed from scene/resources/convex_polygon_shape_2d.cpp)0
-rw-r--r--scene/resources/2d/convex_polygon_shape_2d.h (renamed from scene/resources/convex_polygon_shape_2d.h)2
-rw-r--r--scene/resources/2d/polygon_path_finder.cpp (renamed from scene/resources/polygon_path_finder.cpp)0
-rw-r--r--scene/resources/2d/polygon_path_finder.h (renamed from scene/resources/polygon_path_finder.h)0
-rw-r--r--scene/resources/2d/rectangle_shape_2d.cpp (renamed from scene/resources/rectangle_shape_2d.cpp)0
-rw-r--r--scene/resources/2d/rectangle_shape_2d.h (renamed from scene/resources/rectangle_shape_2d.h)2
-rw-r--r--scene/resources/2d/segment_shape_2d.cpp (renamed from scene/resources/segment_shape_2d.cpp)0
-rw-r--r--scene/resources/2d/segment_shape_2d.h (renamed from scene/resources/segment_shape_2d.h)2
-rw-r--r--scene/resources/2d/separation_ray_shape_2d.cpp (renamed from scene/resources/separation_ray_shape_2d.cpp)0
-rw-r--r--scene/resources/2d/separation_ray_shape_2d.h (renamed from scene/resources/separation_ray_shape_2d.h)2
-rw-r--r--scene/resources/2d/shape_2d.cpp (renamed from scene/resources/shape_2d.cpp)0
-rw-r--r--scene/resources/2d/shape_2d.h (renamed from scene/resources/shape_2d.h)0
-rw-r--r--scene/resources/2d/skeleton/skeleton_modification_2d.cpp (renamed from scene/resources/skeleton_modification_2d.cpp)0
-rw-r--r--scene/resources/2d/skeleton/skeleton_modification_2d.h (renamed from scene/resources/skeleton_modification_2d.h)2
-rw-r--r--scene/resources/2d/skeleton/skeleton_modification_2d_ccdik.cpp (renamed from scene/resources/skeleton_modification_2d_ccdik.cpp)0
-rw-r--r--scene/resources/2d/skeleton/skeleton_modification_2d_ccdik.h (renamed from scene/resources/skeleton_modification_2d_ccdik.h)2
-rw-r--r--scene/resources/2d/skeleton/skeleton_modification_2d_fabrik.cpp (renamed from scene/resources/skeleton_modification_2d_fabrik.cpp)0
-rw-r--r--scene/resources/2d/skeleton/skeleton_modification_2d_fabrik.h (renamed from scene/resources/skeleton_modification_2d_fabrik.h)2
-rw-r--r--scene/resources/2d/skeleton/skeleton_modification_2d_jiggle.cpp (renamed from scene/resources/skeleton_modification_2d_jiggle.cpp)0
-rw-r--r--scene/resources/2d/skeleton/skeleton_modification_2d_jiggle.h (renamed from scene/resources/skeleton_modification_2d_jiggle.h)2
-rw-r--r--scene/resources/2d/skeleton/skeleton_modification_2d_lookat.cpp (renamed from scene/resources/skeleton_modification_2d_lookat.cpp)0
-rw-r--r--scene/resources/2d/skeleton/skeleton_modification_2d_lookat.h (renamed from scene/resources/skeleton_modification_2d_lookat.h)2
-rw-r--r--scene/resources/2d/skeleton/skeleton_modification_2d_physicalbones.cpp (renamed from scene/resources/skeleton_modification_2d_physicalbones.cpp)0
-rw-r--r--scene/resources/2d/skeleton/skeleton_modification_2d_physicalbones.h (renamed from scene/resources/skeleton_modification_2d_physicalbones.h)2
-rw-r--r--scene/resources/2d/skeleton/skeleton_modification_2d_stackholder.cpp (renamed from scene/resources/skeleton_modification_2d_stackholder.cpp)0
-rw-r--r--scene/resources/2d/skeleton/skeleton_modification_2d_stackholder.h (renamed from scene/resources/skeleton_modification_2d_stackholder.h)2
-rw-r--r--scene/resources/2d/skeleton/skeleton_modification_2d_twoboneik.cpp (renamed from scene/resources/skeleton_modification_2d_twoboneik.cpp)0
-rw-r--r--scene/resources/2d/skeleton/skeleton_modification_2d_twoboneik.h (renamed from scene/resources/skeleton_modification_2d_twoboneik.h)2
-rw-r--r--scene/resources/2d/skeleton/skeleton_modification_stack_2d.cpp (renamed from scene/resources/skeleton_modification_stack_2d.cpp)0
-rw-r--r--scene/resources/2d/skeleton/skeleton_modification_stack_2d.h (renamed from scene/resources/skeleton_modification_stack_2d.h)2
-rw-r--r--scene/resources/2d/tile_set.compat.inc (renamed from scene/resources/tile_set.compat.inc)0
-rw-r--r--scene/resources/2d/tile_set.cpp (renamed from scene/resources/tile_set.cpp)1
-rw-r--r--scene/resources/2d/tile_set.h (renamed from scene/resources/tile_set.h)4
-rw-r--r--scene/resources/2d/world_boundary_shape_2d.cpp (renamed from scene/resources/world_boundary_shape_2d.cpp)0
-rw-r--r--scene/resources/2d/world_boundary_shape_2d.h (renamed from scene/resources/world_boundary_shape_2d.h)2
-rw-r--r--scene/resources/SCsub2
-rw-r--r--scu_builders.py1
-rw-r--r--tests/scene/test_viewport.h2
65 files changed, 79 insertions, 73 deletions
diff --git a/editor/plugins/collision_shape_2d_editor_plugin.cpp b/editor/plugins/collision_shape_2d_editor_plugin.cpp
index 3191858657..12dde46193 100644
--- a/editor/plugins/collision_shape_2d_editor_plugin.cpp
+++ b/editor/plugins/collision_shape_2d_editor_plugin.cpp
@@ -35,14 +35,14 @@
#include "editor/editor_node.h"
#include "editor/editor_settings.h"
#include "editor/editor_undo_redo_manager.h"
-#include "scene/resources/capsule_shape_2d.h"
-#include "scene/resources/circle_shape_2d.h"
-#include "scene/resources/concave_polygon_shape_2d.h"
-#include "scene/resources/convex_polygon_shape_2d.h"
-#include "scene/resources/rectangle_shape_2d.h"
-#include "scene/resources/segment_shape_2d.h"
-#include "scene/resources/separation_ray_shape_2d.h"
-#include "scene/resources/world_boundary_shape_2d.h"
+#include "scene/resources/2d/capsule_shape_2d.h"
+#include "scene/resources/2d/circle_shape_2d.h"
+#include "scene/resources/2d/concave_polygon_shape_2d.h"
+#include "scene/resources/2d/convex_polygon_shape_2d.h"
+#include "scene/resources/2d/rectangle_shape_2d.h"
+#include "scene/resources/2d/segment_shape_2d.h"
+#include "scene/resources/2d/separation_ray_shape_2d.h"
+#include "scene/resources/2d/world_boundary_shape_2d.h"
#include "scene/scene_string_names.h"
CollisionShape2DEditor::CollisionShape2DEditor() {
diff --git a/editor/plugins/tiles/atlas_merging_dialog.h b/editor/plugins/tiles/atlas_merging_dialog.h
index 324cc82490..2517db2ccd 100644
--- a/editor/plugins/tiles/atlas_merging_dialog.h
+++ b/editor/plugins/tiles/atlas_merging_dialog.h
@@ -35,7 +35,7 @@
#include "scene/gui/dialogs.h"
#include "scene/gui/item_list.h"
#include "scene/gui/texture_rect.h"
-#include "scene/resources/tile_set.h"
+#include "scene/resources/2d/tile_set.h"
class EditorFileDialog;
class EditorPropertyVector2i;
diff --git a/editor/plugins/tiles/tile_atlas_view.h b/editor/plugins/tiles/tile_atlas_view.h
index e5b088af61..e5b4863b05 100644
--- a/editor/plugins/tiles/tile_atlas_view.h
+++ b/editor/plugins/tiles/tile_atlas_view.h
@@ -37,7 +37,7 @@
#include "scene/gui/center_container.h"
#include "scene/gui/label.h"
#include "scene/gui/margin_container.h"
-#include "scene/resources/tile_set.h"
+#include "scene/resources/2d/tile_set.h"
class ViewPanner;
diff --git a/editor/plugins/tiles/tile_set_atlas_source_editor.h b/editor/plugins/tiles/tile_set_atlas_source_editor.h
index b98705baf1..322de81045 100644
--- a/editor/plugins/tiles/tile_set_atlas_source_editor.h
+++ b/editor/plugins/tiles/tile_set_atlas_source_editor.h
@@ -35,7 +35,7 @@
#include "tile_data_editors.h"
#include "scene/gui/split_container.h"
-#include "scene/resources/tile_set.h"
+#include "scene/resources/2d/tile_set.h"
class Popup;
class TileSet;
diff --git a/editor/plugins/tiles/tile_set_editor.h b/editor/plugins/tiles/tile_set_editor.h
index 755b940db2..68ab046ecf 100644
--- a/editor/plugins/tiles/tile_set_editor.h
+++ b/editor/plugins/tiles/tile_set_editor.h
@@ -33,7 +33,7 @@
#include "atlas_merging_dialog.h"
#include "scene/gui/tab_bar.h"
-#include "scene/resources/tile_set.h"
+#include "scene/resources/2d/tile_set.h"
#include "tile_proxies_manager_dialog.h"
#include "tile_set_atlas_source_editor.h"
#include "tile_set_scenes_collection_source_editor.h"
diff --git a/editor/plugins/tiles/tile_set_scenes_collection_source_editor.h b/editor/plugins/tiles/tile_set_scenes_collection_source_editor.h
index 82de063a07..5527685b24 100644
--- a/editor/plugins/tiles/tile_set_scenes_collection_source_editor.h
+++ b/editor/plugins/tiles/tile_set_scenes_collection_source_editor.h
@@ -33,7 +33,7 @@
#include "editor/editor_inspector.h"
#include "scene/gui/box_container.h"
-#include "scene/resources/tile_set.h"
+#include "scene/resources/2d/tile_set.h"
class Button;
class ItemList;
diff --git a/editor/plugins/tiles/tiles_editor_plugin.cpp b/editor/plugins/tiles/tiles_editor_plugin.cpp
index 46bc072c18..e7bf812a6c 100644
--- a/editor/plugins/tiles/tiles_editor_plugin.cpp
+++ b/editor/plugins/tiles/tiles_editor_plugin.cpp
@@ -47,8 +47,8 @@
#include "scene/gui/button.h"
#include "scene/gui/control.h"
#include "scene/gui/separator.h"
+#include "scene/resources/2d/tile_set.h"
#include "scene/resources/image_texture.h"
-#include "scene/resources/tile_set.h"
TilesEditorUtils *TilesEditorUtils::singleton = nullptr;
TileMapEditorPlugin *tile_map_plugin_singleton = nullptr;
diff --git a/modules/navigation/2d/nav_mesh_generator_2d.cpp b/modules/navigation/2d/nav_mesh_generator_2d.cpp
index 836dee8178..9fdfb20842 100644
--- a/modules/navigation/2d/nav_mesh_generator_2d.cpp
+++ b/modules/navigation/2d/nav_mesh_generator_2d.cpp
@@ -38,13 +38,13 @@
#include "scene/2d/physics_body_2d.h"
#include "scene/2d/polygon_2d.h"
#include "scene/2d/tile_map.h"
-#include "scene/resources/capsule_shape_2d.h"
-#include "scene/resources/circle_shape_2d.h"
-#include "scene/resources/concave_polygon_shape_2d.h"
-#include "scene/resources/convex_polygon_shape_2d.h"
+#include "scene/resources/2d/capsule_shape_2d.h"
+#include "scene/resources/2d/circle_shape_2d.h"
+#include "scene/resources/2d/concave_polygon_shape_2d.h"
+#include "scene/resources/2d/convex_polygon_shape_2d.h"
+#include "scene/resources/2d/rectangle_shape_2d.h"
#include "scene/resources/navigation_mesh_source_geometry_data_2d.h"
#include "scene/resources/navigation_polygon.h"
-#include "scene/resources/rectangle_shape_2d.h"
#include "thirdparty/clipper2/include/clipper2/clipper.h"
#include "thirdparty/misc/polypartition.h"
diff --git a/scene/2d/collision_object_2d.h b/scene/2d/collision_object_2d.h
index 780793f289..2c8534665c 100644
--- a/scene/2d/collision_object_2d.h
+++ b/scene/2d/collision_object_2d.h
@@ -33,7 +33,7 @@
#include "scene/2d/node_2d.h"
#include "scene/main/viewport.h"
-#include "scene/resources/shape_2d.h"
+#include "scene/resources/2d/shape_2d.h"
#include "servers/physics_server_2d.h"
class CollisionObject2D : public Node2D {
diff --git a/scene/2d/collision_polygon_2d.cpp b/scene/2d/collision_polygon_2d.cpp
index d2f71eca9d..3bc5bce8f0 100644
--- a/scene/2d/collision_polygon_2d.cpp
+++ b/scene/2d/collision_polygon_2d.cpp
@@ -33,8 +33,8 @@
#include "collision_object_2d.h"
#include "core/math/geometry_2d.h"
#include "scene/2d/area_2d.h"
-#include "scene/resources/concave_polygon_shape_2d.h"
-#include "scene/resources/convex_polygon_shape_2d.h"
+#include "scene/resources/2d/concave_polygon_shape_2d.h"
+#include "scene/resources/2d/convex_polygon_shape_2d.h"
#include "thirdparty/misc/polypartition.h"
diff --git a/scene/2d/collision_shape_2d.cpp b/scene/2d/collision_shape_2d.cpp
index ee413c7bc2..5539e49135 100644
--- a/scene/2d/collision_shape_2d.cpp
+++ b/scene/2d/collision_shape_2d.cpp
@@ -32,8 +32,8 @@
#include "collision_object_2d.h"
#include "scene/2d/area_2d.h"
-#include "scene/resources/concave_polygon_shape_2d.h"
-#include "scene/resources/convex_polygon_shape_2d.h"
+#include "scene/resources/2d/concave_polygon_shape_2d.h"
+#include "scene/resources/2d/convex_polygon_shape_2d.h"
void CollisionShape2D::_shape_changed() {
queue_redraw();
diff --git a/scene/2d/collision_shape_2d.h b/scene/2d/collision_shape_2d.h
index 3e13dd698c..65436f1539 100644
--- a/scene/2d/collision_shape_2d.h
+++ b/scene/2d/collision_shape_2d.h
@@ -32,7 +32,7 @@
#define COLLISION_SHAPE_2D_H
#include "scene/2d/node_2d.h"
-#include "scene/resources/shape_2d.h"
+#include "scene/resources/2d/shape_2d.h"
class CollisionObject2D;
diff --git a/scene/2d/shape_cast_2d.cpp b/scene/2d/shape_cast_2d.cpp
index 90d80d7549..38e3b3180b 100644
--- a/scene/2d/shape_cast_2d.cpp
+++ b/scene/2d/shape_cast_2d.cpp
@@ -33,7 +33,7 @@
#include "core/config/engine.h"
#include "scene/2d/collision_object_2d.h"
#include "scene/2d/physics_body_2d.h"
-#include "scene/resources/circle_shape_2d.h"
+#include "scene/resources/2d/circle_shape_2d.h"
#include "servers/physics_2d/godot_physics_server_2d.h"
void ShapeCast2D::set_target_position(const Vector2 &p_point) {
diff --git a/scene/2d/shape_cast_2d.h b/scene/2d/shape_cast_2d.h
index a577c351fd..6b8fd5b798 100644
--- a/scene/2d/shape_cast_2d.h
+++ b/scene/2d/shape_cast_2d.h
@@ -32,7 +32,7 @@
#define SHAPE_CAST_2D_H
#include "scene/2d/node_2d.h"
-#include "scene/resources/shape_2d.h"
+#include "scene/resources/2d/shape_2d.h"
#include "scene/resources/world_2d.h"
class CollisionObject2D;
diff --git a/scene/2d/skeleton_2d.h b/scene/2d/skeleton_2d.h
index 6a36a31552..ad6a47bf43 100644
--- a/scene/2d/skeleton_2d.h
+++ b/scene/2d/skeleton_2d.h
@@ -32,7 +32,7 @@
#define SKELETON_2D_H
#include "scene/2d/node_2d.h"
-#include "scene/resources/skeleton_modification_2d.h"
+#include "scene/resources/2d/skeleton/skeleton_modification_2d.h"
class Skeleton2D;
diff --git a/scene/2d/tile_map.h b/scene/2d/tile_map.h
index 16750625e5..c9844f29af 100644
--- a/scene/2d/tile_map.h
+++ b/scene/2d/tile_map.h
@@ -32,7 +32,7 @@
#define TILE_MAP_H
#include "scene/2d/tile_map_layer_group.h"
-#include "scene/resources/tile_set.h"
+#include "scene/resources/2d/tile_set.h"
class Control;
class TileMapLayer;
diff --git a/scene/2d/tile_map_layer.h b/scene/2d/tile_map_layer.h
index ac03f3155f..5a0c51d7e5 100644
--- a/scene/2d/tile_map_layer.h
+++ b/scene/2d/tile_map_layer.h
@@ -32,7 +32,7 @@
#define TILE_MAP_LAYER_H
#include "scene/2d/tile_map.h"
-#include "scene/resources/tile_set.h"
+#include "scene/resources/2d/tile_set.h"
class TileSetAtlasSource;
diff --git a/scene/2d/tile_map_layer_group.cpp b/scene/2d/tile_map_layer_group.cpp
index ac0de380a3..c596534474 100644
--- a/scene/2d/tile_map_layer_group.cpp
+++ b/scene/2d/tile_map_layer_group.cpp
@@ -32,7 +32,7 @@
#include "core/core_string_names.h"
#include "scene/2d/tile_map_layer.h"
-#include "scene/resources/tile_set.h"
+#include "scene/resources/2d/tile_set.h"
#ifdef TOOLS_ENABLED
diff --git a/scene/2d/touch_screen_button.h b/scene/2d/touch_screen_button.h
index c7dc0a323e..4467604e2b 100644
--- a/scene/2d/touch_screen_button.h
+++ b/scene/2d/touch_screen_button.h
@@ -32,8 +32,8 @@
#define TOUCH_SCREEN_BUTTON_H
#include "scene/2d/node_2d.h"
+#include "scene/resources/2d/rectangle_shape_2d.h"
#include "scene/resources/bit_map.h"
-#include "scene/resources/rectangle_shape_2d.h"
#include "scene/resources/texture.h"
class TouchScreenButton : public Node2D {
diff --git a/scene/register_scene_types.cpp b/scene/register_scene_types.cpp
index 035c6c0695..77a331f52c 100644
--- a/scene/register_scene_types.cpp
+++ b/scene/register_scene_types.cpp
@@ -139,6 +139,25 @@
#include "scene/main/timer.h"
#include "scene/main/viewport.h"
#include "scene/main/window.h"
+#include "scene/resources/2d/capsule_shape_2d.h"
+#include "scene/resources/2d/circle_shape_2d.h"
+#include "scene/resources/2d/concave_polygon_shape_2d.h"
+#include "scene/resources/2d/convex_polygon_shape_2d.h"
+#include "scene/resources/2d/polygon_path_finder.h"
+#include "scene/resources/2d/rectangle_shape_2d.h"
+#include "scene/resources/2d/segment_shape_2d.h"
+#include "scene/resources/2d/separation_ray_shape_2d.h"
+#include "scene/resources/2d/skeleton/skeleton_modification_2d.h"
+#include "scene/resources/2d/skeleton/skeleton_modification_2d_ccdik.h"
+#include "scene/resources/2d/skeleton/skeleton_modification_2d_fabrik.h"
+#include "scene/resources/2d/skeleton/skeleton_modification_2d_jiggle.h"
+#include "scene/resources/2d/skeleton/skeleton_modification_2d_lookat.h"
+#include "scene/resources/2d/skeleton/skeleton_modification_2d_physicalbones.h"
+#include "scene/resources/2d/skeleton/skeleton_modification_2d_stackholder.h"
+#include "scene/resources/2d/skeleton/skeleton_modification_2d_twoboneik.h"
+#include "scene/resources/2d/skeleton/skeleton_modification_stack_2d.h"
+#include "scene/resources/2d/tile_set.h"
+#include "scene/resources/2d/world_boundary_shape_2d.h"
#include "scene/resources/animated_texture.h"
#include "scene/resources/animation_library.h"
#include "scene/resources/atlas_texture.h"
@@ -148,12 +167,8 @@
#include "scene/resources/bone_map.h"
#include "scene/resources/camera_attributes.h"
#include "scene/resources/camera_texture.h"
-#include "scene/resources/capsule_shape_2d.h"
-#include "scene/resources/circle_shape_2d.h"
#include "scene/resources/compositor.h"
#include "scene/resources/compressed_texture.h"
-#include "scene/resources/concave_polygon_shape_2d.h"
-#include "scene/resources/convex_polygon_shape_2d.h"
#include "scene/resources/curve_texture.h"
#include "scene/resources/environment.h"
#include "scene/resources/font.h"
@@ -174,22 +189,9 @@
#include "scene/resources/particle_process_material.h"
#include "scene/resources/physics_material.h"
#include "scene/resources/placeholder_textures.h"
-#include "scene/resources/polygon_path_finder.h"
#include "scene/resources/portable_compressed_texture.h"
-#include "scene/resources/rectangle_shape_2d.h"
#include "scene/resources/resource_format_text.h"
-#include "scene/resources/segment_shape_2d.h"
-#include "scene/resources/separation_ray_shape_2d.h"
#include "scene/resources/shader_include.h"
-#include "scene/resources/skeleton_modification_2d.h"
-#include "scene/resources/skeleton_modification_2d_ccdik.h"
-#include "scene/resources/skeleton_modification_2d_fabrik.h"
-#include "scene/resources/skeleton_modification_2d_jiggle.h"
-#include "scene/resources/skeleton_modification_2d_lookat.h"
-#include "scene/resources/skeleton_modification_2d_physicalbones.h"
-#include "scene/resources/skeleton_modification_2d_stackholder.h"
-#include "scene/resources/skeleton_modification_2d_twoboneik.h"
-#include "scene/resources/skeleton_modification_stack_2d.h"
#include "scene/resources/skeleton_profile.h"
#include "scene/resources/sky.h"
#include "scene/resources/sky_material.h"
@@ -205,14 +207,12 @@
#include "scene/resources/texture.h"
#include "scene/resources/texture_rd.h"
#include "scene/resources/theme.h"
-#include "scene/resources/tile_set.h"
#include "scene/resources/video_stream.h"
#include "scene/resources/visual_shader.h"
#include "scene/resources/visual_shader_nodes.h"
#include "scene/resources/visual_shader_particle_nodes.h"
#include "scene/resources/visual_shader_sdf_nodes.h"
#include "scene/resources/world_2d.h"
-#include "scene/resources/world_boundary_shape_2d.h"
#include "scene/scene_string_names.h"
#include "scene/theme/theme_db.h"
diff --git a/scene/resources/2d/SCsub b/scene/resources/2d/SCsub
new file mode 100644
index 0000000000..fdf20e0bde
--- /dev/null
+++ b/scene/resources/2d/SCsub
@@ -0,0 +1,6 @@
+#!/usr/bin/env python
+
+Import("env")
+
+env.add_source_files(env.scene_sources, "*.cpp")
+env.add_source_files(env.scene_sources, "skeleton/*.cpp")
diff --git a/scene/resources/capsule_shape_2d.cpp b/scene/resources/2d/capsule_shape_2d.cpp
index 8268040ed9..8268040ed9 100644
--- a/scene/resources/capsule_shape_2d.cpp
+++ b/scene/resources/2d/capsule_shape_2d.cpp
diff --git a/scene/resources/capsule_shape_2d.h b/scene/resources/2d/capsule_shape_2d.h
index 4912466f96..cfd3fc6b26 100644
--- a/scene/resources/capsule_shape_2d.h
+++ b/scene/resources/2d/capsule_shape_2d.h
@@ -31,7 +31,7 @@
#ifndef CAPSULE_SHAPE_2D_H
#define CAPSULE_SHAPE_2D_H
-#include "scene/resources/shape_2d.h"
+#include "scene/resources/2d/shape_2d.h"
class CapsuleShape2D : public Shape2D {
GDCLASS(CapsuleShape2D, Shape2D);
diff --git a/scene/resources/circle_shape_2d.cpp b/scene/resources/2d/circle_shape_2d.cpp
index 0b207c33ca..0b207c33ca 100644
--- a/scene/resources/circle_shape_2d.cpp
+++ b/scene/resources/2d/circle_shape_2d.cpp
diff --git a/scene/resources/circle_shape_2d.h b/scene/resources/2d/circle_shape_2d.h
index ab0bff4ca8..203a8240eb 100644
--- a/scene/resources/circle_shape_2d.h
+++ b/scene/resources/2d/circle_shape_2d.h
@@ -31,7 +31,7 @@
#ifndef CIRCLE_SHAPE_2D_H
#define CIRCLE_SHAPE_2D_H
-#include "scene/resources/shape_2d.h"
+#include "scene/resources/2d/shape_2d.h"
class CircleShape2D : public Shape2D {
GDCLASS(CircleShape2D, Shape2D);
diff --git a/scene/resources/concave_polygon_shape_2d.cpp b/scene/resources/2d/concave_polygon_shape_2d.cpp
index 56734a8f0b..56734a8f0b 100644
--- a/scene/resources/concave_polygon_shape_2d.cpp
+++ b/scene/resources/2d/concave_polygon_shape_2d.cpp
diff --git a/scene/resources/concave_polygon_shape_2d.h b/scene/resources/2d/concave_polygon_shape_2d.h
index 7b3540a20d..8b0b77acaa 100644
--- a/scene/resources/concave_polygon_shape_2d.h
+++ b/scene/resources/2d/concave_polygon_shape_2d.h
@@ -31,7 +31,7 @@
#ifndef CONCAVE_POLYGON_SHAPE_2D_H
#define CONCAVE_POLYGON_SHAPE_2D_H
-#include "scene/resources/shape_2d.h"
+#include "scene/resources/2d/shape_2d.h"
class ConcavePolygonShape2D : public Shape2D {
GDCLASS(ConcavePolygonShape2D, Shape2D);
diff --git a/scene/resources/convex_polygon_shape_2d.cpp b/scene/resources/2d/convex_polygon_shape_2d.cpp
index 0d9e570149..0d9e570149 100644
--- a/scene/resources/convex_polygon_shape_2d.cpp
+++ b/scene/resources/2d/convex_polygon_shape_2d.cpp
diff --git a/scene/resources/convex_polygon_shape_2d.h b/scene/resources/2d/convex_polygon_shape_2d.h
index 71b98a0d25..2e448f1133 100644
--- a/scene/resources/convex_polygon_shape_2d.h
+++ b/scene/resources/2d/convex_polygon_shape_2d.h
@@ -31,7 +31,7 @@
#ifndef CONVEX_POLYGON_SHAPE_2D_H
#define CONVEX_POLYGON_SHAPE_2D_H
-#include "scene/resources/shape_2d.h"
+#include "scene/resources/2d/shape_2d.h"
class ConvexPolygonShape2D : public Shape2D {
GDCLASS(ConvexPolygonShape2D, Shape2D);
diff --git a/scene/resources/polygon_path_finder.cpp b/scene/resources/2d/polygon_path_finder.cpp
index 617a53f0a3..617a53f0a3 100644
--- a/scene/resources/polygon_path_finder.cpp
+++ b/scene/resources/2d/polygon_path_finder.cpp
diff --git a/scene/resources/polygon_path_finder.h b/scene/resources/2d/polygon_path_finder.h
index a6cf6cd584..a6cf6cd584 100644
--- a/scene/resources/polygon_path_finder.h
+++ b/scene/resources/2d/polygon_path_finder.h
diff --git a/scene/resources/rectangle_shape_2d.cpp b/scene/resources/2d/rectangle_shape_2d.cpp
index 65b1653293..65b1653293 100644
--- a/scene/resources/rectangle_shape_2d.cpp
+++ b/scene/resources/2d/rectangle_shape_2d.cpp
diff --git a/scene/resources/rectangle_shape_2d.h b/scene/resources/2d/rectangle_shape_2d.h
index f990b5967e..80fbc51b5c 100644
--- a/scene/resources/rectangle_shape_2d.h
+++ b/scene/resources/2d/rectangle_shape_2d.h
@@ -31,7 +31,7 @@
#ifndef RECTANGLE_SHAPE_2D_H
#define RECTANGLE_SHAPE_2D_H
-#include "scene/resources/shape_2d.h"
+#include "scene/resources/2d/shape_2d.h"
class RectangleShape2D : public Shape2D {
GDCLASS(RectangleShape2D, Shape2D);
diff --git a/scene/resources/segment_shape_2d.cpp b/scene/resources/2d/segment_shape_2d.cpp
index 864b4c952b..864b4c952b 100644
--- a/scene/resources/segment_shape_2d.cpp
+++ b/scene/resources/2d/segment_shape_2d.cpp
diff --git a/scene/resources/segment_shape_2d.h b/scene/resources/2d/segment_shape_2d.h
index 4bec192fd2..ad2ece883d 100644
--- a/scene/resources/segment_shape_2d.h
+++ b/scene/resources/2d/segment_shape_2d.h
@@ -31,7 +31,7 @@
#ifndef SEGMENT_SHAPE_2D_H
#define SEGMENT_SHAPE_2D_H
-#include "scene/resources/shape_2d.h"
+#include "scene/resources/2d/shape_2d.h"
class SegmentShape2D : public Shape2D {
GDCLASS(SegmentShape2D, Shape2D);
diff --git a/scene/resources/separation_ray_shape_2d.cpp b/scene/resources/2d/separation_ray_shape_2d.cpp
index 83d526626d..83d526626d 100644
--- a/scene/resources/separation_ray_shape_2d.cpp
+++ b/scene/resources/2d/separation_ray_shape_2d.cpp
diff --git a/scene/resources/separation_ray_shape_2d.h b/scene/resources/2d/separation_ray_shape_2d.h
index 8eab73d9c5..0359b41b6e 100644
--- a/scene/resources/separation_ray_shape_2d.h
+++ b/scene/resources/2d/separation_ray_shape_2d.h
@@ -31,7 +31,7 @@
#ifndef SEPARATION_RAY_SHAPE_2D_H
#define SEPARATION_RAY_SHAPE_2D_H
-#include "scene/resources/shape_2d.h"
+#include "scene/resources/2d/shape_2d.h"
class SeparationRayShape2D : public Shape2D {
GDCLASS(SeparationRayShape2D, Shape2D);
diff --git a/scene/resources/shape_2d.cpp b/scene/resources/2d/shape_2d.cpp
index 2de9b70f53..2de9b70f53 100644
--- a/scene/resources/shape_2d.cpp
+++ b/scene/resources/2d/shape_2d.cpp
diff --git a/scene/resources/shape_2d.h b/scene/resources/2d/shape_2d.h
index b1a5b24d05..b1a5b24d05 100644
--- a/scene/resources/shape_2d.h
+++ b/scene/resources/2d/shape_2d.h
diff --git a/scene/resources/skeleton_modification_2d.cpp b/scene/resources/2d/skeleton/skeleton_modification_2d.cpp
index 88a0f7b92d..88a0f7b92d 100644
--- a/scene/resources/skeleton_modification_2d.cpp
+++ b/scene/resources/2d/skeleton/skeleton_modification_2d.cpp
diff --git a/scene/resources/skeleton_modification_2d.h b/scene/resources/2d/skeleton/skeleton_modification_2d.h
index c00c3c8dc2..413b860a99 100644
--- a/scene/resources/skeleton_modification_2d.h
+++ b/scene/resources/2d/skeleton/skeleton_modification_2d.h
@@ -32,7 +32,7 @@
#define SKELETON_MODIFICATION_2D_H
#include "scene/2d/skeleton_2d.h"
-#include "scene/resources/skeleton_modification_stack_2d.h"
+#include "scene/resources/2d/skeleton/skeleton_modification_stack_2d.h"
///////////////////////////////////////
// SkeletonModification2D
diff --git a/scene/resources/skeleton_modification_2d_ccdik.cpp b/scene/resources/2d/skeleton/skeleton_modification_2d_ccdik.cpp
index 1ad8d0eccc..1ad8d0eccc 100644
--- a/scene/resources/skeleton_modification_2d_ccdik.cpp
+++ b/scene/resources/2d/skeleton/skeleton_modification_2d_ccdik.cpp
diff --git a/scene/resources/skeleton_modification_2d_ccdik.h b/scene/resources/2d/skeleton/skeleton_modification_2d_ccdik.h
index 39ea02c1df..34da89c31c 100644
--- a/scene/resources/skeleton_modification_2d_ccdik.h
+++ b/scene/resources/2d/skeleton/skeleton_modification_2d_ccdik.h
@@ -32,7 +32,7 @@
#define SKELETON_MODIFICATION_2D_CCDIK_H
#include "scene/2d/skeleton_2d.h"
-#include "scene/resources/skeleton_modification_2d.h"
+#include "scene/resources/2d/skeleton/skeleton_modification_2d.h"
///////////////////////////////////////
// SkeletonModification2DCCDIK
diff --git a/scene/resources/skeleton_modification_2d_fabrik.cpp b/scene/resources/2d/skeleton/skeleton_modification_2d_fabrik.cpp
index dd1c4a91d5..dd1c4a91d5 100644
--- a/scene/resources/skeleton_modification_2d_fabrik.cpp
+++ b/scene/resources/2d/skeleton/skeleton_modification_2d_fabrik.cpp
diff --git a/scene/resources/skeleton_modification_2d_fabrik.h b/scene/resources/2d/skeleton/skeleton_modification_2d_fabrik.h
index 3c8f1f779c..edc29ecf12 100644
--- a/scene/resources/skeleton_modification_2d_fabrik.h
+++ b/scene/resources/2d/skeleton/skeleton_modification_2d_fabrik.h
@@ -32,7 +32,7 @@
#define SKELETON_MODIFICATION_2D_FABRIK_H
#include "scene/2d/skeleton_2d.h"
-#include "scene/resources/skeleton_modification_2d.h"
+#include "scene/resources/2d/skeleton/skeleton_modification_2d.h"
///////////////////////////////////////
// SkeletonModification2DFABRIK
diff --git a/scene/resources/skeleton_modification_2d_jiggle.cpp b/scene/resources/2d/skeleton/skeleton_modification_2d_jiggle.cpp
index 2ace9577e4..2ace9577e4 100644
--- a/scene/resources/skeleton_modification_2d_jiggle.cpp
+++ b/scene/resources/2d/skeleton/skeleton_modification_2d_jiggle.cpp
diff --git a/scene/resources/skeleton_modification_2d_jiggle.h b/scene/resources/2d/skeleton/skeleton_modification_2d_jiggle.h
index 9e0d8d1bd4..7e9855839c 100644
--- a/scene/resources/skeleton_modification_2d_jiggle.h
+++ b/scene/resources/2d/skeleton/skeleton_modification_2d_jiggle.h
@@ -32,7 +32,7 @@
#define SKELETON_MODIFICATION_2D_JIGGLE_H
#include "scene/2d/skeleton_2d.h"
-#include "scene/resources/skeleton_modification_2d.h"
+#include "scene/resources/2d/skeleton/skeleton_modification_2d.h"
///////////////////////////////////////
// SkeletonModification2DJIGGLE
diff --git a/scene/resources/skeleton_modification_2d_lookat.cpp b/scene/resources/2d/skeleton/skeleton_modification_2d_lookat.cpp
index 8f6f6bc4ae..8f6f6bc4ae 100644
--- a/scene/resources/skeleton_modification_2d_lookat.cpp
+++ b/scene/resources/2d/skeleton/skeleton_modification_2d_lookat.cpp
diff --git a/scene/resources/skeleton_modification_2d_lookat.h b/scene/resources/2d/skeleton/skeleton_modification_2d_lookat.h
index d952d249f9..fbce45b83a 100644
--- a/scene/resources/skeleton_modification_2d_lookat.h
+++ b/scene/resources/2d/skeleton/skeleton_modification_2d_lookat.h
@@ -32,7 +32,7 @@
#define SKELETON_MODIFICATION_2D_LOOKAT_H
#include "scene/2d/skeleton_2d.h"
-#include "scene/resources/skeleton_modification_2d.h"
+#include "scene/resources/2d/skeleton/skeleton_modification_2d.h"
///////////////////////////////////////
// SkeletonModification2DLookAt
diff --git a/scene/resources/skeleton_modification_2d_physicalbones.cpp b/scene/resources/2d/skeleton/skeleton_modification_2d_physicalbones.cpp
index e000e947cd..e000e947cd 100644
--- a/scene/resources/skeleton_modification_2d_physicalbones.cpp
+++ b/scene/resources/2d/skeleton/skeleton_modification_2d_physicalbones.cpp
diff --git a/scene/resources/skeleton_modification_2d_physicalbones.h b/scene/resources/2d/skeleton/skeleton_modification_2d_physicalbones.h
index ec1b63bf73..09bf00782c 100644
--- a/scene/resources/skeleton_modification_2d_physicalbones.h
+++ b/scene/resources/2d/skeleton/skeleton_modification_2d_physicalbones.h
@@ -32,7 +32,7 @@
#define SKELETON_MODIFICATION_2D_PHYSICALBONES_H
#include "scene/2d/skeleton_2d.h"
-#include "scene/resources/skeleton_modification_2d.h"
+#include "scene/resources/2d/skeleton/skeleton_modification_2d.h"
///////////////////////////////////////
// SkeletonModification2DJIGGLE
diff --git a/scene/resources/skeleton_modification_2d_stackholder.cpp b/scene/resources/2d/skeleton/skeleton_modification_2d_stackholder.cpp
index 6d4cd290f1..6d4cd290f1 100644
--- a/scene/resources/skeleton_modification_2d_stackholder.cpp
+++ b/scene/resources/2d/skeleton/skeleton_modification_2d_stackholder.cpp
diff --git a/scene/resources/skeleton_modification_2d_stackholder.h b/scene/resources/2d/skeleton/skeleton_modification_2d_stackholder.h
index 17fa5f5cfe..b1054f6429 100644
--- a/scene/resources/skeleton_modification_2d_stackholder.h
+++ b/scene/resources/2d/skeleton/skeleton_modification_2d_stackholder.h
@@ -32,7 +32,7 @@
#define SKELETON_MODIFICATION_2D_STACKHOLDER_H
#include "scene/2d/skeleton_2d.h"
-#include "scene/resources/skeleton_modification_2d.h"
+#include "scene/resources/2d/skeleton/skeleton_modification_2d.h"
///////////////////////////////////////
// SkeletonModification2DJIGGLE
diff --git a/scene/resources/skeleton_modification_2d_twoboneik.cpp b/scene/resources/2d/skeleton/skeleton_modification_2d_twoboneik.cpp
index c3366d5c36..c3366d5c36 100644
--- a/scene/resources/skeleton_modification_2d_twoboneik.cpp
+++ b/scene/resources/2d/skeleton/skeleton_modification_2d_twoboneik.cpp
diff --git a/scene/resources/skeleton_modification_2d_twoboneik.h b/scene/resources/2d/skeleton/skeleton_modification_2d_twoboneik.h
index 7a5cd91c86..d528ffa66b 100644
--- a/scene/resources/skeleton_modification_2d_twoboneik.h
+++ b/scene/resources/2d/skeleton/skeleton_modification_2d_twoboneik.h
@@ -32,7 +32,7 @@
#define SKELETON_MODIFICATION_2D_TWOBONEIK_H
#include "scene/2d/skeleton_2d.h"
-#include "scene/resources/skeleton_modification_2d.h"
+#include "scene/resources/2d/skeleton/skeleton_modification_2d.h"
///////////////////////////////////////
// SkeletonModification2DJIGGLE
diff --git a/scene/resources/skeleton_modification_stack_2d.cpp b/scene/resources/2d/skeleton/skeleton_modification_stack_2d.cpp
index dcc69d4831..dcc69d4831 100644
--- a/scene/resources/skeleton_modification_stack_2d.cpp
+++ b/scene/resources/2d/skeleton/skeleton_modification_stack_2d.cpp
diff --git a/scene/resources/skeleton_modification_stack_2d.h b/scene/resources/2d/skeleton/skeleton_modification_stack_2d.h
index 6e501436fd..0732153997 100644
--- a/scene/resources/skeleton_modification_stack_2d.h
+++ b/scene/resources/2d/skeleton/skeleton_modification_stack_2d.h
@@ -32,7 +32,7 @@
#define SKELETON_MODIFICATION_STACK_2D_H
#include "scene/2d/skeleton_2d.h"
-#include "scene/resources/skeleton_modification_2d.h"
+#include "scene/resources/2d/skeleton/skeleton_modification_2d.h"
///////////////////////////////////////
// SkeletonModificationStack2D
diff --git a/scene/resources/tile_set.compat.inc b/scene/resources/2d/tile_set.compat.inc
index 873ae3aa93..873ae3aa93 100644
--- a/scene/resources/tile_set.compat.inc
+++ b/scene/resources/2d/tile_set.compat.inc
diff --git a/scene/resources/tile_set.cpp b/scene/resources/2d/tile_set.cpp
index 7e08d727ac..5ac7f127b0 100644
--- a/scene/resources/tile_set.cpp
+++ b/scene/resources/2d/tile_set.cpp
@@ -36,7 +36,6 @@
#include "core/templates/local_vector.h"
#include "core/templates/rb_set.h"
#include "scene/gui/control.h"
-#include "scene/resources/convex_polygon_shape_2d.h"
#include "scene/resources/image_texture.h"
#include "servers/navigation_server_2d.h"
diff --git a/scene/resources/tile_set.h b/scene/resources/2d/tile_set.h
index f26ed461c3..b55afd2de5 100644
--- a/scene/resources/tile_set.h
+++ b/scene/resources/2d/tile_set.h
@@ -37,13 +37,11 @@
#include "core/templates/rb_set.h"
#include "scene/2d/light_occluder_2d.h"
#include "scene/main/canvas_item.h"
-#include "scene/resources/concave_polygon_shape_2d.h"
-#include "scene/resources/convex_polygon_shape_2d.h"
+#include "scene/resources/2d/convex_polygon_shape_2d.h"
#include "scene/resources/image_texture.h"
#include "scene/resources/navigation_polygon.h"
#include "scene/resources/packed_scene.h"
#include "scene/resources/physics_material.h"
-#include "scene/resources/shape_2d.h"
#ifndef DISABLE_DEPRECATED
#include "scene/resources/shader.h"
diff --git a/scene/resources/world_boundary_shape_2d.cpp b/scene/resources/2d/world_boundary_shape_2d.cpp
index 294653659a..294653659a 100644
--- a/scene/resources/world_boundary_shape_2d.cpp
+++ b/scene/resources/2d/world_boundary_shape_2d.cpp
diff --git a/scene/resources/world_boundary_shape_2d.h b/scene/resources/2d/world_boundary_shape_2d.h
index a79b8e4e1f..a7f11e39b7 100644
--- a/scene/resources/world_boundary_shape_2d.h
+++ b/scene/resources/2d/world_boundary_shape_2d.h
@@ -31,7 +31,7 @@
#ifndef WORLD_BOUNDARY_SHAPE_2D_H
#define WORLD_BOUNDARY_SHAPE_2D_H
-#include "scene/resources/shape_2d.h"
+#include "scene/resources/2d/shape_2d.h"
class WorldBoundaryShape2D : public Shape2D {
GDCLASS(WorldBoundaryShape2D, Shape2D);
diff --git a/scene/resources/SCsub b/scene/resources/SCsub
index 9e21c627f9..060b47d687 100644
--- a/scene/resources/SCsub
+++ b/scene/resources/SCsub
@@ -22,3 +22,5 @@ env.scene_sources += scene_obj
# Needed to force rebuilding the scene files when the thirdparty code is updated.
env.Depends(scene_obj, thirdparty_obj)
+
+SConscript("2d/SCsub")
diff --git a/scu_builders.py b/scu_builders.py
index 56effb393c..740b4ca571 100644
--- a/scu_builders.py
+++ b/scu_builders.py
@@ -315,6 +315,7 @@ def generate_scu_files(max_includes_per_scu):
process_folder(["scene/gui"])
process_folder(["scene/main"])
process_folder(["scene/resources"])
+ process_folder(["scene/resources/2d"])
process_folder(["servers"])
process_folder(["servers/rendering"])
diff --git a/tests/scene/test_viewport.h b/tests/scene/test_viewport.h
index 1afae66ee0..e15b01ae9f 100644
--- a/tests/scene/test_viewport.h
+++ b/tests/scene/test_viewport.h
@@ -37,7 +37,7 @@
#include "scene/gui/subviewport_container.h"
#include "scene/main/canvas_layer.h"
#include "scene/main/window.h"
-#include "scene/resources/rectangle_shape_2d.h"
+#include "scene/resources/2d/rectangle_shape_2d.h"
#include "tests/test_macros.h"