diff options
Diffstat (limited to 'scene/resources')
61 files changed, 130 insertions, 124 deletions
diff --git a/scene/resources/animation.cpp b/scene/resources/animation.cpp index 58e6db3f5e..80ad2ad739 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 @@ -1442,7 +1442,7 @@ void Animation::track_set_key_transition(int p_track, int p_key_idx, float p_tra case TYPE_BEZIER: case TYPE_AUDIO: case TYPE_ANIMATION: { - // they dont use transition + // they don't use transition } break; } } 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..597ffe49ae 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()); @@ -294,25 +294,25 @@ Ref<PackedScene> ResourceInteractiveLoaderText::_parse_node_tag(VariantParser::R if (!next_tag.fields.has("from")) { error = ERR_FILE_CORRUPT; - error_text = "missing 'from' field fron connection tag"; + error_text = "missing 'from' field from connection tag"; return Ref<PackedScene>(); } if (!next_tag.fields.has("to")) { error = ERR_FILE_CORRUPT; - error_text = "missing 'to' field fron connection tag"; + error_text = "missing 'to' field from connection tag"; return Ref<PackedScene>(); } if (!next_tag.fields.has("signal")) { error = ERR_FILE_CORRUPT; - error_text = "missing 'signal' field fron connection tag"; + error_text = "missing 'signal' field from connection tag"; return Ref<PackedScene>(); } if (!next_tag.fields.has("method")) { error = ERR_FILE_CORRUPT; - error_text = "missing 'method' field fron connection tag"; + error_text = "missing 'method' field from connection tag"; return Ref<PackedScene>(); } @@ -358,7 +358,7 @@ Ref<PackedScene> ResourceInteractiveLoaderText::_parse_node_tag(VariantParser::R if (!next_tag.fields.has("path")) { error = ERR_FILE_CORRUPT; - error_text = "missing 'path' field fron connection tag"; + error_text = "missing 'path' field from connection tag"; _printerr(); return Ref<PackedScene>(); } 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; |