summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
Diffstat (limited to 'scene')
-rw-r--r--scene/2d/animated_sprite.cpp71
-rw-r--r--scene/2d/animated_sprite.h6
-rw-r--r--scene/2d/area_2d.h2
-rw-r--r--scene/2d/audio_stream_player_2d.cpp2
-rw-r--r--scene/2d/canvas_item.cpp4
-rw-r--r--scene/2d/collision_polygon_2d.cpp2
-rw-r--r--scene/2d/collision_shape_2d.cpp2
-rw-r--r--scene/2d/cpu_particles_2d.h2
-rw-r--r--scene/2d/joints_2d.cpp2
-rw-r--r--scene/2d/light_2d.cpp2
-rw-r--r--scene/2d/light_occluder_2d.cpp2
-rw-r--r--scene/2d/line_2d.cpp2
-rw-r--r--scene/2d/line_builder.h4
-rw-r--r--scene/2d/navigation_polygon.cpp4
-rw-r--r--scene/2d/node_2d.cpp2
-rw-r--r--scene/2d/parallax_layer.cpp2
-rw-r--r--scene/2d/particles_2d.h2
-rw-r--r--scene/2d/path_2d.cpp2
-rw-r--r--scene/2d/physics_body_2d.cpp4
-rw-r--r--scene/2d/physics_body_2d.h2
-rw-r--r--scene/2d/position_2d.cpp2
-rw-r--r--scene/2d/ray_cast_2d.cpp2
-rw-r--r--scene/2d/screen_button.cpp6
-rw-r--r--scene/2d/sprite.cpp2
-rw-r--r--scene/2d/tile_map.cpp6
-rw-r--r--scene/2d/tile_map.h4
-rw-r--r--scene/2d/visibility_notifier_2d.cpp2
-rw-r--r--scene/3d/area.h2
-rw-r--r--scene/3d/audio_stream_player_3d.cpp2
-rw-r--r--scene/3d/baked_lightmap.cpp6
-rw-r--r--scene/3d/camera.cpp4
-rw-r--r--scene/3d/collision_shape.cpp2
-rw-r--r--scene/3d/cpu_particles.h2
-rw-r--r--scene/3d/interpolated_camera.cpp2
-rw-r--r--scene/3d/light.cpp6
-rw-r--r--scene/3d/mesh_instance.cpp2
-rw-r--r--scene/3d/particles.h2
-rw-r--r--scene/3d/path.cpp2
-rw-r--r--scene/3d/physics_body.cpp4
-rw-r--r--scene/3d/physics_body.h2
-rw-r--r--scene/3d/portal.cpp2
-rw-r--r--scene/3d/proximity_group.cpp2
-rw-r--r--scene/3d/ray_cast.cpp2
-rw-r--r--scene/3d/room_instance.cpp4
-rw-r--r--scene/3d/skeleton.cpp2
-rw-r--r--scene/3d/skeleton.h2
-rw-r--r--scene/3d/soft_body.cpp2
-rw-r--r--scene/3d/spatial.cpp4
-rw-r--r--scene/3d/spatial_velocity_tracker.cpp2
-rw-r--r--scene/3d/spring_arm.cpp2
-rw-r--r--scene/3d/sprite_3d.cpp2
-rw-r--r--scene/3d/visibility_notifier.cpp2
-rw-r--r--scene/3d/visual_instance.h4
-rw-r--r--scene/3d/voxel_light_baker.cpp4
-rw-r--r--scene/animation/animation_blend_space_2d.cpp2
-rw-r--r--scene/animation/animation_player.cpp63
-rw-r--r--scene/animation/animation_tree.cpp3
-rw-r--r--scene/animation/tween.cpp7
-rw-r--r--scene/audio/audio_player.cpp2
-rw-r--r--scene/gui/base_button.cpp2
-rw-r--r--scene/gui/button.cpp2
-rw-r--r--scene/gui/check_button.cpp2
-rw-r--r--scene/gui/color_picker.cpp6
-rw-r--r--scene/gui/container.cpp2
-rw-r--r--scene/gui/control.cpp10
-rw-r--r--scene/gui/control.h4
-rw-r--r--scene/gui/dialogs.cpp4
-rw-r--r--scene/gui/file_dialog.cpp4
-rw-r--r--scene/gui/file_dialog.h2
-rw-r--r--scene/gui/gradient_edit.cpp2
-rw-r--r--scene/gui/graph_edit.cpp4
-rw-r--r--scene/gui/graph_node.cpp3
-rw-r--r--scene/gui/item_list.cpp4
-rw-r--r--scene/gui/label.cpp6
-rw-r--r--scene/gui/line_edit.cpp10
-rw-r--r--scene/gui/menu_button.cpp2
-rw-r--r--scene/gui/option_button.cpp2
-rw-r--r--scene/gui/panel.cpp2
-rw-r--r--scene/gui/popup.cpp4
-rw-r--r--scene/gui/popup_menu.cpp8
-rw-r--r--scene/gui/reference_rect.cpp2
-rw-r--r--scene/gui/rich_text_label.cpp4
-rw-r--r--scene/gui/scroll_bar.cpp6
-rw-r--r--scene/gui/scroll_container.cpp2
-rw-r--r--scene/gui/shortcut.cpp2
-rw-r--r--scene/gui/shortcut.h4
-rw-r--r--scene/gui/slider.cpp2
-rw-r--r--scene/gui/spin_box.cpp2
-rw-r--r--scene/gui/tab_container.cpp2
-rw-r--r--scene/gui/tabs.cpp2
-rw-r--r--scene/gui/text_edit.cpp76
-rw-r--r--scene/gui/text_edit.h1
-rw-r--r--scene/gui/texture_progress.cpp8
-rw-r--r--scene/gui/tree.cpp12
-rw-r--r--scene/gui/tree.h2
-rw-r--r--scene/gui/video_player.cpp2
-rw-r--r--scene/main/http_request.h6
-rw-r--r--scene/main/instance_placeholder.cpp2
-rw-r--r--scene/main/node.cpp6
-rw-r--r--scene/main/node.h12
-rw-r--r--scene/main/scene_tree.cpp14
-rw-r--r--scene/main/scene_tree.h8
-rwxr-xr-xscene/main/timer.cpp2
-rw-r--r--scene/main/viewport.cpp6
-rw-r--r--scene/main/viewport.h2
-rw-r--r--scene/resources/animation.cpp2
-rw-r--r--scene/resources/animation.h2
-rw-r--r--scene/resources/audio_stream_sample.cpp4
-rw-r--r--scene/resources/bit_mask.cpp2
-rw-r--r--scene/resources/bit_mask.h6
-rw-r--r--scene/resources/bounds.h4
-rw-r--r--scene/resources/canvas.h2
-rw-r--r--scene/resources/color_ramp.cpp2
-rw-r--r--scene/resources/color_ramp.h2
-rw-r--r--scene/resources/convex_polygon_shape.cpp2
-rw-r--r--scene/resources/convex_polygon_shape_2d.cpp2
-rw-r--r--scene/resources/curve.cpp3
-rw-r--r--scene/resources/curve.h2
-rw-r--r--scene/resources/default_theme/default_theme.cpp2
-rw-r--r--scene/resources/dynamic_font.cpp4
-rw-r--r--scene/resources/dynamic_font.h8
-rw-r--r--scene/resources/dynamic_font_stb.cpp2
-rw-r--r--scene/resources/dynamic_font_stb.h2
-rw-r--r--scene/resources/environment.cpp2
-rw-r--r--scene/resources/environment.h2
-rw-r--r--scene/resources/font.cpp2
-rw-r--r--scene/resources/font.h4
-rw-r--r--scene/resources/material.h4
-rw-r--r--scene/resources/mesh.cpp40
-rw-r--r--scene/resources/mesh.h9
-rw-r--r--scene/resources/mesh_library.h4
-rw-r--r--scene/resources/packed_scene.cpp6
-rw-r--r--scene/resources/packed_scene.h2
-rw-r--r--scene/resources/particles_material.cpp4
-rw-r--r--scene/resources/particles_material.h2
-rw-r--r--scene/resources/physics_material.h2
-rw-r--r--scene/resources/polygon_path_finder.cpp2
-rw-r--r--scene/resources/polygon_path_finder.h2
-rw-r--r--scene/resources/primitive_meshes.cpp2
-rw-r--r--scene/resources/room.h4
-rw-r--r--scene/resources/scene_format_text.cpp10
-rw-r--r--scene/resources/scene_format_text.h8
-rw-r--r--scene/resources/shader.cpp2
-rw-r--r--scene/resources/shader.h6
-rw-r--r--scene/resources/shape.cpp2
-rw-r--r--scene/resources/shape.h2
-rw-r--r--scene/resources/shape_2d.h2
-rw-r--r--scene/resources/sky_box.cpp2
-rw-r--r--scene/resources/sky_box.h2
-rw-r--r--scene/resources/space_2d.h2
-rw-r--r--scene/resources/style_box.h2
-rw-r--r--scene/resources/surface_tool.cpp3
-rw-r--r--scene/resources/text_file.cpp2
-rw-r--r--scene/resources/text_file.h4
-rw-r--r--scene/resources/texture.cpp7
-rw-r--r--scene/resources/texture.h12
-rw-r--r--scene/resources/theme.cpp4
-rw-r--r--scene/resources/theme.h4
-rw-r--r--scene/resources/tile_set.cpp2
-rw-r--r--scene/resources/tile_set.h2
-rw-r--r--scene/resources/visual_shader.cpp2
-rw-r--r--scene/resources/visual_shader.h2
-rw-r--r--scene/resources/world.cpp4
-rw-r--r--scene/resources/world.h2
-rw-r--r--scene/resources/world_2d.cpp2
-rw-r--r--scene/resources/world_2d.h4
-rw-r--r--scene/scene_string_names.h4
167 files changed, 384 insertions, 430 deletions
diff --git a/scene/2d/animated_sprite.cpp b/scene/2d/animated_sprite.cpp
index 85e7f8df92..790606a0b2 100644
--- a/scene/2d/animated_sprite.cpp
+++ b/scene/2d/animated_sprite.cpp
@@ -29,7 +29,7 @@
/*************************************************************************/
#include "animated_sprite.h"
-#include "os/os.h"
+#include "core/os/os.h"
#include "scene/scene_string_names.h"
#define NORMAL_SUFFIX "_normal"
@@ -227,65 +227,6 @@ bool SpriteFrames::get_animation_loop(const StringName &p_anim) const {
return E->get().loop;
}
-void SpriteFrames::_set_frames(const Array &p_frames) {
-
- clear_all();
- Map<StringName, Anim>::Element *E = animations.find(SceneStringNames::get_singleton()->_default);
- ERR_FAIL_COND(!E);
-
- E->get().frames.resize(p_frames.size());
- for (int i = 0; i < E->get().frames.size(); i++)
- E->get().frames.write[i] = p_frames[i];
-}
-Array SpriteFrames::_get_frames() const {
-
- return Array();
-}
-
-Array SpriteFrames::_get_animations() const {
-
- Array anims;
- for (Map<StringName, Anim>::Element *E = animations.front(); E; E = E->next()) {
- Dictionary d;
- d["name"] = E->key();
- d["speed"] = E->get().speed;
- d["loop"] = E->get().loop;
- Array frames;
- for (int i = 0; i < E->get().frames.size(); i++) {
- frames.push_back(E->get().frames[i]);
- }
- d["frames"] = frames;
- anims.push_back(d);
- }
-
- return anims;
-}
-void SpriteFrames::_set_animations(const Array &p_animations) {
-
- animations.clear();
- for (int i = 0; i < p_animations.size(); i++) {
-
- Dictionary d = p_animations[i];
-
- ERR_CONTINUE(!d.has("name"));
- ERR_CONTINUE(!d.has("speed"));
- ERR_CONTINUE(!d.has("loop"));
- ERR_CONTINUE(!d.has("frames"));
-
- Anim anim;
- anim.speed = d["speed"];
- anim.loop = d["loop"];
- Array frames = d["frames"];
- for (int i = 0; i < frames.size(); i++) {
-
- RES res = frames[i];
- anim.frames.push_back(res);
- }
-
- animations[d["name"]] = anim;
- }
-}
-
void SpriteFrames::_bind_methods() {
ClassDB::bind_method(D_METHOD("add_animation", "anim"), &SpriteFrames::add_animation);
@@ -308,16 +249,6 @@ void SpriteFrames::_bind_methods() {
ClassDB::bind_method(D_METHOD("remove_frame", "anim", "idx"), &SpriteFrames::remove_frame);
ClassDB::bind_method(D_METHOD("clear", "anim"), &SpriteFrames::clear);
ClassDB::bind_method(D_METHOD("clear_all"), &SpriteFrames::clear_all);
-
- ClassDB::bind_method(D_METHOD("_set_frames"), &SpriteFrames::_set_frames);
- ClassDB::bind_method(D_METHOD("_get_frames"), &SpriteFrames::_get_frames);
-
- ADD_PROPERTYNZ(PropertyInfo(Variant::ARRAY, "frames", PROPERTY_HINT_NONE, "", 0), "_set_frames", "_get_frames"); //compatibility
-
- ClassDB::bind_method(D_METHOD("_set_animations"), &SpriteFrames::_set_animations);
- ClassDB::bind_method(D_METHOD("_get_animations"), &SpriteFrames::_get_animations);
-
- ADD_PROPERTYNZ(PropertyInfo(Variant::ARRAY, "animations", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_animations", "_get_animations"); //compatibility
}
SpriteFrames::SpriteFrames() {
diff --git a/scene/2d/animated_sprite.h b/scene/2d/animated_sprite.h
index cc49465403..672c9ef327 100644
--- a/scene/2d/animated_sprite.h
+++ b/scene/2d/animated_sprite.h
@@ -54,12 +54,6 @@ class SpriteFrames : public Resource {
Map<StringName, Anim> animations;
- Array _get_frames() const;
- void _set_frames(const Array &p_frames);
-
- Array _get_animations() const;
- void _set_animations(const Array &p_animations);
-
Vector<String> _get_animation_list() const;
protected:
diff --git a/scene/2d/area_2d.h b/scene/2d/area_2d.h
index 0fda9b867d..cd60b6c1e1 100644
--- a/scene/2d/area_2d.h
+++ b/scene/2d/area_2d.h
@@ -31,8 +31,8 @@
#ifndef AREA_2D_H
#define AREA_2D_H
+#include "core/vset.h"
#include "scene/2d/collision_object_2d.h"
-#include "vset.h"
class Area2D : public CollisionObject2D {
diff --git a/scene/2d/audio_stream_player_2d.cpp b/scene/2d/audio_stream_player_2d.cpp
index 559e041dbf..a1ae05d971 100644
--- a/scene/2d/audio_stream_player_2d.cpp
+++ b/scene/2d/audio_stream_player_2d.cpp
@@ -30,7 +30,7 @@
#include "audio_stream_player_2d.h"
-#include "engine.h"
+#include "core/engine.h"
#include "scene/2d/area_2d.h"
#include "scene/main/viewport.h"
diff --git a/scene/2d/canvas_item.cpp b/scene/2d/canvas_item.cpp
index 3914c75ca8..fab0b7d433 100644
--- a/scene/2d/canvas_item.cpp
+++ b/scene/2d/canvas_item.cpp
@@ -29,9 +29,9 @@
/*************************************************************************/
#include "canvas_item.h"
+#include "core/message_queue.h"
#include "core/method_bind_ext.gen.inc"
-#include "message_queue.h"
-#include "os/input.h"
+#include "core/os/input.h"
#include "scene/main/canvas_layer.h"
#include "scene/main/viewport.h"
#include "scene/resources/font.h"
diff --git a/scene/2d/collision_polygon_2d.cpp b/scene/2d/collision_polygon_2d.cpp
index 9f19f56e75..508ceeaaf9 100644
--- a/scene/2d/collision_polygon_2d.cpp
+++ b/scene/2d/collision_polygon_2d.cpp
@@ -31,7 +31,7 @@
#include "collision_polygon_2d.h"
#include "collision_object_2d.h"
-#include "engine.h"
+#include "core/engine.h"
#include "scene/resources/concave_polygon_shape_2d.h"
#include "scene/resources/convex_polygon_shape_2d.h"
diff --git a/scene/2d/collision_shape_2d.cpp b/scene/2d/collision_shape_2d.cpp
index ff5f7062c4..cb9c8ecf95 100644
--- a/scene/2d/collision_shape_2d.cpp
+++ b/scene/2d/collision_shape_2d.cpp
@@ -31,7 +31,7 @@
#include "collision_shape_2d.h"
#include "collision_object_2d.h"
-#include "engine.h"
+#include "core/engine.h"
#include "scene/resources/capsule_shape_2d.h"
#include "scene/resources/circle_shape_2d.h"
#include "scene/resources/concave_polygon_shape_2d.h"
diff --git a/scene/2d/cpu_particles_2d.h b/scene/2d/cpu_particles_2d.h
index dbe9f59748..4f51eb1062 100644
--- a/scene/2d/cpu_particles_2d.h
+++ b/scene/2d/cpu_particles_2d.h
@@ -31,7 +31,7 @@
#ifndef CPU_PARTICLES_2D_H
#define CPU_PARTICLES_2D_H
-#include "rid.h"
+#include "core/rid.h"
#include "scene/2d/node_2d.h"
#include "scene/resources/texture.h"
diff --git a/scene/2d/joints_2d.cpp b/scene/2d/joints_2d.cpp
index 7d5360c0e4..b9a48e1fdc 100644
--- a/scene/2d/joints_2d.cpp
+++ b/scene/2d/joints_2d.cpp
@@ -30,7 +30,7 @@
#include "joints_2d.h"
-#include "engine.h"
+#include "core/engine.h"
#include "physics_body_2d.h"
#include "servers/physics_2d_server.h"
diff --git a/scene/2d/light_2d.cpp b/scene/2d/light_2d.cpp
index 4d24daa5a7..e6a5a0b651 100644
--- a/scene/2d/light_2d.cpp
+++ b/scene/2d/light_2d.cpp
@@ -30,7 +30,7 @@
#include "light_2d.h"
-#include "engine.h"
+#include "core/engine.h"
#include "servers/visual_server.h"
Dictionary Light2D::_edit_get_state() const {
diff --git a/scene/2d/light_occluder_2d.cpp b/scene/2d/light_occluder_2d.cpp
index c9e5d0f1bc..ab15b49985 100644
--- a/scene/2d/light_occluder_2d.cpp
+++ b/scene/2d/light_occluder_2d.cpp
@@ -30,7 +30,7 @@
#include "light_occluder_2d.h"
-#include "engine.h"
+#include "core/engine.h"
void OccluderPolygon2D::set_polygon(const PoolVector<Vector2> &p_polygon) {
diff --git a/scene/2d/line_2d.cpp b/scene/2d/line_2d.cpp
index ad9775c0b7..e164f0ca75 100644
--- a/scene/2d/line_2d.cpp
+++ b/scene/2d/line_2d.cpp
@@ -31,7 +31,7 @@
#include "line_2d.h"
#include "line_builder.h"
-#include "core_string_names.h"
+#include "core/core_string_names.h"
// Needed so we can bind functions
VARIANT_ENUM_CAST(Line2D::LineJointMode)
diff --git a/scene/2d/line_builder.h b/scene/2d/line_builder.h
index edfdf97c47..f9d26f12af 100644
--- a/scene/2d/line_builder.h
+++ b/scene/2d/line_builder.h
@@ -31,10 +31,10 @@
#ifndef LINE_BUILDER_H
#define LINE_BUILDER_H
-#include "color.h"
+#include "core/color.h"
+#include "core/math/vector2.h"
#include "line_2d.h"
#include "scene/resources/color_ramp.h"
-#include "vector2.h"
class LineBuilder {
public:
diff --git a/scene/2d/navigation_polygon.cpp b/scene/2d/navigation_polygon.cpp
index 84b12b0bfe..b36924e521 100644
--- a/scene/2d/navigation_polygon.cpp
+++ b/scene/2d/navigation_polygon.cpp
@@ -30,8 +30,8 @@
#include "navigation_polygon.h"
-#include "core_string_names.h"
-#include "engine.h"
+#include "core/core_string_names.h"
+#include "core/engine.h"
#include "navigation2d.h"
#include "thirdparty/misc/triangulator.h"
diff --git a/scene/2d/node_2d.cpp b/scene/2d/node_2d.cpp
index 7de72dc41d..29065a89b3 100644
--- a/scene/2d/node_2d.cpp
+++ b/scene/2d/node_2d.cpp
@@ -30,7 +30,7 @@
#include "node_2d.h"
-#include "message_queue.h"
+#include "core/message_queue.h"
#include "scene/gui/control.h"
#include "scene/main/viewport.h"
#include "servers/visual_server.h"
diff --git a/scene/2d/parallax_layer.cpp b/scene/2d/parallax_layer.cpp
index 2ac6c76032..06de723f27 100644
--- a/scene/2d/parallax_layer.cpp
+++ b/scene/2d/parallax_layer.cpp
@@ -30,7 +30,7 @@
#include "parallax_layer.h"
-#include "engine.h"
+#include "core/engine.h"
#include "parallax_background.h"
void ParallaxLayer::set_motion_scale(const Size2 &p_scale) {
diff --git a/scene/2d/particles_2d.h b/scene/2d/particles_2d.h
index 816149ba79..af673841b1 100644
--- a/scene/2d/particles_2d.h
+++ b/scene/2d/particles_2d.h
@@ -31,7 +31,7 @@
#ifndef PARTICLES_2D_H
#define PARTICLES_2D_H
-#include "rid.h"
+#include "core/rid.h"
#include "scene/2d/node_2d.h"
#include "scene/resources/texture.h"
diff --git a/scene/2d/path_2d.cpp b/scene/2d/path_2d.cpp
index 658b998d17..cdb208e6cd 100644
--- a/scene/2d/path_2d.cpp
+++ b/scene/2d/path_2d.cpp
@@ -30,7 +30,7 @@
#include "path_2d.h"
-#include "engine.h"
+#include "core/engine.h"
#include "scene/scene_string_names.h"
#ifdef TOOLS_ENABLED
diff --git a/scene/2d/physics_body_2d.cpp b/scene/2d/physics_body_2d.cpp
index dc93414669..d0bebd3354 100644
--- a/scene/2d/physics_body_2d.cpp
+++ b/scene/2d/physics_body_2d.cpp
@@ -31,9 +31,9 @@
#include "physics_body_2d.h"
#include "core/core_string_names.h"
+#include "core/engine.h"
+#include "core/math/math_funcs.h"
#include "core/method_bind_ext.gen.inc"
-#include "engine.h"
-#include "math_funcs.h"
#include "scene/scene_string_names.h"
void PhysicsBody2D::_notification(int p_what) {
diff --git a/scene/2d/physics_body_2d.h b/scene/2d/physics_body_2d.h
index 852963a721..29befb0375 100644
--- a/scene/2d/physics_body_2d.h
+++ b/scene/2d/physics_body_2d.h
@@ -31,10 +31,10 @@
#ifndef PHYSICS_BODY_2D_H
#define PHYSICS_BODY_2D_H
+#include "core/vset.h"
#include "scene/2d/collision_object_2d.h"
#include "scene/resources/physics_material.h"
#include "servers/physics_2d_server.h"
-#include "vset.h"
class KinematicCollision2D;
diff --git a/scene/2d/position_2d.cpp b/scene/2d/position_2d.cpp
index 64d23719e7..543314eefa 100644
--- a/scene/2d/position_2d.cpp
+++ b/scene/2d/position_2d.cpp
@@ -30,7 +30,7 @@
#include "position_2d.h"
-#include "engine.h"
+#include "core/engine.h"
#include "scene/resources/texture.h"
void Position2D::_draw_cross() {
diff --git a/scene/2d/ray_cast_2d.cpp b/scene/2d/ray_cast_2d.cpp
index d9b3cb07fc..f7c18a17df 100644
--- a/scene/2d/ray_cast_2d.cpp
+++ b/scene/2d/ray_cast_2d.cpp
@@ -31,7 +31,7 @@
#include "ray_cast_2d.h"
#include "collision_object_2d.h"
-#include "engine.h"
+#include "core/engine.h"
#include "physics_body_2d.h"
#include "servers/physics_2d_server.h"
diff --git a/scene/2d/screen_button.cpp b/scene/2d/screen_button.cpp
index 45f63fd5bf..44a41328e8 100644
--- a/scene/2d/screen_button.cpp
+++ b/scene/2d/screen_button.cpp
@@ -29,9 +29,9 @@
/*************************************************************************/
#include "screen_button.h"
-#include "input_map.h"
-#include "os/input.h"
-#include "os/os.h"
+#include "core/input_map.h"
+#include "core/os/input.h"
+#include "core/os/os.h"
void TouchScreenButton::set_texture(const Ref<Texture> &p_texture) {
diff --git a/scene/2d/sprite.cpp b/scene/2d/sprite.cpp
index bb5990fa79..04e199a21b 100644
--- a/scene/2d/sprite.cpp
+++ b/scene/2d/sprite.cpp
@@ -30,7 +30,7 @@
#include "sprite.h"
#include "core/core_string_names.h"
-#include "os/os.h"
+#include "core/os/os.h"
#include "scene/main/viewport.h"
#include "scene/scene_string_names.h"
diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp
index 8a2fdbacfa..71bd51507e 100644
--- a/scene/2d/tile_map.cpp
+++ b/scene/2d/tile_map.cpp
@@ -30,9 +30,9 @@
#include "tile_map.h"
-#include "io/marshalls.h"
-#include "method_bind_ext.gen.inc"
-#include "os/os.h"
+#include "core/io/marshalls.h"
+#include "core/method_bind_ext.gen.inc"
+#include "core/os/os.h"
#include "servers/physics_2d_server.h"
int TileMap::_get_quadrant_size() const {
diff --git a/scene/2d/tile_map.h b/scene/2d/tile_map.h
index 55db33837f..499c79b180 100644
--- a/scene/2d/tile_map.h
+++ b/scene/2d/tile_map.h
@@ -31,11 +31,11 @@
#ifndef TILE_MAP_H
#define TILE_MAP_H
+#include "core/self_list.h"
+#include "core/vset.h"
#include "scene/2d/navigation2d.h"
#include "scene/2d/node_2d.h"
#include "scene/resources/tile_set.h"
-#include "self_list.h"
-#include "vset.h"
class TileMap : public Node2D {
diff --git a/scene/2d/visibility_notifier_2d.cpp b/scene/2d/visibility_notifier_2d.cpp
index ddca97e60a..7d7c47619a 100644
--- a/scene/2d/visibility_notifier_2d.cpp
+++ b/scene/2d/visibility_notifier_2d.cpp
@@ -30,7 +30,7 @@
#include "visibility_notifier_2d.h"
-#include "engine.h"
+#include "core/engine.h"
#include "particles_2d.h"
#include "scene/2d/animated_sprite.h"
#include "scene/2d/physics_body_2d.h"
diff --git a/scene/3d/area.h b/scene/3d/area.h
index e49b7e493b..e1ff1079e3 100644
--- a/scene/3d/area.h
+++ b/scene/3d/area.h
@@ -31,8 +31,8 @@
#ifndef AREA_H
#define AREA_H
+#include "core/vset.h"
#include "scene/3d/collision_object.h"
-#include "vset.h"
class Area : public CollisionObject {
diff --git a/scene/3d/audio_stream_player_3d.cpp b/scene/3d/audio_stream_player_3d.cpp
index 8504a18f54..386f2a4348 100644
--- a/scene/3d/audio_stream_player_3d.cpp
+++ b/scene/3d/audio_stream_player_3d.cpp
@@ -29,7 +29,7 @@
/*************************************************************************/
#include "audio_stream_player_3d.h"
-#include "engine.h"
+#include "core/engine.h"
#include "scene/3d/area.h"
#include "scene/3d/camera.h"
#include "scene/main/viewport.h"
diff --git a/scene/3d/baked_lightmap.cpp b/scene/3d/baked_lightmap.cpp
index 2cb59c871c..c58e318651 100644
--- a/scene/3d/baked_lightmap.cpp
+++ b/scene/3d/baked_lightmap.cpp
@@ -29,9 +29,9 @@
/*************************************************************************/
#include "baked_lightmap.h"
-#include "io/resource_saver.h"
-#include "os/dir_access.h"
-#include "os/os.h"
+#include "core/io/resource_saver.h"
+#include "core/os/dir_access.h"
+#include "core/os/os.h"
#include "voxel_light_baker.h"
void BakedLightmapData::set_bounds(const AABB &p_bounds) {
diff --git a/scene/3d/camera.cpp b/scene/3d/camera.cpp
index 6ecf219c2b..8ef64e2e80 100644
--- a/scene/3d/camera.cpp
+++ b/scene/3d/camera.cpp
@@ -30,9 +30,9 @@
#include "camera.h"
-#include "camera_matrix.h"
#include "collision_object.h"
-#include "engine.h"
+#include "core/engine.h"
+#include "core/math/camera_matrix.h"
#include "scene/resources/material.h"
#include "scene/resources/surface_tool.h"
void Camera::_update_audio_listener_state() {
diff --git a/scene/3d/collision_shape.cpp b/scene/3d/collision_shape.cpp
index 943f4158f7..4fd68fb47d 100644
--- a/scene/3d/collision_shape.cpp
+++ b/scene/3d/collision_shape.cpp
@@ -38,9 +38,9 @@
#include "scene/resources/sphere_shape.h"
#include "servers/visual_server.h"
//TODO: Implement CylinderShape and HeightMapShape?
+#include "core/math/quick_hull.h"
#include "mesh_instance.h"
#include "physics_body.h"
-#include "quick_hull.h"
void CollisionShape::make_convex_from_brothers() {
diff --git a/scene/3d/cpu_particles.h b/scene/3d/cpu_particles.h
index 47d0ef3f5e..4e29d8d4ce 100644
--- a/scene/3d/cpu_particles.h
+++ b/scene/3d/cpu_particles.h
@@ -31,7 +31,7 @@
#ifndef CPU_PARTICLES_H
#define CPU_PARTICLES_H
-#include "rid.h"
+#include "core/rid.h"
#include "scene/3d/visual_instance.h"
/**
diff --git a/scene/3d/interpolated_camera.cpp b/scene/3d/interpolated_camera.cpp
index ffa283f634..93832f8e00 100644
--- a/scene/3d/interpolated_camera.cpp
+++ b/scene/3d/interpolated_camera.cpp
@@ -30,7 +30,7 @@
#include "interpolated_camera.h"
-#include "engine.h"
+#include "core/engine.h"
void InterpolatedCamera::_notification(int p_what) {
diff --git a/scene/3d/light.cpp b/scene/3d/light.cpp
index 16164cf3bf..80c2f005b6 100644
--- a/scene/3d/light.cpp
+++ b/scene/3d/light.cpp
@@ -30,8 +30,8 @@
#include "light.h"
-#include "engine.h"
-#include "project_settings.h"
+#include "core/engine.h"
+#include "core/project_settings.h"
#include "scene/resources/surface_tool.h"
bool Light::_can_gizmo_scale() const {
@@ -312,7 +312,7 @@ Light::Light(VisualServer::LightType p_type) {
Light::Light() {
type = VisualServer::LIGHT_DIRECTIONAL;
- ERR_PRINT("Light shouldn't be instanced dircetly, use the subtypes.");
+ ERR_PRINT("Light should not be instanced directly; use the DirectionalLight, OmniLight or SpotLight subtypes instead.");
}
Light::~Light() {
diff --git a/scene/3d/mesh_instance.cpp b/scene/3d/mesh_instance.cpp
index e277cae5b7..4cbf6f2de3 100644
--- a/scene/3d/mesh_instance.cpp
+++ b/scene/3d/mesh_instance.cpp
@@ -31,7 +31,7 @@
#include "mesh_instance.h"
#include "collision_shape.h"
-#include "core_string_names.h"
+#include "core/core_string_names.h"
#include "physics_body.h"
#include "scene/resources/material.h"
#include "scene/scene_string_names.h"
diff --git a/scene/3d/particles.h b/scene/3d/particles.h
index 742246f78c..72241c5c89 100644
--- a/scene/3d/particles.h
+++ b/scene/3d/particles.h
@@ -31,7 +31,7 @@
#ifndef PARTICLES_H
#define PARTICLES_H
-#include "rid.h"
+#include "core/rid.h"
#include "scene/3d/visual_instance.h"
#include "scene/resources/material.h"
diff --git a/scene/3d/path.cpp b/scene/3d/path.cpp
index 9acaa15641..e37efa0e8a 100644
--- a/scene/3d/path.cpp
+++ b/scene/3d/path.cpp
@@ -30,7 +30,7 @@
#include "path.h"
-#include "engine.h"
+#include "core/engine.h"
#include "scene/scene_string_names.h"
void Path::_notification(int p_what) {
diff --git a/scene/3d/physics_body.cpp b/scene/3d/physics_body.cpp
index f7af6a57dd..d7bd89625f 100644
--- a/scene/3d/physics_body.cpp
+++ b/scene/3d/physics_body.cpp
@@ -31,8 +31,8 @@
#include "physics_body.h"
#include "core/core_string_names.h"
-#include "engine.h"
-#include "method_bind_ext.gen.inc"
+#include "core/engine.h"
+#include "core/method_bind_ext.gen.inc"
#include "scene/scene_string_names.h"
#ifdef TOOLS_ENABLED
diff --git a/scene/3d/physics_body.h b/scene/3d/physics_body.h
index c4db41f577..ca48b51ffb 100644
--- a/scene/3d/physics_body.h
+++ b/scene/3d/physics_body.h
@@ -31,11 +31,11 @@
#ifndef PHYSICS_BODY__H
#define PHYSICS_BODY__H
+#include "core/vset.h"
#include "scene/3d/collision_object.h"
#include "scene/resources/physics_material.h"
#include "servers/physics_server.h"
#include "skeleton.h"
-#include "vset.h"
class PhysicsBody : public CollisionObject {
diff --git a/scene/3d/portal.cpp b/scene/3d/portal.cpp
index d16d9ed7c5..137338d79e 100644
--- a/scene/3d/portal.cpp
+++ b/scene/3d/portal.cpp
@@ -29,7 +29,7 @@
/*************************************************************************/
#include "portal.h"
-#include "project_settings.h"
+#include "core/project_settings.h"
#include "scene/resources/surface_tool.h"
#include "servers/visual_server.h"
diff --git a/scene/3d/proximity_group.cpp b/scene/3d/proximity_group.cpp
index 101d9ed70c..f56f728d99 100644
--- a/scene/3d/proximity_group.cpp
+++ b/scene/3d/proximity_group.cpp
@@ -30,7 +30,7 @@
#include "proximity_group.h"
-#include "math_funcs.h"
+#include "core/math/math_funcs.h"
void ProximityGroup::clear_groups() {
diff --git a/scene/3d/ray_cast.cpp b/scene/3d/ray_cast.cpp
index b846a5b6c0..17f069bbc8 100644
--- a/scene/3d/ray_cast.cpp
+++ b/scene/3d/ray_cast.cpp
@@ -31,7 +31,7 @@
#include "ray_cast.h"
#include "collision_object.h"
-#include "engine.h"
+#include "core/engine.h"
#include "mesh_instance.h"
#include "servers/physics_server.h"
diff --git a/scene/3d/room_instance.cpp b/scene/3d/room_instance.cpp
index 0d83a9942e..3914d7190e 100644
--- a/scene/3d/room_instance.cpp
+++ b/scene/3d/room_instance.cpp
@@ -34,8 +34,8 @@
// FIXME: Will be removed, kept as reference for new implementation
#if 0
-#include "geometry.h"
-#include "project_settings.h"
+#include "core/math/geometry.h"
+#include "core/project_settings.h"
#include "scene/resources/surface_tool.h"
void Room::_notification(int p_what) {
diff --git a/scene/3d/skeleton.cpp b/scene/3d/skeleton.cpp
index c796e47f25..db82ef2a5c 100644
--- a/scene/3d/skeleton.cpp
+++ b/scene/3d/skeleton.cpp
@@ -30,7 +30,7 @@
#include "skeleton.h"
-#include "message_queue.h"
+#include "core/message_queue.h"
#include "core/project_settings.h"
#include "scene/3d/physics_body.h"
diff --git a/scene/3d/skeleton.h b/scene/3d/skeleton.h
index e044e08437..07abdc1fe7 100644
--- a/scene/3d/skeleton.h
+++ b/scene/3d/skeleton.h
@@ -31,7 +31,7 @@
#ifndef SKELETON_H
#define SKELETON_H
-#include "rid.h"
+#include "core/rid.h"
#include "scene/3d/spatial.h"
/**
diff --git a/scene/3d/soft_body.cpp b/scene/3d/soft_body.cpp
index 58ddb52760..4ebc941ebc 100644
--- a/scene/3d/soft_body.cpp
+++ b/scene/3d/soft_body.cpp
@@ -29,7 +29,7 @@
/*************************************************************************/
#include "soft_body.h"
-#include "os/os.h"
+#include "core/os/os.h"
#include "scene/3d/collision_object.h"
#include "scene/3d/skeleton.h"
#include "servers/physics_server.h"
diff --git a/scene/3d/spatial.cpp b/scene/3d/spatial.cpp
index d6141c12a8..fcc908cdc6 100644
--- a/scene/3d/spatial.cpp
+++ b/scene/3d/spatial.cpp
@@ -30,8 +30,8 @@
#include "spatial.h"
-#include "engine.h"
-#include "message_queue.h"
+#include "core/engine.h"
+#include "core/message_queue.h"
#include "scene/main/viewport.h"
#include "scene/scene_string_names.h"
diff --git a/scene/3d/spatial_velocity_tracker.cpp b/scene/3d/spatial_velocity_tracker.cpp
index d96b003a81..3850a0c7e6 100644
--- a/scene/3d/spatial_velocity_tracker.cpp
+++ b/scene/3d/spatial_velocity_tracker.cpp
@@ -29,7 +29,7 @@
/*************************************************************************/
#include "spatial_velocity_tracker.h"
-#include "engine.h"
+#include "core/engine.h"
void SpatialVelocityTracker::set_track_physics_step(bool p_track_physics_step) {
diff --git a/scene/3d/spring_arm.cpp b/scene/3d/spring_arm.cpp
index 492c6b806e..818e7f9217 100644
--- a/scene/3d/spring_arm.cpp
+++ b/scene/3d/spring_arm.cpp
@@ -29,7 +29,7 @@
/*************************************************************************/
#include "spring_arm.h"
-#include "engine.h"
+#include "core/engine.h"
#include "scene/3d/collision_object.h"
#include "scene/resources/sphere_shape.h"
#include "servers/physics_server.h"
diff --git a/scene/3d/sprite_3d.cpp b/scene/3d/sprite_3d.cpp
index 036a748c83..36c0dfc18a 100644
--- a/scene/3d/sprite_3d.cpp
+++ b/scene/3d/sprite_3d.cpp
@@ -29,7 +29,7 @@
/*************************************************************************/
#include "sprite_3d.h"
-#include "core_string_names.h"
+#include "core/core_string_names.h"
#include "scene/scene_string_names.h"
Color SpriteBase3D::_get_color_accum() {
diff --git a/scene/3d/visibility_notifier.cpp b/scene/3d/visibility_notifier.cpp
index 9d6e4941f3..c69387d082 100644
--- a/scene/3d/visibility_notifier.cpp
+++ b/scene/3d/visibility_notifier.cpp
@@ -30,7 +30,7 @@
#include "visibility_notifier.h"
-#include "engine.h"
+#include "core/engine.h"
#include "scene/3d/camera.h"
#include "scene/3d/physics_body.h"
#include "scene/animation/animation_player.h"
diff --git a/scene/3d/visual_instance.h b/scene/3d/visual_instance.h
index 9249bc04ce..784f2a358a 100644
--- a/scene/3d/visual_instance.h
+++ b/scene/3d/visual_instance.h
@@ -31,8 +31,8 @@
#ifndef VISUAL_INSTANCE_H
#define VISUAL_INSTANCE_H
-#include "face3.h"
-#include "rid.h"
+#include "core/math/face3.h"
+#include "core/rid.h"
#include "scene/3d/spatial.h"
#include "scene/resources/material.h"
/**
diff --git a/scene/3d/voxel_light_baker.cpp b/scene/3d/voxel_light_baker.cpp
index e846e1763d..651a057392 100644
--- a/scene/3d/voxel_light_baker.cpp
+++ b/scene/3d/voxel_light_baker.cpp
@@ -29,8 +29,8 @@
/*************************************************************************/
#include "voxel_light_baker.h"
-#include "os/os.h"
-#include "os/threaded_array_processor.h"
+#include "core/os/os.h"
+#include "core/os/threaded_array_processor.h"
#include <stdlib.h>
diff --git a/scene/animation/animation_blend_space_2d.cpp b/scene/animation/animation_blend_space_2d.cpp
index f3a76b950e..f5f899a6cd 100644
--- a/scene/animation/animation_blend_space_2d.cpp
+++ b/scene/animation/animation_blend_space_2d.cpp
@@ -29,7 +29,7 @@
/*************************************************************************/
#include "animation_blend_space_2d.h"
-#include "math/delaunay.h"
+#include "core/math/delaunay.h"
void AnimationNodeBlendSpace2D::get_parameter_list(List<PropertyInfo> *r_list) const {
r_list->push_back(PropertyInfo(Variant::VECTOR2, blend_position));
diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp
index d8db1973d2..2a4d526a7f 100644
--- a/scene/animation/animation_player.cpp
+++ b/scene/animation/animation_player.cpp
@@ -30,8 +30,8 @@
#include "animation_player.h"
-#include "engine.h"
-#include "message_queue.h"
+#include "core/engine.h"
+#include "core/message_queue.h"
#include "scene/scene_string_names.h"
#include "servers/audio/audio_stream.h"
#ifdef TOOLS_ENABLED
@@ -263,43 +263,36 @@ void AnimationPlayer::_ensure_node_caches(AnimationData *p_anim) {
key.id = id;
key.bone_idx = bone_idx;
- if (node_cache_map.has(key)) {
-
- p_anim->node_cache.write[i] = &node_cache_map[key];
- } else {
-
+ if (!node_cache_map.has(key))
node_cache_map[key] = TrackNodeCache();
- p_anim->node_cache.write[i] = &node_cache_map[key];
- p_anim->node_cache[i]->path = a->track_get_path(i);
- p_anim->node_cache[i]->node = child;
- p_anim->node_cache[i]->resource = resource;
- p_anim->node_cache[i]->node_2d = Object::cast_to<Node2D>(child);
- if (a->track_get_type(i) == Animation::TYPE_TRANSFORM) {
- // special cases and caches for transform tracks
-
- // cache spatial
- p_anim->node_cache[i]->spatial = Object::cast_to<Spatial>(child);
- // cache skeleton
- p_anim->node_cache[i]->skeleton = Object::cast_to<Skeleton>(child);
- if (p_anim->node_cache[i]->skeleton) {
-
- if (a->track_get_path(i).get_subname_count() == 1) {
- StringName bone_name = a->track_get_path(i).get_subname(0);
-
- p_anim->node_cache[i]->bone_idx = p_anim->node_cache[i]->skeleton->find_bone(bone_name);
- if (p_anim->node_cache[i]->bone_idx < 0) {
- // broken track (nonexistent bone)
- p_anim->node_cache[i]->skeleton = NULL;
- p_anim->node_cache[i]->spatial = NULL;
- printf("bone is %ls\n", String(bone_name).c_str());
- ERR_CONTINUE(p_anim->node_cache[i]->bone_idx < 0);
- } else {
- }
- } else {
- // no property, just use spatialnode
+ p_anim->node_cache.write[i] = &node_cache_map[key];
+ p_anim->node_cache[i]->path = a->track_get_path(i);
+ p_anim->node_cache[i]->node = child;
+ p_anim->node_cache[i]->resource = resource;
+ p_anim->node_cache[i]->node_2d = Object::cast_to<Node2D>(child);
+ if (a->track_get_type(i) == Animation::TYPE_TRANSFORM) {
+ // special cases and caches for transform tracks
+
+ // cache spatial
+ p_anim->node_cache[i]->spatial = Object::cast_to<Spatial>(child);
+ // cache skeleton
+ p_anim->node_cache[i]->skeleton = Object::cast_to<Skeleton>(child);
+ if (p_anim->node_cache[i]->skeleton) {
+ if (a->track_get_path(i).get_subname_count() == 1) {
+ StringName bone_name = a->track_get_path(i).get_subname(0);
+
+ p_anim->node_cache[i]->bone_idx = p_anim->node_cache[i]->skeleton->find_bone(bone_name);
+ if (p_anim->node_cache[i]->bone_idx < 0) {
+ // broken track (nonexistent bone)
p_anim->node_cache[i]->skeleton = NULL;
+ p_anim->node_cache[i]->spatial = NULL;
+ printf("bone is %ls\n", String(bone_name).c_str());
+ ERR_CONTINUE(p_anim->node_cache[i]->bone_idx < 0);
}
+ } else {
+ // no property, just use spatialnode
+ p_anim->node_cache[i]->skeleton = NULL;
}
}
}
diff --git a/scene/animation/animation_tree.cpp b/scene/animation/animation_tree.cpp
index 9b06d538e9..7a4846e6d5 100644
--- a/scene/animation/animation_tree.cpp
+++ b/scene/animation/animation_tree.cpp
@@ -29,9 +29,10 @@
/*************************************************************************/
#include "animation_tree.h"
+
#include "animation_blend_tree.h"
+#include "core/engine.h"
#include "core/method_bind_ext.gen.inc"
-#include "engine.h"
#include "scene/scene_string_names.h"
#include "servers/audio/audio_stream.h"
diff --git a/scene/animation/tween.cpp b/scene/animation/tween.cpp
index 58be636e44..82e2bb93e2 100644
--- a/scene/animation/tween.cpp
+++ b/scene/animation/tween.cpp
@@ -29,7 +29,8 @@
/*************************************************************************/
#include "tween.h"
-#include "method_bind_ext.gen.inc"
+
+#include "core/method_bind_ext.gen.inc"
void Tween::_add_pending_command(StringName p_key, const Variant &p_arg1, const Variant &p_arg2, const Variant &p_arg3, const Variant &p_arg4, const Variant &p_arg5, const Variant &p_arg6, const Variant &p_arg7, const Variant &p_arg8, const Variant &p_arg9, const Variant &p_arg10) {
@@ -673,6 +674,10 @@ float Tween::get_speed_scale() const {
}
bool Tween::start() {
+ if (pending_update != 0) {
+ call_deferred("start");
+ return true;
+ }
set_active(true);
return true;
diff --git a/scene/audio/audio_player.cpp b/scene/audio/audio_player.cpp
index 7a9f2bd8d0..64af7efb16 100644
--- a/scene/audio/audio_player.cpp
+++ b/scene/audio/audio_player.cpp
@@ -30,7 +30,7 @@
#include "audio_player.h"
-#include "engine.h"
+#include "core/engine.h"
void AudioStreamPlayer::_mix_internal(bool p_fadeout) {
diff --git a/scene/gui/base_button.cpp b/scene/gui/base_button.cpp
index d17ae1d84c..59590ea67b 100644
--- a/scene/gui/base_button.cpp
+++ b/scene/gui/base_button.cpp
@@ -30,7 +30,7 @@
#include "base_button.h"
-#include "os/keyboard.h"
+#include "core/os/keyboard.h"
#include "scene/main/viewport.h"
#include "scene/scene_string_names.h"
diff --git a/scene/gui/button.cpp b/scene/gui/button.cpp
index a34f2f1ad5..dd6d66ac62 100644
--- a/scene/gui/button.cpp
+++ b/scene/gui/button.cpp
@@ -29,8 +29,8 @@
/*************************************************************************/
#include "button.h"
+#include "core/translation.h"
#include "servers/visual_server.h"
-#include "translation.h"
Size2 Button::get_minimum_size() const {
diff --git a/scene/gui/check_button.cpp b/scene/gui/check_button.cpp
index f9ed0ecdbb..fa9538da28 100644
--- a/scene/gui/check_button.cpp
+++ b/scene/gui/check_button.cpp
@@ -30,7 +30,7 @@
#include "check_button.h"
-#include "print_string.h"
+#include "core/print_string.h"
#include "servers/visual_server.h"
Size2 CheckButton::get_icon_size() const {
diff --git a/scene/gui/color_picker.cpp b/scene/gui/color_picker.cpp
index 8e232c6f46..537a16fbc3 100644
--- a/scene/gui/color_picker.cpp
+++ b/scene/gui/color_picker.cpp
@@ -30,9 +30,9 @@
#include "color_picker.h"
-#include "os/input.h"
-#include "os/keyboard.h"
-#include "os/os.h"
+#include "core/os/input.h"
+#include "core/os/keyboard.h"
+#include "core/os/os.h"
#include "scene/gui/separator.h"
#include "scene/main/viewport.h"
diff --git a/scene/gui/container.cpp b/scene/gui/container.cpp
index 7df03bf7c6..d606629041 100644
--- a/scene/gui/container.cpp
+++ b/scene/gui/container.cpp
@@ -29,7 +29,7 @@
/*************************************************************************/
#include "container.h"
-#include "message_queue.h"
+#include "core/message_queue.h"
#include "scene/scene_string_names.h"
void Container::_child_minsize_changed() {
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp
index dc042b88d2..24697e370f 100644
--- a/scene/gui/control.cpp
+++ b/scene/gui/control.cpp
@@ -29,15 +29,15 @@
/*************************************************************************/
#include "control.h"
-#include "project_settings.h"
+#include "core/project_settings.h"
#include "scene/main/canvas_layer.h"
#include "scene/main/viewport.h"
#include "servers/visual_server.h"
-#include "message_queue.h"
-#include "os/keyboard.h"
-#include "os/os.h"
-#include "print_string.h"
+#include "core/message_queue.h"
+#include "core/os/keyboard.h"
+#include "core/os/os.h"
+#include "core/print_string.h"
#include "scene/gui/label.h"
#include "scene/gui/panel.h"
#include "scene/scene_string_names.h"
diff --git a/scene/gui/control.h b/scene/gui/control.h
index c6bd2f097d..c38cd66245 100644
--- a/scene/gui/control.h
+++ b/scene/gui/control.h
@@ -31,13 +31,13 @@
#ifndef CONTROL_H
#define CONTROL_H
-#include "rid.h"
+#include "core/math/transform_2d.h"
+#include "core/rid.h"
#include "scene/2d/canvas_item.h"
#include "scene/gui/shortcut.h"
#include "scene/main/node.h"
#include "scene/main/timer.h"
#include "scene/resources/theme.h"
-#include "transform_2d.h"
/**
@author Juan Linietsky <reduzio@gmail.com>
*/
diff --git a/scene/gui/dialogs.cpp b/scene/gui/dialogs.cpp
index d9737fa21a..e3a21eb10d 100644
--- a/scene/gui/dialogs.cpp
+++ b/scene/gui/dialogs.cpp
@@ -29,9 +29,9 @@
/*************************************************************************/
#include "dialogs.h"
+#include "core/print_string.h"
+#include "core/translation.h"
#include "line_edit.h"
-#include "print_string.h"
-#include "translation.h"
#ifdef TOOLS_ENABLED
#include "editor/editor_node.h"
diff --git a/scene/gui/file_dialog.cpp b/scene/gui/file_dialog.cpp
index 9bddaa7d29..5f162a3652 100644
--- a/scene/gui/file_dialog.cpp
+++ b/scene/gui/file_dialog.cpp
@@ -29,8 +29,8 @@
/*************************************************************************/
#include "file_dialog.h"
-#include "os/keyboard.h"
-#include "print_string.h"
+#include "core/os/keyboard.h"
+#include "core/print_string.h"
#include "scene/gui/label.h"
FileDialog::GetIconFunc FileDialog::get_icon_func = NULL;
diff --git a/scene/gui/file_dialog.h b/scene/gui/file_dialog.h
index 3227f1c3a8..8bd15080d3 100644
--- a/scene/gui/file_dialog.h
+++ b/scene/gui/file_dialog.h
@@ -32,7 +32,7 @@
#define FILE_DIALOG_H
#include "box_container.h"
-#include "os/dir_access.h"
+#include "core/os/dir_access.h"
#include "scene/gui/dialogs.h"
#include "scene/gui/line_edit.h"
#include "scene/gui/option_button.h"
diff --git a/scene/gui/gradient_edit.cpp b/scene/gui/gradient_edit.cpp
index dc013f00a5..19ffe681ef 100644
--- a/scene/gui/gradient_edit.cpp
+++ b/scene/gui/gradient_edit.cpp
@@ -29,8 +29,8 @@
/*************************************************************************/
#include "gradient_edit.h"
+#include "core/os/keyboard.h"
#include "editor/editor_scale.h"
-#include "os/keyboard.h"
#define SPACING (3 * EDSCALE)
diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp
index 8797ab6fd3..9045197333 100644
--- a/scene/gui/graph_edit.cpp
+++ b/scene/gui/graph_edit.cpp
@@ -30,8 +30,8 @@
#include "graph_edit.h"
-#include "os/input.h"
-#include "os/keyboard.h"
+#include "core/os/input.h"
+#include "core/os/keyboard.h"
#include "scene/gui/box_container.h"
#define ZOOM_SCALE 1.2
diff --git a/scene/gui/graph_node.cpp b/scene/gui/graph_node.cpp
index 24857d49fa..b189afd30b 100644
--- a/scene/gui/graph_node.cpp
+++ b/scene/gui/graph_node.cpp
@@ -29,7 +29,8 @@
/*************************************************************************/
#include "graph_node.h"
-#include "method_bind_ext.gen.inc"
+
+#include "core/method_bind_ext.gen.inc"
bool GraphNode::_set(const StringName &p_name, const Variant &p_value) {
diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp
index 9f5c12e87f..0d5fbee9ee 100644
--- a/scene/gui/item_list.cpp
+++ b/scene/gui/item_list.cpp
@@ -29,8 +29,8 @@
/*************************************************************************/
#include "item_list.h"
-#include "os/os.h"
-#include "project_settings.h"
+#include "core/os/os.h"
+#include "core/project_settings.h"
void ItemList::add_item(const String &p_item, const Ref<Texture> &p_texture, bool p_selectable) {
diff --git a/scene/gui/label.cpp b/scene/gui/label.cpp
index 0b36e1663c..ce8de38b74 100644
--- a/scene/gui/label.cpp
+++ b/scene/gui/label.cpp
@@ -29,9 +29,9 @@
/*************************************************************************/
#include "label.h"
-#include "print_string.h"
-#include "project_settings.h"
-#include "translation.h"
+#include "core/print_string.h"
+#include "core/project_settings.h"
+#include "core/translation.h"
void Label::set_autowrap(bool p_autowrap) {
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp
index 1f3d5e6e13..9c43d5b308 100644
--- a/scene/gui/line_edit.cpp
+++ b/scene/gui/line_edit.cpp
@@ -29,12 +29,12 @@
/*************************************************************************/
#include "line_edit.h"
+#include "core/message_queue.h"
+#include "core/os/keyboard.h"
+#include "core/os/os.h"
+#include "core/print_string.h"
+#include "core/translation.h"
#include "label.h"
-#include "message_queue.h"
-#include "os/keyboard.h"
-#include "os/os.h"
-#include "print_string.h"
-#include "translation.h"
#ifdef TOOLS_ENABLED
#include "editor/editor_scale.h"
diff --git a/scene/gui/menu_button.cpp b/scene/gui/menu_button.cpp
index 87cf4dc334..95ec618c3b 100644
--- a/scene/gui/menu_button.cpp
+++ b/scene/gui/menu_button.cpp
@@ -29,7 +29,7 @@
/*************************************************************************/
#include "menu_button.h"
-#include "os/keyboard.h"
+#include "core/os/keyboard.h"
#include "scene/main/viewport.h"
void MenuButton::_unhandled_key_input(Ref<InputEvent> p_event) {
diff --git a/scene/gui/option_button.cpp b/scene/gui/option_button.cpp
index 2901176a69..6b847c6483 100644
--- a/scene/gui/option_button.cpp
+++ b/scene/gui/option_button.cpp
@@ -29,7 +29,7 @@
/*************************************************************************/
#include "option_button.h"
-#include "print_string.h"
+#include "core/print_string.h"
Size2 OptionButton::get_minimum_size() const {
diff --git a/scene/gui/panel.cpp b/scene/gui/panel.cpp
index 4375e03a50..d3b7b72ee1 100644
--- a/scene/gui/panel.cpp
+++ b/scene/gui/panel.cpp
@@ -29,7 +29,7 @@
/*************************************************************************/
#include "panel.h"
-#include "print_string.h"
+#include "core/print_string.h"
void Panel::_notification(int p_what) {
diff --git a/scene/gui/popup.cpp b/scene/gui/popup.cpp
index 2add67ace1..bfbe62e1c7 100644
--- a/scene/gui/popup.cpp
+++ b/scene/gui/popup.cpp
@@ -30,8 +30,8 @@
#include "popup.h"
-#include "engine.h"
-#include "os/keyboard.h"
+#include "core/engine.h"
+#include "core/os/keyboard.h"
void Popup::_gui_input(Ref<InputEvent> p_event) {
}
diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp
index 436dda41a4..3239641c2f 100644
--- a/scene/gui/popup_menu.cpp
+++ b/scene/gui/popup_menu.cpp
@@ -29,10 +29,10 @@
/*************************************************************************/
#include "popup_menu.h"
-#include "os/input.h"
-#include "os/keyboard.h"
-#include "print_string.h"
-#include "translation.h"
+#include "core/os/input.h"
+#include "core/os/keyboard.h"
+#include "core/print_string.h"
+#include "core/translation.h"
String PopupMenu::_get_accel_text(int p_item) const {
diff --git a/scene/gui/reference_rect.cpp b/scene/gui/reference_rect.cpp
index 74e68598f4..e96e5afb2a 100644
--- a/scene/gui/reference_rect.cpp
+++ b/scene/gui/reference_rect.cpp
@@ -30,7 +30,7 @@
#include "reference_rect.h"
-#include "engine.h"
+#include "core/engine.h"
void ReferenceRect::_notification(int p_what) {
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp
index eff16c83fc..1e281471a6 100644
--- a/scene/gui/rich_text_label.cpp
+++ b/scene/gui/rich_text_label.cpp
@@ -29,8 +29,8 @@
/*************************************************************************/
#include "rich_text_label.h"
-#include "os/keyboard.h"
-#include "os/os.h"
+#include "core/os/keyboard.h"
+#include "core/os/os.h"
#include "scene/scene_string_names.h"
#ifdef TOOLS_ENABLED
diff --git a/scene/gui/scroll_bar.cpp b/scene/gui/scroll_bar.cpp
index e5bd1c453d..df27fb0e6b 100644
--- a/scene/gui/scroll_bar.cpp
+++ b/scene/gui/scroll_bar.cpp
@@ -30,9 +30,9 @@
#include "scroll_bar.h"
-#include "os/keyboard.h"
-#include "os/os.h"
-#include "print_string.h"
+#include "core/os/keyboard.h"
+#include "core/os/os.h"
+#include "core/print_string.h"
bool ScrollBar::focus_by_default = false;
diff --git a/scene/gui/scroll_container.cpp b/scene/gui/scroll_container.cpp
index 495d618930..e3fb602065 100644
--- a/scene/gui/scroll_container.cpp
+++ b/scene/gui/scroll_container.cpp
@@ -29,7 +29,7 @@
/*************************************************************************/
#include "scroll_container.h"
-#include "os/os.h"
+#include "core/os/os.h"
bool ScrollContainer::clips_input() const {
return true;
diff --git a/scene/gui/shortcut.cpp b/scene/gui/shortcut.cpp
index 36490cf254..6fcf96f611 100644
--- a/scene/gui/shortcut.cpp
+++ b/scene/gui/shortcut.cpp
@@ -30,7 +30,7 @@
#include "shortcut.h"
-#include "os/keyboard.h"
+#include "core/os/keyboard.h"
void ShortCut::set_shortcut(const Ref<InputEvent> &p_shortcut) {
diff --git a/scene/gui/shortcut.h b/scene/gui/shortcut.h
index f9240642bf..7613a24e43 100644
--- a/scene/gui/shortcut.h
+++ b/scene/gui/shortcut.h
@@ -31,8 +31,8 @@
#ifndef SHORTCUT_H
#define SHORTCUT_H
-#include "os/input_event.h"
-#include "resource.h"
+#include "core/os/input_event.h"
+#include "core/resource.h"
class ShortCut : public Resource {
diff --git a/scene/gui/slider.cpp b/scene/gui/slider.cpp
index b820e2eafd..147c0518ec 100644
--- a/scene/gui/slider.cpp
+++ b/scene/gui/slider.cpp
@@ -29,7 +29,7 @@
/*************************************************************************/
#include "slider.h"
-#include "os/keyboard.h"
+#include "core/os/keyboard.h"
Size2 Slider::get_minimum_size() const {
diff --git a/scene/gui/spin_box.cpp b/scene/gui/spin_box.cpp
index 145981d498..2221923093 100644
--- a/scene/gui/spin_box.cpp
+++ b/scene/gui/spin_box.cpp
@@ -29,7 +29,7 @@
/*************************************************************************/
#include "spin_box.h"
-#include "os/input.h"
+#include "core/os/input.h"
Size2 SpinBox::get_minimum_size() const {
diff --git a/scene/gui/tab_container.cpp b/scene/gui/tab_container.cpp
index c30fa96327..4c354768fe 100644
--- a/scene/gui/tab_container.cpp
+++ b/scene/gui/tab_container.cpp
@@ -30,7 +30,7 @@
#include "tab_container.h"
-#include "message_queue.h"
+#include "core/message_queue.h"
#include "scene/gui/box_container.h"
#include "scene/gui/label.h"
#include "scene/gui/texture_rect.h"
diff --git a/scene/gui/tabs.cpp b/scene/gui/tabs.cpp
index 2075f7ce70..c56b7d0f26 100644
--- a/scene/gui/tabs.cpp
+++ b/scene/gui/tabs.cpp
@@ -30,7 +30,7 @@
#include "tabs.h"
-#include "message_queue.h"
+#include "core/message_queue.h"
#include "scene/gui/box_container.h"
#include "scene/gui/label.h"
#include "scene/gui/texture_rect.h"
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index ec98b01ced..60d5c45846 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -30,11 +30,11 @@
#include "text_edit.h"
-#include "message_queue.h"
-#include "os/input.h"
-#include "os/keyboard.h"
-#include "os/os.h"
-#include "project_settings.h"
+#include "core/message_queue.h"
+#include "core/os/input.h"
+#include "core/os/keyboard.h"
+#include "core/os/os.h"
+#include "core/project_settings.h"
#include "scene/main/viewport.h"
#ifdef TOOLS_ENABLED
@@ -3119,16 +3119,14 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
if (selection.active) {
int ini = selection.from_line;
int end = selection.to_line;
+
for (int i = ini; i <= end; i++) {
- if (get_line(i).begins_with("#"))
- _remove_text(i, 0, i, 1);
+ _uncomment_line(i);
}
} else {
- if (get_line(cursor.line).begins_with("#")) {
- _remove_text(cursor.line, 0, cursor.line, 1);
- if (cursor.column >= get_line(cursor.line).length()) {
- cursor.column = MAX(0, get_line(cursor.line).length() - 1);
- }
+ _uncomment_line(cursor.line);
+ if (cursor.column >= get_line(cursor.line).length()) {
+ cursor.column = MAX(0, get_line(cursor.line).length() - 1);
}
}
update();
@@ -3208,6 +3206,24 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
}
}
+void TextEdit::_uncomment_line(int p_line) {
+ String line_text = get_line(p_line);
+ for (int i = 0; i < line_text.length(); i++) {
+ if (line_text[i] == '#') {
+ _remove_text(p_line, i, p_line, i + 1);
+ if (p_line == selection.to_line && selection.to_column > line_text.length() - 1) {
+ selection.to_column -= 1;
+ if (selection.to_column >= selection.from_column) {
+ selection.active = false;
+ }
+ }
+ return;
+ } else if (line_text[i] != '\t' && line_text[i] != ' ') {
+ return;
+ }
+ }
+}
+
void TextEdit::_scroll_up(real_t p_delta) {
if (scrolling && smooth_scroll_enabled && SGN(target_v_scroll - v_scroll->get_value()) != SGN(-p_delta))
@@ -4822,28 +4838,27 @@ bool TextEdit::search(const String &p_key, uint32_t p_search_flags, int p_from_l
pos = -1;
- int pos_from = 0;
+ int pos_from = (p_search_flags & SEARCH_BACKWARDS) ? text_line.length() : 0;
int last_pos = -1;
while (true) {
- while ((last_pos = (p_search_flags & SEARCH_MATCH_CASE) ? text_line.find(p_key, pos_from) : text_line.findn(p_key, pos_from)) != -1) {
-
- if (p_search_flags & SEARCH_BACKWARDS) {
-
- if (last_pos > from_column)
+ if (p_search_flags & SEARCH_BACKWARDS) {
+ while ((last_pos = (p_search_flags & SEARCH_MATCH_CASE) ? text_line.rfind(p_key, pos_from) : text_line.rfindn(p_key, pos_from)) != -1) {
+ if (last_pos <= from_column) {
+ pos = last_pos;
break;
- pos = last_pos;
-
- } else {
-
+ }
+ pos_from = last_pos - p_key.length();
+ }
+ } else {
+ while ((last_pos = (p_search_flags & SEARCH_MATCH_CASE) ? text_line.find(p_key, pos_from) : text_line.findn(p_key, pos_from)) != -1) {
if (last_pos >= from_column) {
pos = last_pos;
break;
}
+ pos_from = last_pos + p_key.length();
}
-
- pos_from = last_pos + p_key.length();
}
bool is_match = true;
@@ -4856,11 +4871,15 @@ bool TextEdit::search(const String &p_key, uint32_t p_search_flags, int p_from_l
is_match = false;
}
+ if (pos_from == -1) {
+ pos = -1;
+ }
+
if (is_match || last_pos == -1 || pos == -1) {
break;
}
- pos_from = pos + 1;
+ pos_from = (p_search_flags & SEARCH_BACKWARDS) ? pos - 1 : pos + 1;
pos = -1;
}
@@ -5910,6 +5929,9 @@ void TextEdit::set_line(int line, String new_text) {
if (cursor.line == line) {
cursor.column = MIN(cursor.column, new_text.length());
}
+ if (is_selection_active() && line == selection.to_line && selection.to_column > text[line].length()) {
+ selection.to_column = text[line].length();
+ }
}
void TextEdit::insert_at(const String &p_text, int at) {
@@ -6400,8 +6422,8 @@ Map<int, TextEdit::HighlighterInfo> TextEdit::_get_line_syntax_highlighting(int
is_hex_notation = false;
}
- // check for dot or underscore or 'x' for hex notation in floating point number
- if ((str[j] == '.' || str[j] == 'x' || str[j] == '_' || str[j] == 'f') && !in_word && prev_is_number && !is_number) {
+ // check for dot or underscore or 'x' for hex notation in floating point number or 'e' for scientific notation
+ if ((str[j] == '.' || str[j] == 'x' || str[j] == '_' || str[j] == 'f' || str[j] == 'e') && !in_word && prev_is_number && !is_number) {
is_number = true;
is_symbol = false;
is_char = false;
diff --git a/scene/gui/text_edit.h b/scene/gui/text_edit.h
index 19b5d574c6..697dc3a5e0 100644
--- a/scene/gui/text_edit.h
+++ b/scene/gui/text_edit.h
@@ -373,6 +373,7 @@ private:
void _update_selection_mode_word();
void _update_selection_mode_line();
+ void _uncomment_line(int p_line);
void _scroll_up(real_t p_delta);
void _scroll_down(real_t p_delta);
diff --git a/scene/gui/texture_progress.cpp b/scene/gui/texture_progress.cpp
index ff90576c1b..8188d1dcf8 100644
--- a/scene/gui/texture_progress.cpp
+++ b/scene/gui/texture_progress.cpp
@@ -30,7 +30,7 @@
#include "texture_progress.h"
-#include "engine.h"
+#include "core/engine.h"
void TextureProgress::set_under_texture(const Ref<Texture> &p_texture) {
@@ -466,9 +466,9 @@ void TextureProgress::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "texture_progress", PROPERTY_HINT_RESOURCE_TYPE, "Texture"), "set_progress_texture", "get_progress_texture");
ADD_PROPERTYNZ(PropertyInfo(Variant::INT, "fill_mode", PROPERTY_HINT_ENUM, "Left to Right,Right to Left,Top to Bottom,Bottom to Top,Clockwise,Counter Clockwise,Bilinear (Left and Right),Bilinear (Top and Bottom), Clockwise and Counter Clockwise"), "set_fill_mode", "get_fill_mode");
ADD_GROUP("Tint", "tint_");
- ADD_PROPERTY(PropertyInfo(Variant::COLOR, "tint_under", PROPERTY_HINT_COLOR_NO_ALPHA), "set_tint_under", "get_tint_under");
- ADD_PROPERTY(PropertyInfo(Variant::COLOR, "tint_over", PROPERTY_HINT_COLOR_NO_ALPHA), "set_tint_over", "get_tint_over");
- ADD_PROPERTY(PropertyInfo(Variant::COLOR, "tint_progress", PROPERTY_HINT_COLOR_NO_ALPHA), "set_tint_progress", "get_tint_progress");
+ ADD_PROPERTY(PropertyInfo(Variant::COLOR, "tint_under"), "set_tint_under", "get_tint_under");
+ ADD_PROPERTY(PropertyInfo(Variant::COLOR, "tint_over"), "set_tint_over", "get_tint_over");
+ ADD_PROPERTY(PropertyInfo(Variant::COLOR, "tint_progress"), "set_tint_progress", "get_tint_progress");
ADD_GROUP("Radial Fill", "radial_");
ADD_PROPERTYNZ(PropertyInfo(Variant::REAL, "radial_initial_angle", PROPERTY_HINT_RANGE, "0.0,360.0,0.1,slider"), "set_radial_initial_angle", "get_radial_initial_angle");
ADD_PROPERTYNZ(PropertyInfo(Variant::REAL, "radial_fill_degrees", PROPERTY_HINT_RANGE, "0.0,360.0,0.1,slider"), "set_fill_degrees", "get_fill_degrees");
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index eaf7ad7670..be1870068d 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -31,12 +31,12 @@
#include "tree.h"
#include <limits.h>
-#include "math_funcs.h"
-#include "os/input.h"
-#include "os/keyboard.h"
-#include "os/os.h"
-#include "print_string.h"
-#include "project_settings.h"
+#include "core/math/math_funcs.h"
+#include "core/os/input.h"
+#include "core/os/keyboard.h"
+#include "core/os/os.h"
+#include "core/print_string.h"
+#include "core/project_settings.h"
#include "scene/main/viewport.h"
#ifdef TOOLS_ENABLED
diff --git a/scene/gui/tree.h b/scene/gui/tree.h
index 5af66c5faa..205cdbfb7e 100644
--- a/scene/gui/tree.h
+++ b/scene/gui/tree.h
@@ -516,7 +516,7 @@ protected:
static void _bind_methods();
//bind helpers
- Object *_create_item(Object *p_parent, int p_idx = -1) {
+ TreeItem *_create_item(Object *p_parent, int p_idx = -1) {
return create_item(Object::cast_to<TreeItem>(p_parent), p_idx);
}
diff --git a/scene/gui/video_player.cpp b/scene/gui/video_player.cpp
index 88e1847533..17ab234551 100644
--- a/scene/gui/video_player.cpp
+++ b/scene/gui/video_player.cpp
@@ -31,7 +31,7 @@
#include "video_player.h"
#include "scene/scene_string_names.h"
-#include "os/os.h"
+#include "core/os/os.h"
#include "servers/audio_server.h"
int VideoPlayer::sp_get_channel_count() const {
diff --git a/scene/main/http_request.h b/scene/main/http_request.h
index eb5d020bc5..de09d2afda 100644
--- a/scene/main/http_request.h
+++ b/scene/main/http_request.h
@@ -31,10 +31,10 @@
#ifndef HTTPREQUEST_H
#define HTTPREQUEST_H
-#include "io/http_client.h"
+#include "core/io/http_client.h"
+#include "core/os/file_access.h"
+#include "core/os/thread.h"
#include "node.h"
-#include "os/file_access.h"
-#include "os/thread.h"
class HTTPRequest : public Node {
diff --git a/scene/main/instance_placeholder.cpp b/scene/main/instance_placeholder.cpp
index 1443d5efbf..0ee5648de2 100644
--- a/scene/main/instance_placeholder.cpp
+++ b/scene/main/instance_placeholder.cpp
@@ -30,7 +30,7 @@
#include "instance_placeholder.h"
-#include "io/resource_loader.h"
+#include "core/io/resource_loader.h"
#include "scene/resources/packed_scene.h"
bool InstancePlaceholder::_set(const StringName &p_name, const Variant &p_value) {
diff --git a/scene/main/node.cpp b/scene/main/node.cpp
index 3d1614199a..d4456738ae 100644
--- a/scene/main/node.cpp
+++ b/scene/main/node.cpp
@@ -31,10 +31,10 @@
#include "node.h"
#include "core/core_string_names.h"
+#include "core/io/resource_loader.h"
+#include "core/message_queue.h"
+#include "core/print_string.h"
#include "instance_placeholder.h"
-#include "io/resource_loader.h"
-#include "message_queue.h"
-#include "print_string.h"
#include "scene/resources/packed_scene.h"
#include "scene/scene_string_names.h"
#include "viewport.h"
diff --git a/scene/main/node.h b/scene/main/node.h
index fb84981feb..8d6c558e93 100644
--- a/scene/main/node.h
+++ b/scene/main/node.h
@@ -31,13 +31,13 @@
#ifndef NODE_H
#define NODE_H
-#include "class_db.h"
-#include "map.h"
-#include "node_path.h"
-#include "object.h"
-#include "project_settings.h"
+#include "core/class_db.h"
+#include "core/map.h"
+#include "core/node_path.h"
+#include "core/object.h"
+#include "core/project_settings.h"
+#include "core/script_language.h"
#include "scene/main/scene_tree.h"
-#include "script_language.h"
class Viewport;
class SceneState;
diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp
index 0b763d2433..16be6dad7d 100644
--- a/scene/main/scene_tree.cpp
+++ b/scene/main/scene_tree.cpp
@@ -30,16 +30,16 @@
#include "scene_tree.h"
+#include "core/io/marshalls.h"
+#include "core/io/resource_loader.h"
+#include "core/message_queue.h"
+#include "core/os/keyboard.h"
+#include "core/os/os.h"
+#include "core/print_string.h"
+#include "core/project_settings.h"
#include "editor/editor_node.h"
-#include "io/marshalls.h"
-#include "io/resource_loader.h"
#include "main/input_default.h"
-#include "message_queue.h"
#include "node.h"
-#include "os/keyboard.h"
-#include "os/os.h"
-#include "print_string.h"
-#include "project_settings.h"
#include "scene/resources/dynamic_font.h"
#include "scene/resources/material.h"
#include "scene/resources/mesh.h"
diff --git a/scene/main/scene_tree.h b/scene/main/scene_tree.h
index 11201097d4..d59cbe05fb 100644
--- a/scene/main/scene_tree.h
+++ b/scene/main/scene_tree.h
@@ -31,13 +31,13 @@
#ifndef SCENE_MAIN_LOOP_H
#define SCENE_MAIN_LOOP_H
-#include "io/multiplayer_api.h"
-#include "os/main_loop.h"
-#include "os/thread_safe.h"
+#include "core/io/multiplayer_api.h"
+#include "core/os/main_loop.h"
+#include "core/os/thread_safe.h"
+#include "core/self_list.h"
#include "scene/resources/mesh.h"
#include "scene/resources/world.h"
#include "scene/resources/world_2d.h"
-#include "self_list.h"
/**
@author Juan Linietsky <reduzio@gmail.com>
diff --git a/scene/main/timer.cpp b/scene/main/timer.cpp
index c285694dfa..227840531e 100755
--- a/scene/main/timer.cpp
+++ b/scene/main/timer.cpp
@@ -30,7 +30,7 @@
#include "timer.h"
-#include "engine.h"
+#include "core/engine.h"
void Timer::_notification(int p_what) {
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index d1b3eb9d9a..dfd9dfa52e 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -30,9 +30,9 @@
#include "viewport.h"
-#include "os/input.h"
-#include "os/os.h"
-#include "project_settings.h"
+#include "core/os/input.h"
+#include "core/os/os.h"
+#include "core/project_settings.h"
#include "scene/2d/collision_object_2d.h"
#include "scene/3d/camera.h"
#include "scene/3d/collision_object.h"
diff --git a/scene/main/viewport.h b/scene/main/viewport.h
index 450f235b79..c1a4c0e3eb 100644
--- a/scene/main/viewport.h
+++ b/scene/main/viewport.h
@@ -31,11 +31,11 @@
#ifndef VIEWPORT_H
#define VIEWPORT_H
+#include "core/math/transform_2d.h"
#include "scene/main/node.h"
#include "scene/resources/texture.h"
#include "scene/resources/world_2d.h"
#include "servers/visual_server.h"
-#include "transform_2d.h"
/**
@author Juan Linietsky <reduzio@gmail.com>
*/
diff --git a/scene/resources/animation.cpp b/scene/resources/animation.cpp
index 58e6db3f5e..694e959bcb 100644
--- a/scene/resources/animation.cpp
+++ b/scene/resources/animation.cpp
@@ -30,7 +30,7 @@
#include "animation.h"
-#include "geometry.h"
+#include "core/math/geometry.h"
#define ANIM_MIN_LENGTH 0.001
diff --git a/scene/resources/animation.h b/scene/resources/animation.h
index a41e6ea5d7..6eec2c8bc7 100644
--- a/scene/resources/animation.h
+++ b/scene/resources/animation.h
@@ -31,7 +31,7 @@
#ifndef ANIMATION_H
#define ANIMATION_H
-#include "resource.h"
+#include "core/resource.h"
/**
@author Juan Linietsky <reduzio@gmail.com>
*/
diff --git a/scene/resources/audio_stream_sample.cpp b/scene/resources/audio_stream_sample.cpp
index e6a4b01deb..57d0deeb78 100644
--- a/scene/resources/audio_stream_sample.cpp
+++ b/scene/resources/audio_stream_sample.cpp
@@ -29,8 +29,8 @@
/*************************************************************************/
#include "audio_stream_sample.h"
-#include "io/marshalls.h"
-#include "os/file_access.h"
+#include "core/io/marshalls.h"
+#include "core/os/file_access.h"
void AudioStreamPlaybackSample::start(float p_from_pos) {
diff --git a/scene/resources/bit_mask.cpp b/scene/resources/bit_mask.cpp
index 5694099754..d670161afd 100644
--- a/scene/resources/bit_mask.cpp
+++ b/scene/resources/bit_mask.cpp
@@ -30,7 +30,7 @@
#include "bit_mask.h"
-#include "io/image_loader.h"
+#include "core/io/image_loader.h"
void BitMap::create(const Size2 &p_size) {
diff --git a/scene/resources/bit_mask.h b/scene/resources/bit_mask.h
index 40f0bfb04a..04191a7774 100644
--- a/scene/resources/bit_mask.h
+++ b/scene/resources/bit_mask.h
@@ -31,9 +31,9 @@
#ifndef BIT_MASK_H
#define BIT_MASK_H
-#include "image.h"
-#include "io/resource_loader.h"
-#include "resource.h"
+#include "core/image.h"
+#include "core/io/resource_loader.h"
+#include "core/resource.h"
class BitMap : public Resource {
diff --git a/scene/resources/bounds.h b/scene/resources/bounds.h
index dfe2fe40c6..c86e15ae40 100644
--- a/scene/resources/bounds.h
+++ b/scene/resources/bounds.h
@@ -31,8 +31,8 @@
#ifndef BOUNDS_H
#define BOUNDS_H
-#include "bsp_tree.h"
-#include "resource.h"
+#include "core/math/bsp_tree.h"
+#include "core/resource.h"
class Bounds : public Resource {
diff --git a/scene/resources/canvas.h b/scene/resources/canvas.h
index dfdea82ca5..cd37ea3583 100644
--- a/scene/resources/canvas.h
+++ b/scene/resources/canvas.h
@@ -31,7 +31,7 @@
#ifndef CANVAS_H
#define CANVAS_H
-#include "resource.h"
+#include "core/resource.h"
class Canvas : public Resource {
diff --git a/scene/resources/color_ramp.cpp b/scene/resources/color_ramp.cpp
index 4a43303d84..d5e8c17cbc 100644
--- a/scene/resources/color_ramp.cpp
+++ b/scene/resources/color_ramp.cpp
@@ -29,7 +29,7 @@
/*************************************************************************/
#include "color_ramp.h"
-#include "core_string_names.h"
+#include "core/core_string_names.h"
//setter and getter names for property serialization
#define COLOR_RAMP_GET_OFFSETS "get_offsets"
diff --git a/scene/resources/color_ramp.h b/scene/resources/color_ramp.h
index 070ad7f0d3..88fa4beb7f 100644
--- a/scene/resources/color_ramp.h
+++ b/scene/resources/color_ramp.h
@@ -31,7 +31,7 @@
#ifndef SCENE_RESOURCES_COLOR_RAMP_H_
#define SCENE_RESOURCES_COLOR_RAMP_H_
-#include "resource.h"
+#include "core/resource.h"
class Gradient : public Resource {
GDCLASS(Gradient, Resource);
diff --git a/scene/resources/convex_polygon_shape.cpp b/scene/resources/convex_polygon_shape.cpp
index fa9369d3bc..9d47bca5ed 100644
--- a/scene/resources/convex_polygon_shape.cpp
+++ b/scene/resources/convex_polygon_shape.cpp
@@ -29,7 +29,7 @@
/*************************************************************************/
#include "convex_polygon_shape.h"
-#include "quick_hull.h"
+#include "core/math/quick_hull.h"
#include "servers/physics_server.h"
Vector<Vector3> ConvexPolygonShape::_gen_debug_mesh_lines() {
diff --git a/scene/resources/convex_polygon_shape_2d.cpp b/scene/resources/convex_polygon_shape_2d.cpp
index d061c4ea1e..f325af7ea4 100644
--- a/scene/resources/convex_polygon_shape_2d.cpp
+++ b/scene/resources/convex_polygon_shape_2d.cpp
@@ -30,7 +30,7 @@
#include "convex_polygon_shape_2d.h"
-#include "geometry.h"
+#include "core/math/geometry.h"
#include "servers/physics_2d_server.h"
#include "servers/visual_server.h"
diff --git a/scene/resources/curve.cpp b/scene/resources/curve.cpp
index d8989bf062..9188d890f7 100644
--- a/scene/resources/curve.cpp
+++ b/scene/resources/curve.cpp
@@ -30,7 +30,7 @@
#include "curve.h"
-#include "core_string_names.h"
+#include "core/core_string_names.h"
template <class T>
static _FORCE_INLINE_ T _bezier_interp(real_t t, T start, T control_1, T control_2, T end) {
@@ -491,6 +491,7 @@ void Curve::ensure_default_setup(float p_min, float p_max) {
void Curve::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("get_point_count"), &Curve::get_point_count);
ClassDB::bind_method(D_METHOD("add_point", "position", "left_tangent", "right_tangent", "left_mode", "right_mode"), &Curve::add_point, DEFVAL(0), DEFVAL(0), DEFVAL(TANGENT_FREE), DEFVAL(TANGENT_FREE));
ClassDB::bind_method(D_METHOD("remove_point", "index"), &Curve::remove_point);
ClassDB::bind_method(D_METHOD("clear_points"), &Curve::clear_points);
diff --git a/scene/resources/curve.h b/scene/resources/curve.h
index 058c4f1bc2..234e3a6779 100644
--- a/scene/resources/curve.h
+++ b/scene/resources/curve.h
@@ -31,7 +31,7 @@
#ifndef CURVE_H
#define CURVE_H
-#include "resource.h"
+#include "core/resource.h"
// y(x) curve
class Curve : public Resource {
diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp
index 0eee2ae393..20fa1d6e2b 100644
--- a/scene/resources/default_theme/default_theme.cpp
+++ b/scene/resources/default_theme/default_theme.cpp
@@ -32,7 +32,7 @@
#include "scene/resources/theme.h"
-#include "os/os.h"
+#include "core/os/os.h"
#include "theme_data.h"
#include "font_hidpi.inc"
diff --git a/scene/resources/dynamic_font.cpp b/scene/resources/dynamic_font.cpp
index 4df849df6a..0785d3bfc6 100644
--- a/scene/resources/dynamic_font.cpp
+++ b/scene/resources/dynamic_font.cpp
@@ -30,8 +30,8 @@
#ifdef FREETYPE_ENABLED
#include "dynamic_font.h"
-#include "os/file_access.h"
-#include "os/os.h"
+#include "core/os/file_access.h"
+#include "core/os/os.h"
#include FT_STROKER_H
diff --git a/scene/resources/dynamic_font.h b/scene/resources/dynamic_font.h
index f460bca2d4..afda48a566 100644
--- a/scene/resources/dynamic_font.h
+++ b/scene/resources/dynamic_font.h
@@ -32,10 +32,10 @@
#define DYNAMIC_FONT_H
#ifdef FREETYPE_ENABLED
-#include "io/resource_loader.h"
-#include "os/mutex.h"
-#include "os/thread_safe.h"
-#include "pair.h"
+#include "core/io/resource_loader.h"
+#include "core/os/mutex.h"
+#include "core/os/thread_safe.h"
+#include "core/pair.h"
#include "scene/resources/font.h"
#include <ft2build.h>
diff --git a/scene/resources/dynamic_font_stb.cpp b/scene/resources/dynamic_font_stb.cpp
index be394e19c4..8cb2cc4983 100644
--- a/scene/resources/dynamic_font_stb.cpp
+++ b/scene/resources/dynamic_font_stb.cpp
@@ -33,7 +33,7 @@
#ifndef FREETYPE_ENABLED
#define STB_TRUETYPE_IMPLEMENTATION
-#include "os/file_access.h"
+#include "core/os/file_access.h"
void DynamicFontData::lock() {
diff --git a/scene/resources/dynamic_font_stb.h b/scene/resources/dynamic_font_stb.h
index feae29c0c2..e1ef72ea4f 100644
--- a/scene/resources/dynamic_font_stb.h
+++ b/scene/resources/dynamic_font_stb.h
@@ -33,8 +33,8 @@
#ifndef FREETYPE_ENABLED
+#include "core/io/resource_loader.h"
#include "font.h"
-#include "io/resource_loader.h"
#include "thirdparty/misc/stb_truetype.h"
diff --git a/scene/resources/environment.cpp b/scene/resources/environment.cpp
index d3da842b79..f4d5b8376b 100644
--- a/scene/resources/environment.cpp
+++ b/scene/resources/environment.cpp
@@ -29,7 +29,7 @@
/*************************************************************************/
#include "environment.h"
-#include "project_settings.h"
+#include "core/project_settings.h"
#include "servers/visual_server.h"
#include "texture.h"
diff --git a/scene/resources/environment.h b/scene/resources/environment.h
index 7d66c7e60b..aab37719e0 100644
--- a/scene/resources/environment.h
+++ b/scene/resources/environment.h
@@ -31,7 +31,7 @@
#ifndef ENVIRONMENT_H
#define ENVIRONMENT_H
-#include "resource.h"
+#include "core/resource.h"
#include "scene/resources/sky_box.h"
#include "scene/resources/texture.h"
#include "servers/visual_server.h"
diff --git a/scene/resources/font.cpp b/scene/resources/font.cpp
index 3dfde01320..50bf8f38f7 100644
--- a/scene/resources/font.cpp
+++ b/scene/resources/font.cpp
@@ -31,8 +31,8 @@
#include "font.h"
#include "core/io/resource_loader.h"
+#include "core/method_bind_ext.gen.inc"
#include "core/os/file_access.h"
-#include "method_bind_ext.gen.inc"
void Font::draw_halign(RID p_canvas_item, const Point2 &p_pos, HAlign p_align, float p_width, const String &p_text, const Color &p_modulate, const Color &p_outline_modulate) const {
float length = get_string_size(p_text).width;
diff --git a/scene/resources/font.h b/scene/resources/font.h
index 4e295b6035..39e66a822d 100644
--- a/scene/resources/font.h
+++ b/scene/resources/font.h
@@ -31,8 +31,8 @@
#ifndef FONT_H
#define FONT_H
-#include "map.h"
-#include "resource.h"
+#include "core/map.h"
+#include "core/resource.h"
#include "scene/resources/texture.h"
/**
@author Juan Linietsky <reduzio@gmail.com>
diff --git a/scene/resources/material.h b/scene/resources/material.h
index f43d240a53..078649e7b0 100644
--- a/scene/resources/material.h
+++ b/scene/resources/material.h
@@ -31,10 +31,10 @@
#ifndef MATERIAL_H
#define MATERIAL_H
-#include "resource.h"
+#include "core/resource.h"
+#include "core/self_list.h"
#include "scene/resources/shader.h"
#include "scene/resources/texture.h"
-#include "self_list.h"
#include "servers/visual/shader_language.h"
#include "servers/visual_server.h"
/**
diff --git a/scene/resources/mesh.cpp b/scene/resources/mesh.cpp
index e6ef956dc5..6426689397 100644
--- a/scene/resources/mesh.cpp
+++ b/scene/resources/mesh.cpp
@@ -30,18 +30,13 @@
#include "mesh.h"
-#include "pair.h"
+#include "core/pair.h"
#include "scene/resources/concave_polygon_shape.h"
#include "scene/resources/convex_polygon_shape.h"
#include "surface_tool.h"
#include <stdlib.h>
-void Mesh::_clear_triangle_mesh() const {
-
- triangle_mesh.unref();
-}
-
Ref<TriangleMesh> Mesh::generate_triangle_mesh() const {
if (triangle_mesh.is_valid())
@@ -111,6 +106,11 @@ Ref<TriangleMesh> Mesh::generate_triangle_mesh() const {
void Mesh::generate_debug_mesh_lines(Vector<Vector3> &r_lines) {
+ if (debug_lines.size() > 0) {
+ r_lines = debug_lines;
+ return;
+ }
+
Ref<TriangleMesh> tm = generate_triangle_mesh();
if (tm.is_null())
return;
@@ -120,23 +120,25 @@ void Mesh::generate_debug_mesh_lines(Vector<Vector3> &r_lines) {
const int triangles_num = tm->get_triangles().size();
PoolVector<Vector3> vertices = tm->get_vertices();
- r_lines.resize(tm->get_triangles().size() * 6); // 3 lines x 2 points each line
+ debug_lines.resize(tm->get_triangles().size() * 6); // 3 lines x 2 points each line
PoolVector<int>::Read ind_r = triangle_indices.read();
PoolVector<Vector3>::Read ver_r = vertices.read();
for (int j = 0, x = 0, i = 0; i < triangles_num; j += 6, x += 3, ++i) {
// Triangle line 1
- r_lines.write[j + 0] = ver_r[ind_r[x + 0]];
- r_lines.write[j + 1] = ver_r[ind_r[x + 1]];
+ debug_lines.write[j + 0] = ver_r[ind_r[x + 0]];
+ debug_lines.write[j + 1] = ver_r[ind_r[x + 1]];
// Triangle line 2
- r_lines.write[j + 2] = ver_r[ind_r[x + 1]];
- r_lines.write[j + 3] = ver_r[ind_r[x + 2]];
+ debug_lines.write[j + 2] = ver_r[ind_r[x + 1]];
+ debug_lines.write[j + 3] = ver_r[ind_r[x + 2]];
// Triangle line 3
- r_lines.write[j + 4] = ver_r[ind_r[x + 2]];
- r_lines.write[j + 5] = ver_r[ind_r[x + 0]];
+ debug_lines.write[j + 4] = ver_r[ind_r[x + 2]];
+ debug_lines.write[j + 5] = ver_r[ind_r[x + 0]];
}
+
+ r_lines = debug_lines;
}
void Mesh::generate_debug_mesh_indices(Vector<Vector3> &r_points) {
Ref<TriangleMesh> tm = generate_triangle_mesh();
@@ -536,8 +538,9 @@ void Mesh::_bind_methods() {
BIND_ENUM_CONSTANT(ARRAY_MAX);
}
-void Mesh::clear_cache() {
- _clear_triangle_mesh();
+void Mesh::clear_cache() const {
+ triangle_mesh.unref();
+ debug_lines.clear();
}
Mesh::Mesh() {
@@ -850,7 +853,7 @@ void ArrayMesh::add_surface_from_arrays(PrimitiveType p_primitive, const Array &
_recompute_aabb();
}
- _clear_triangle_mesh();
+ clear_cache();
_change_notify();
emit_changed();
}
@@ -929,7 +932,7 @@ void ArrayMesh::surface_remove(int p_idx) {
VisualServer::get_singleton()->mesh_remove_surface(mesh, p_idx);
surfaces.remove(p_idx);
- _clear_triangle_mesh();
+ clear_cache();
_recompute_aabb();
_change_notify();
emit_changed();
@@ -1035,7 +1038,7 @@ void ArrayMesh::add_surface_from_mesh_data(const Geometry::MeshData &p_mesh_data
else
aabb.merge_with(s.aabb);
- _clear_triangle_mesh();
+ clear_cache();
surfaces.push_back(s);
_change_notify();
@@ -1375,6 +1378,7 @@ void ArrayMesh::reload_from_file() {
VisualServer::get_singleton()->mesh_clear(mesh);
surfaces.clear();
clear_blend_shapes();
+ clear_cache();
Resource::reload_from_file();
diff --git a/scene/resources/mesh.h b/scene/resources/mesh.h
index 36bfca49f8..aebba09ef8 100644
--- a/scene/resources/mesh.h
+++ b/scene/resources/mesh.h
@@ -31,11 +31,11 @@
#ifndef MESH_H
#define MESH_H
-#include "resource.h"
+#include "core/math/triangle_mesh.h"
+#include "core/resource.h"
#include "scene/resources/material.h"
#include "scene/resources/shape.h"
#include "servers/visual_server.h"
-#include "triangle_mesh.h"
/**
@author Juan Linietsky <reduzio@gmail.com>
*/
@@ -44,11 +44,10 @@ class Mesh : public Resource {
GDCLASS(Mesh, Resource);
mutable Ref<TriangleMesh> triangle_mesh; //cached
+ mutable Vector<Vector3> debug_lines;
Size2 lightmap_size_hint;
protected:
- void _clear_triangle_mesh() const;
-
static void _bind_methods();
public:
@@ -146,7 +145,7 @@ public:
void set_lightmap_size_hint(const Vector2 &p_size);
Size2 get_lightmap_size_hint() const;
- void clear_cache();
+ void clear_cache() const;
Mesh();
};
diff --git a/scene/resources/mesh_library.h b/scene/resources/mesh_library.h
index 69719960e2..3ce0cf9b66 100644
--- a/scene/resources/mesh_library.h
+++ b/scene/resources/mesh_library.h
@@ -31,9 +31,9 @@
#ifndef GRID_THEME_H
#define GRID_THEME_H
-#include "map.h"
+#include "core/map.h"
+#include "core/resource.h"
#include "mesh.h"
-#include "resource.h"
#include "scene/3d/navigation_mesh.h"
#include "shape.h"
diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp
index f034e07ff9..086fb83af9 100644
--- a/scene/resources/packed_scene.cpp
+++ b/scene/resources/packed_scene.cpp
@@ -31,9 +31,9 @@
#include "packed_scene.h"
#include "core/core_string_names.h"
-#include "engine.h"
-#include "io/resource_loader.h"
-#include "project_settings.h"
+#include "core/engine.h"
+#include "core/io/resource_loader.h"
+#include "core/project_settings.h"
#include "scene/2d/node_2d.h"
#include "scene/3d/spatial.h"
#include "scene/gui/control.h"
diff --git a/scene/resources/packed_scene.h b/scene/resources/packed_scene.h
index 278986eb62..e5f22f5e3b 100644
--- a/scene/resources/packed_scene.h
+++ b/scene/resources/packed_scene.h
@@ -31,7 +31,7 @@
#ifndef PACKED_SCENE_H
#define PACKED_SCENE_H
-#include "resource.h"
+#include "core/resource.h"
#include "scene/main/node.h"
class SceneState : public Reference {
diff --git a/scene/resources/particles_material.cpp b/scene/resources/particles_material.cpp
index 218a4cefe7..364ec9bb19 100644
--- a/scene/resources/particles_material.cpp
+++ b/scene/resources/particles_material.cpp
@@ -1123,7 +1123,7 @@ void ParticlesMaterial::_bind_methods() {
ADD_GROUP("Gravity", "");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "gravity"), "set_gravity", "get_gravity");
ADD_GROUP("Initial Velocity", "initial_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "initial_velocity", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater"), "set_param", "get_param", PARAM_INITIAL_LINEAR_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::REAL, "initial_velocity", PROPERTY_HINT_RANGE, "0,1000,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_INITIAL_LINEAR_VELOCITY);
ADD_PROPERTYI(PropertyInfo(Variant::REAL, "initial_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_INITIAL_LINEAR_VELOCITY);
ADD_GROUP("Angular Velocity", "angular_");
ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_velocity", PROPERTY_HINT_RANGE, "-360,360,0.01"), "set_param", "get_param", PARAM_ANGULAR_VELOCITY);
@@ -1204,7 +1204,7 @@ ParticlesMaterial::ParticlesMaterial() :
set_spread(45);
set_flatness(0);
- set_param(PARAM_INITIAL_LINEAR_VELOCITY, 1);
+ set_param(PARAM_INITIAL_LINEAR_VELOCITY, 0);
set_param(PARAM_ORBIT_VELOCITY, 0);
set_param(PARAM_LINEAR_ACCEL, 0);
set_param(PARAM_RADIAL_ACCEL, 0);
diff --git a/scene/resources/particles_material.h b/scene/resources/particles_material.h
index 8090926fa3..91fdcc0346 100644
--- a/scene/resources/particles_material.h
+++ b/scene/resources/particles_material.h
@@ -28,7 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "rid.h"
+#include "core/rid.h"
#include "scene/resources/material.h"
#ifndef PARTICLES_MATERIAL_H
diff --git a/scene/resources/physics_material.h b/scene/resources/physics_material.h
index c882e2081a..bf11bf0ac1 100644
--- a/scene/resources/physics_material.h
+++ b/scene/resources/physics_material.h
@@ -31,7 +31,7 @@
#ifndef physics_material_override_H
#define physics_material_override_H
-#include "resource.h"
+#include "core/resource.h"
#include "servers/physics_server.h"
class PhysicsMaterial : public Resource {
diff --git a/scene/resources/polygon_path_finder.cpp b/scene/resources/polygon_path_finder.cpp
index 44f9ebaf33..bd03930c9e 100644
--- a/scene/resources/polygon_path_finder.cpp
+++ b/scene/resources/polygon_path_finder.cpp
@@ -29,7 +29,7 @@
/*************************************************************************/
#include "polygon_path_finder.h"
-#include "geometry.h"
+#include "core/math/geometry.h"
bool PolygonPathFinder::_is_point_inside(const Vector2 &p_point) const {
diff --git a/scene/resources/polygon_path_finder.h b/scene/resources/polygon_path_finder.h
index 19761c274c..66282458af 100644
--- a/scene/resources/polygon_path_finder.h
+++ b/scene/resources/polygon_path_finder.h
@@ -31,7 +31,7 @@
#ifndef POLYGON_PATH_FINDER_H
#define POLYGON_PATH_FINDER_H
-#include "resource.h"
+#include "core/resource.h"
class PolygonPathFinder : public Resource {
diff --git a/scene/resources/primitive_meshes.cpp b/scene/resources/primitive_meshes.cpp
index 28aa6f1aa7..63aa44e1d8 100644
--- a/scene/resources/primitive_meshes.cpp
+++ b/scene/resources/primitive_meshes.cpp
@@ -89,7 +89,7 @@ void PrimitiveMesh::_update() const {
pending_request = false;
- _clear_triangle_mesh();
+ clear_cache();
const_cast<PrimitiveMesh *>(this)->emit_changed();
}
diff --git a/scene/resources/room.h b/scene/resources/room.h
index 359d918665..d5ad847516 100644
--- a/scene/resources/room.h
+++ b/scene/resources/room.h
@@ -31,8 +31,8 @@
#ifndef ROOM_BOUNDS_H
#define ROOM_BOUNDS_H
-#include "bsp_tree.h"
-#include "resource.h"
+#include "core/math/bsp_tree.h"
+#include "core/resource.h"
/**
@author Juan Linietsky <reduzio@gmail.com>
*/
diff --git a/scene/resources/scene_format_text.cpp b/scene/resources/scene_format_text.cpp
index fd9989fe72..02d2cf31f3 100644
--- a/scene/resources/scene_format_text.cpp
+++ b/scene/resources/scene_format_text.cpp
@@ -30,15 +30,15 @@
#include "scene_format_text.h"
#include "core/io/resource_format_binary.h"
-#include "os/dir_access.h"
-#include "project_settings.h"
-#include "version.h"
+#include "core/os/dir_access.h"
+#include "core/project_settings.h"
+#include "core/version.h"
//version 2: changed names for basis, aabb, poolvectors, etc.
#define FORMAT_VERSION 2
-#include "os/dir_access.h"
-#include "version.h"
+#include "core/os/dir_access.h"
+#include "core/version.h"
#define _printerr() ERR_PRINT(String(res_path + ":" + itos(lines) + " - Parse Error: " + error_text).utf8().get_data());
diff --git a/scene/resources/scene_format_text.h b/scene/resources/scene_format_text.h
index c28ded3d77..8d1af2bbb2 100644
--- a/scene/resources/scene_format_text.h
+++ b/scene/resources/scene_format_text.h
@@ -31,11 +31,11 @@
#ifndef SCENE_FORMAT_TEXT_H
#define SCENE_FORMAT_TEXT_H
-#include "io/resource_loader.h"
-#include "io/resource_saver.h"
-#include "os/file_access.h"
+#include "core/io/resource_loader.h"
+#include "core/io/resource_saver.h"
+#include "core/os/file_access.h"
+#include "core/variant_parser.h"
#include "scene/resources/packed_scene.h"
-#include "variant_parser.h"
class ResourceInteractiveLoaderText : public ResourceInteractiveLoader {
diff --git a/scene/resources/shader.cpp b/scene/resources/shader.cpp
index f53f03c1c8..1bfc41bd92 100644
--- a/scene/resources/shader.cpp
+++ b/scene/resources/shader.cpp
@@ -29,7 +29,7 @@
/*************************************************************************/
#include "shader.h"
-#include "os/file_access.h"
+#include "core/os/file_access.h"
#include "scene/scene_string_names.h"
#include "servers/visual/shader_language.h"
#include "servers/visual_server.h"
diff --git a/scene/resources/shader.h b/scene/resources/shader.h
index efc5da7753..6c91205c0c 100644
--- a/scene/resources/shader.h
+++ b/scene/resources/shader.h
@@ -31,9 +31,9 @@
#ifndef SHADER_H
#define SHADER_H
-#include "io/resource_loader.h"
-#include "io/resource_saver.h"
-#include "resource.h"
+#include "core/io/resource_loader.h"
+#include "core/io/resource_saver.h"
+#include "core/resource.h"
#include "scene/resources/texture.h"
class Shader : public Resource {
diff --git a/scene/resources/shape.cpp b/scene/resources/shape.cpp
index a48ce0564b..8ccca81acd 100644
--- a/scene/resources/shape.cpp
+++ b/scene/resources/shape.cpp
@@ -30,7 +30,7 @@
#include "shape.h"
-#include "os/os.h"
+#include "core/os/os.h"
#include "scene/main/scene_tree.h"
#include "scene/resources/mesh.h"
#include "servers/physics_server.h"
diff --git a/scene/resources/shape.h b/scene/resources/shape.h
index 0c44b86e92..6643f4ee44 100644
--- a/scene/resources/shape.h
+++ b/scene/resources/shape.h
@@ -31,7 +31,7 @@
#ifndef SHAPE_H
#define SHAPE_H
-#include "resource.h"
+#include "core/resource.h"
class ArrayMesh;
class Shape : public Resource {
diff --git a/scene/resources/shape_2d.h b/scene/resources/shape_2d.h
index 7eb0406bd8..fa39daa565 100644
--- a/scene/resources/shape_2d.h
+++ b/scene/resources/shape_2d.h
@@ -31,7 +31,7 @@
#ifndef SHAPE_2D_H
#define SHAPE_2D_H
-#include "resource.h"
+#include "core/resource.h"
class Shape2D : public Resource {
GDCLASS(Shape2D, Resource);
diff --git a/scene/resources/sky_box.cpp b/scene/resources/sky_box.cpp
index 4176aed4d8..a6a52c7bba 100644
--- a/scene/resources/sky_box.cpp
+++ b/scene/resources/sky_box.cpp
@@ -29,7 +29,7 @@
/*************************************************************************/
#include "sky_box.h"
-#include "io/image_loader.h"
+#include "core/io/image_loader.h"
void Sky::set_radiance_size(RadianceSize p_size) {
ERR_FAIL_INDEX(p_size, RADIANCE_SIZE_MAX);
diff --git a/scene/resources/sky_box.h b/scene/resources/sky_box.h
index e561653a9e..bbb852822d 100644
--- a/scene/resources/sky_box.h
+++ b/scene/resources/sky_box.h
@@ -31,7 +31,7 @@
#ifndef SKY_BOX_H
#define SKY_BOX_H
-#include "os/thread.h"
+#include "core/os/thread.h"
#include "scene/resources/texture.h"
class Sky : public Resource {
GDCLASS(Sky, Resource);
diff --git a/scene/resources/space_2d.h b/scene/resources/space_2d.h
index 148285ac6d..1143ad2bd5 100644
--- a/scene/resources/space_2d.h
+++ b/scene/resources/space_2d.h
@@ -31,7 +31,7 @@
#ifndef SPACE_2D_H
#define SPACE_2D_H
-#include "resource.h"
+#include "core/resource.h"
#include "servers/physics_2d_server.h"
class Space2D : public Resource {
diff --git a/scene/resources/style_box.h b/scene/resources/style_box.h
index ed193a1ab4..df3ebe1c36 100644
--- a/scene/resources/style_box.h
+++ b/scene/resources/style_box.h
@@ -31,7 +31,7 @@
#ifndef STYLE_BOX_H
#define STYLE_BOX_H
-#include "resource.h"
+#include "core/resource.h"
#include "scene/resources/texture.h"
#include "servers/visual_server.h"
/**
diff --git a/scene/resources/surface_tool.cpp b/scene/resources/surface_tool.cpp
index 81fabf40fe..5d4c7861e3 100644
--- a/scene/resources/surface_tool.cpp
+++ b/scene/resources/surface_tool.cpp
@@ -29,7 +29,8 @@
/*************************************************************************/
#include "surface_tool.h"
-#include "method_bind_ext.gen.inc"
+
+#include "core/method_bind_ext.gen.inc"
#define _VERTEX_SNAP 0.0001
#define EQ_VERTEX_DIST 0.00001
diff --git a/scene/resources/text_file.cpp b/scene/resources/text_file.cpp
index e2fe0adfc5..2af24ad2d5 100644
--- a/scene/resources/text_file.cpp
+++ b/scene/resources/text_file.cpp
@@ -30,7 +30,7 @@
#include "text_file.h"
-#include "os/file_access.h"
+#include "core/os/file_access.h"
bool TextFile::has_text() const {
return text != "";
diff --git a/scene/resources/text_file.h b/scene/resources/text_file.h
index 40b648eebb..3abc769dc6 100644
--- a/scene/resources/text_file.h
+++ b/scene/resources/text_file.h
@@ -31,8 +31,8 @@
#ifndef TEXTFILE_H
#define TEXTFILE_H
-#include "io/resource_loader.h"
-#include "io/resource_saver.h"
+#include "core/io/resource_loader.h"
+#include "core/io/resource_saver.h"
class TextFile : public Resource {
diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp
index 811e5c3d2c..9875c7b130 100644
--- a/scene/resources/texture.cpp
+++ b/scene/resources/texture.cpp
@@ -29,11 +29,12 @@
/*************************************************************************/
#include "texture.h"
+
#include "bit_mask.h"
+#include "core/core_string_names.h"
+#include "core/io/image_loader.h"
#include "core/method_bind_ext.gen.inc"
#include "core/os/os.h"
-#include "core_string_names.h"
-#include "io/image_loader.h"
Size2 Texture::get_size() const {
@@ -1606,7 +1607,7 @@ void GradientTexture::_bind_methods() {
ClassDB::bind_method(D_METHOD("_update"), &GradientTexture::_update);
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "gradient", PROPERTY_HINT_RESOURCE_TYPE, "Gradient"), "set_gradient", "get_gradient");
- ADD_PROPERTY(PropertyInfo(Variant::INT, "width"), "set_width", "get_width");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "width", PROPERTY_HINT_RANGE, "1,2048,1,or_greater"), "set_width", "get_width");
}
void GradientTexture::set_gradient(Ref<Gradient> p_gradient) {
diff --git a/scene/resources/texture.h b/scene/resources/texture.h
index 79e6d2cdf9..4865f7b507 100644
--- a/scene/resources/texture.h
+++ b/scene/resources/texture.h
@@ -31,13 +31,13 @@
#ifndef TEXTURE_H
#define TEXTURE_H
+#include "core/io/resource_loader.h"
+#include "core/math/rect2.h"
+#include "core/os/mutex.h"
+#include "core/os/rw_lock.h"
+#include "core/os/thread_safe.h"
+#include "core/resource.h"
#include "curve.h"
-#include "io/resource_loader.h"
-#include "os/mutex.h"
-#include "os/rw_lock.h"
-#include "os/thread_safe.h"
-#include "rect2.h"
-#include "resource.h"
#include "scene/resources/color_ramp.h"
#include "servers/visual_server.h"
/**
diff --git a/scene/resources/theme.cpp b/scene/resources/theme.cpp
index f903669fc7..b102d477f2 100644
--- a/scene/resources/theme.cpp
+++ b/scene/resources/theme.cpp
@@ -29,8 +29,8 @@
/*************************************************************************/
#include "theme.h"
-#include "os/file_access.h"
-#include "print_string.h"
+#include "core/os/file_access.h"
+#include "core/print_string.h"
Ref<Theme> Theme::default_theme;
diff --git a/scene/resources/theme.h b/scene/resources/theme.h
index e0d4038e7e..0b76e95f18 100644
--- a/scene/resources/theme.h
+++ b/scene/resources/theme.h
@@ -31,8 +31,8 @@
#ifndef THEME_H
#define THEME_H
-#include "io/resource_loader.h"
-#include "resource.h"
+#include "core/io/resource_loader.h"
+#include "core/resource.h"
#include "scene/resources/font.h"
#include "scene/resources/shader.h"
#include "scene/resources/style_box.h"
diff --git a/scene/resources/tile_set.cpp b/scene/resources/tile_set.cpp
index 23074b4bae..f852ecd7eb 100644
--- a/scene/resources/tile_set.cpp
+++ b/scene/resources/tile_set.cpp
@@ -29,7 +29,7 @@
/*************************************************************************/
#include "tile_set.h"
-#include "array.h"
+#include "core/array.h"
bool TileSet::_set(const StringName &p_name, const Variant &p_value) {
diff --git a/scene/resources/tile_set.h b/scene/resources/tile_set.h
index 40eee2700d..74dcd47c48 100644
--- a/scene/resources/tile_set.h
+++ b/scene/resources/tile_set.h
@@ -32,7 +32,7 @@
#define TILE_SET_H
#include "core/array.h"
-#include "resource.h"
+#include "core/resource.h"
#include "scene/2d/light_occluder_2d.h"
#include "scene/2d/navigation_polygon.h"
#include "scene/resources/shape_2d.h"
diff --git a/scene/resources/visual_shader.cpp b/scene/resources/visual_shader.cpp
index 46b936b731..6bfb6ec5bf 100644
--- a/scene/resources/visual_shader.cpp
+++ b/scene/resources/visual_shader.cpp
@@ -29,8 +29,8 @@
/*************************************************************************/
#include "visual_shader.h"
+#include "core/vmap.h"
#include "servers/visual/shader_types.h"
-#include "vmap.h"
void VisualShaderNode::set_output_port_for_preview(int p_index) {
diff --git a/scene/resources/visual_shader.h b/scene/resources/visual_shader.h
index 81dd37de3c..70d2425304 100644
--- a/scene/resources/visual_shader.h
+++ b/scene/resources/visual_shader.h
@@ -31,8 +31,8 @@
#ifndef VISUAL_SHADER_H
#define VISUAL_SHADER_H
+#include "core/string_builder.h"
#include "scene/resources/shader.h"
-#include "string_builder.h"
class VisualShaderNodeUniform;
class VisualShaderNode;
diff --git a/scene/resources/world.cpp b/scene/resources/world.cpp
index 82183d24e7..b4588cd87c 100644
--- a/scene/resources/world.cpp
+++ b/scene/resources/world.cpp
@@ -30,8 +30,8 @@
#include "world.h"
-#include "camera_matrix.h"
-#include "octree.h"
+#include "core/math/camera_matrix.h"
+#include "core/math/octree.h"
#include "scene/3d/camera.h"
#include "scene/3d/visibility_notifier.h"
#include "scene/scene_string_names.h"
diff --git a/scene/resources/world.h b/scene/resources/world.h
index 54bdf25784..4c517323f3 100644
--- a/scene/resources/world.h
+++ b/scene/resources/world.h
@@ -31,7 +31,7 @@
#ifndef WORLD_H
#define WORLD_H
-#include "resource.h"
+#include "core/resource.h"
#include "scene/resources/environment.h"
#include "servers/physics_server.h"
#include "servers/visual_server.h"
diff --git a/scene/resources/world_2d.cpp b/scene/resources/world_2d.cpp
index bed6ffd1bd..b390e74073 100644
--- a/scene/resources/world_2d.cpp
+++ b/scene/resources/world_2d.cpp
@@ -32,7 +32,7 @@
#include "servers/physics_2d_server.h"
#include "servers/visual_server.h"
//#include "servers/spatial_sound_2d_server.h"
-#include "project_settings.h"
+#include "core/project_settings.h"
#include "scene/2d/camera_2d.h"
#include "scene/2d/visibility_notifier_2d.h"
#include "scene/main/viewport.h"
diff --git a/scene/resources/world_2d.h b/scene/resources/world_2d.h
index 59f34e32f2..856e9dbf01 100644
--- a/scene/resources/world_2d.h
+++ b/scene/resources/world_2d.h
@@ -31,8 +31,8 @@
#ifndef WORLD_2D_H
#define WORLD_2D_H
-#include "project_settings.h"
-#include "resource.h"
+#include "core/project_settings.h"
+#include "core/resource.h"
#include "servers/physics_2d_server.h"
class SpatialIndexer2D;
diff --git a/scene/scene_string_names.h b/scene/scene_string_names.h
index dbbcf79b9f..25e2c5d4a6 100644
--- a/scene/scene_string_names.h
+++ b/scene/scene_string_names.h
@@ -31,8 +31,8 @@
#ifndef SCENE_STRING_NAMES_H
#define SCENE_STRING_NAMES_H
-#include "node_path.h"
-#include "string_db.h"
+#include "core/node_path.h"
+#include "core/string_db.h"
class SceneStringNames {
friend void register_scene_types();