diff options
Diffstat (limited to 'scene')
38 files changed, 41 insertions, 24 deletions
diff --git a/scene/2d/audio_stream_player_2d.cpp b/scene/2d/audio_stream_player_2d.cpp index a761d0d1ec..f8e30c2462 100644 --- a/scene/2d/audio_stream_player_2d.cpp +++ b/scene/2d/audio_stream_player_2d.cpp @@ -33,6 +33,7 @@ #include "scene/2d/area_2d.h" #include "scene/2d/audio_listener_2d.h" #include "scene/main/window.h" +#include "scene/resources/world_2d.h" void AudioStreamPlayer2D::_notification(int p_what) { if (p_what == NOTIFICATION_ENTER_TREE) { diff --git a/scene/2d/camera_2d.cpp b/scene/2d/camera_2d.cpp index e8dfaf9c2e..548cd5de9a 100644 --- a/scene/2d/camera_2d.cpp +++ b/scene/2d/camera_2d.cpp @@ -30,6 +30,7 @@ #include "camera_2d.h" +#include "core/config/project_settings.h" #include "scene/main/window.h" void Camera2D::_update_scroll() { diff --git a/scene/2d/collision_object_2d.cpp b/scene/2d/collision_object_2d.cpp index 70c7e48fd4..fbfe1d7eff 100644 --- a/scene/2d/collision_object_2d.cpp +++ b/scene/2d/collision_object_2d.cpp @@ -30,6 +30,7 @@ #include "collision_object_2d.h" +#include "scene/resources/world_2d.h" #include "scene/scene_string_names.h" void CollisionObject2D::_notification(int p_what) { diff --git a/scene/2d/navigation_agent_2d.cpp b/scene/2d/navigation_agent_2d.cpp index 9331f2dccb..1bbf7236c5 100644 --- a/scene/2d/navigation_agent_2d.cpp +++ b/scene/2d/navigation_agent_2d.cpp @@ -31,6 +31,7 @@ #include "navigation_agent_2d.h" #include "core/math/geometry_2d.h" +#include "scene/resources/world_2d.h" #include "servers/navigation_server_2d.h" void NavigationAgent2D::_bind_methods() { diff --git a/scene/2d/navigation_obstacle_2d.cpp b/scene/2d/navigation_obstacle_2d.cpp index fad54070a5..90d993f20b 100644 --- a/scene/2d/navigation_obstacle_2d.cpp +++ b/scene/2d/navigation_obstacle_2d.cpp @@ -31,6 +31,7 @@ #include "navigation_obstacle_2d.h" #include "scene/2d/collision_shape_2d.h" +#include "scene/resources/world_2d.h" #include "servers/navigation_server_2d.h" void NavigationObstacle2D::_bind_methods() { diff --git a/scene/2d/navigation_region_2d.cpp b/scene/2d/navigation_region_2d.cpp index e685ad8f67..99d8b0f604 100644 --- a/scene/2d/navigation_region_2d.cpp +++ b/scene/2d/navigation_region_2d.cpp @@ -33,6 +33,7 @@ #include "core/core_string_names.h" #include "core/math/geometry_2d.h" #include "core/os/mutex.h" +#include "scene/resources/world_2d.h" #include "servers/navigation_server_2d.h" #include "thirdparty/misc/polypartition.h" diff --git a/scene/2d/ray_cast_2d.cpp b/scene/2d/ray_cast_2d.cpp index 51b3e676f9..8b69d52c32 100644 --- a/scene/2d/ray_cast_2d.cpp +++ b/scene/2d/ray_cast_2d.cpp @@ -31,6 +31,7 @@ #include "ray_cast_2d.h" #include "collision_object_2d.h" +#include "scene/resources/world_2d.h" void RayCast2D::set_target_position(const Vector2 &p_point) { target_position = p_point; diff --git a/scene/2d/shape_cast_2d.h b/scene/2d/shape_cast_2d.h index ea36b25068..15436d6e3d 100644 --- a/scene/2d/shape_cast_2d.h +++ b/scene/2d/shape_cast_2d.h @@ -33,6 +33,7 @@ #include "scene/2d/node_2d.h" #include "scene/resources/shape_2d.h" +#include "scene/resources/world_2d.h" class CollisionObject2D; diff --git a/scene/2d/skeleton_2d.cpp b/scene/2d/skeleton_2d.cpp index 2270926ea7..a12147b7fd 100644 --- a/scene/2d/skeleton_2d.cpp +++ b/scene/2d/skeleton_2d.cpp @@ -31,6 +31,7 @@ #include "skeleton_2d.h" #ifdef TOOLS_ENABLED +#include "editor/editor_data.h" #include "editor/editor_settings.h" #include "editor/plugins/canvas_item_editor_plugin.h" #endif //TOOLS_ENABLED diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp index 02ca1ba2aa..cd39e08682 100644 --- a/scene/2d/tile_map.cpp +++ b/scene/2d/tile_map.cpp @@ -31,7 +31,7 @@ #include "tile_map.h" #include "core/io/marshalls.h" - +#include "scene/resources/world_2d.h" #include "servers/navigation_server_2d.h" Map<Vector2i, TileSet::CellNeighbor> TileMap::TerrainConstraint::get_overlapping_coords_and_peering_bits() const { diff --git a/scene/3d/camera_3d.h b/scene/3d/camera_3d.h index b5665814c7..9f2f8ceed1 100644 --- a/scene/3d/camera_3d.h +++ b/scene/3d/camera_3d.h @@ -33,6 +33,8 @@ #include "scene/3d/node_3d.h" #include "scene/3d/velocity_tracker_3d.h" +#include "scene/resources/camera_effects.h" +#include "scene/resources/environment.h" class Camera3D : public Node3D { GDCLASS(Camera3D, Node3D); diff --git a/scene/3d/node_3d.h b/scene/3d/node_3d.h index 4abda66187..65d0e071cf 100644 --- a/scene/3d/node_3d.h +++ b/scene/3d/node_3d.h @@ -32,6 +32,7 @@ #define NODE_3D_H #include "scene/main/node.h" +#include "scene/resources/world_3d.h" class Node3DGizmo : public RefCounted { GDCLASS(Node3DGizmo, RefCounted); diff --git a/scene/3d/occluder_instance_3d.cpp b/scene/3d/occluder_instance_3d.cpp index 0277171922..231817526c 100644 --- a/scene/3d/occluder_instance_3d.cpp +++ b/scene/3d/occluder_instance_3d.cpp @@ -29,6 +29,8 @@ /*************************************************************************/ #include "occluder_instance_3d.h" + +#include "core/config/project_settings.h" #include "core/core_string_names.h" #include "core/math/geometry_2d.h" #include "core/math/triangulate.h" diff --git a/scene/3d/xr_nodes.cpp b/scene/3d/xr_nodes.cpp index 66d1b97056..211c39c949 100644 --- a/scene/3d/xr_nodes.cpp +++ b/scene/3d/xr_nodes.cpp @@ -30,6 +30,7 @@ #include "xr_nodes.h" +#include "core/config/project_settings.h" #include "scene/main/viewport.h" #include "servers/xr/xr_interface.h" diff --git a/scene/gui/base_button.h b/scene/gui/base_button.h index 0bcad4fc0e..6bfffe7575 100644 --- a/scene/gui/base_button.h +++ b/scene/gui/base_button.h @@ -31,6 +31,7 @@ #ifndef BASE_BUTTON_H #define BASE_BUTTON_H +#include "core/input/shortcut.h" #include "scene/gui/control.h" class ButtonGroup; diff --git a/scene/gui/control.h b/scene/gui/control.h index 7024164e6c..becb50a118 100644 --- a/scene/gui/control.h +++ b/scene/gui/control.h @@ -31,12 +31,10 @@ #ifndef CONTROL_H #define CONTROL_H -#include "core/input/shortcut.h" #include "core/math/transform_2d.h" #include "core/object/gdvirtual.gen.inc" #include "core/templates/rid.h" #include "scene/main/canvas_item.h" -#include "scene/main/node.h" #include "scene/main/timer.h" #include "scene/resources/theme.h" diff --git a/scene/gui/flow_container.cpp b/scene/gui/flow_container.cpp index ba487b2905..e806a4a8a6 100644 --- a/scene/gui/flow_container.cpp +++ b/scene/gui/flow_container.cpp @@ -28,8 +28,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#include "scene/gui/container.h" - #include "flow_container.h" struct _LineData { diff --git a/scene/gui/flow_container.h b/scene/gui/flow_container.h index 84f2ae4ae3..a2da43e071 100644 --- a/scene/gui/flow_container.h +++ b/scene/gui/flow_container.h @@ -31,7 +31,7 @@ #ifndef FLOW_CONTAINER_H #define FLOW_CONTAINER_H -class Container; +#include "scene/gui/container.h" class FlowContainer : public Container { GDCLASS(FlowContainer, Container); diff --git a/scene/gui/graph_edit.h b/scene/gui/graph_edit.h index da973b46f0..b0d1944d6e 100644 --- a/scene/gui/graph_edit.h +++ b/scene/gui/graph_edit.h @@ -36,9 +36,7 @@ #include "scene/gui/graph_node.h" #include "scene/gui/label.h" #include "scene/gui/scroll_bar.h" -#include "scene/gui/slider.h" #include "scene/gui/spin_box.h" -#include "scene/gui/texture_rect.h" class GraphEdit; class ViewPanner; diff --git a/scene/gui/link_button.h b/scene/gui/link_button.h index 7d302e967d..a455e866b1 100644 --- a/scene/gui/link_button.h +++ b/scene/gui/link_button.h @@ -32,7 +32,6 @@ #define LINKBUTTON_H #include "scene/gui/base_button.h" -#include "scene/resources/bit_map.h" #include "scene/resources/text_line.h" class LinkButton : public BaseButton { diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp index 61a5fb999c..5c86e1850e 100644 --- a/scene/gui/popup_menu.cpp +++ b/scene/gui/popup_menu.cpp @@ -30,6 +30,7 @@ #include "popup_menu.h" +#include "core/config/project_settings.h" #include "core/input/input.h" #include "core/os/keyboard.h" #include "core/os/os.h" diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index 4d779f51e2..042aec7362 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -514,7 +514,7 @@ void RichTextLabel::_shape_line(ItemFrame *p_frame, int p_line, const Ref<Font> } break; case ITEM_IMAGE: { ItemImage *img = (ItemImage *)it; - l.text_buf->add_object((uint64_t)it, img->image->get_size(), img->inline_align, 1); + l.text_buf->add_object((uint64_t)it, img->size, img->inline_align, 1); text += String::chr(0xfffc); l.char_count++; remaining_characters--; diff --git a/scene/gui/scroll_container.cpp b/scene/gui/scroll_container.cpp index 5e128d594c..7e69fa09e7 100644 --- a/scene/gui/scroll_container.cpp +++ b/scene/gui/scroll_container.cpp @@ -29,6 +29,8 @@ /*************************************************************************/ #include "scroll_container.h" + +#include "core/config/project_settings.h" #include "core/os/os.h" #include "scene/main/window.h" diff --git a/scene/main/canvas_item.h b/scene/main/canvas_item.h index a368a10ad0..2a9e7bac3d 100644 --- a/scene/main/canvas_item.h +++ b/scene/main/canvas_item.h @@ -32,10 +32,8 @@ #define CANVAS_ITEM_H #include "scene/main/node.h" -#include "scene/main/scene_tree.h" #include "scene/resources/canvas_item_material.h" #include "scene/resources/font.h" -#include "servers/text_server.h" class CanvasLayer; class MultiMesh; diff --git a/scene/main/canvas_layer.cpp b/scene/main/canvas_layer.cpp index 3f3e72357b..d4418a3cde 100644 --- a/scene/main/canvas_layer.cpp +++ b/scene/main/canvas_layer.cpp @@ -29,8 +29,10 @@ /*************************************************************************/ #include "canvas_layer.h" -#include "canvas_item.h" -#include "viewport.h" + +#include "scene/main/canvas_item.h" +#include "scene/main/viewport.h" +#include "scene/resources/world_2d.h" void CanvasLayer::set_layer(int p_xform) { layer = p_xform; diff --git a/scene/main/node.cpp b/scene/main/node.cpp index d5bc7d111a..05086541a5 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -30,6 +30,7 @@ #include "node.h" +#include "core/config/project_settings.h" #include "core/core_string_names.h" #include "core/io/resource_loader.h" #include "core/multiplayer/multiplayer_api.h" diff --git a/scene/main/node.h b/scene/main/node.h index 0ac10f4381..f2dcdf4b43 100644 --- a/scene/main/node.h +++ b/scene/main/node.h @@ -31,9 +31,6 @@ #ifndef NODE_H #define NODE_H -#include "core/config/project_settings.h" -#include "core/object/class_db.h" -#include "core/object/script_language.h" #include "core/string/node_path.h" #include "core/templates/map.h" #include "core/variant/typed_array.h" diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp index 69d781cbfc..f02032a6c9 100644 --- a/scene/main/scene_tree.cpp +++ b/scene/main/scene_tree.cpp @@ -44,10 +44,13 @@ #include "node.h" #include "scene/animation/tween.h" #include "scene/debugger/scene_debugger.h" +#include "scene/main/viewport.h" #include "scene/resources/font.h" #include "scene/resources/material.h" #include "scene/resources/mesh.h" #include "scene/resources/packed_scene.h" +#include "scene/resources/world_2d.h" +#include "scene/resources/world_3d.h" #include "scene/scene_string_names.h" #include "servers/display_server.h" #include "servers/navigation_server_3d.h" diff --git a/scene/main/scene_tree.h b/scene/main/scene_tree.h index a5cd52b4ca..5f7c1729e8 100644 --- a/scene/main/scene_tree.h +++ b/scene/main/scene_tree.h @@ -35,8 +35,6 @@ #include "core/os/thread_safe.h" #include "core/templates/self_list.h" #include "scene/resources/mesh.h" -#include "scene/resources/world_2d.h" -#include "scene/resources/world_3d.h" #undef Window @@ -48,6 +46,7 @@ class Mesh; class MultiplayerAPI; class SceneDebugger; class Tween; +class Viewport; class SceneTreeTimer : public RefCounted { GDCLASS(SceneTreeTimer, RefCounted); diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index 522997cdf5..a1ff95ea9a 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -30,6 +30,7 @@ #include "viewport.h" +#include "core/config/project_settings.h" #include "core/core_string_names.h" #include "core/debugger/engine_debugger.h" #include "core/object/message_queue.h" diff --git a/scene/main/window.cpp b/scene/main/window.cpp index f2ebe50fa3..b5e0e7b110 100644 --- a/scene/main/window.cpp +++ b/scene/main/window.cpp @@ -30,6 +30,7 @@ #include "window.h" +#include "core/config/project_settings.h" #include "core/debugger/engine_debugger.h" #include "core/string/translation.h" #include "scene/gui/control.h" diff --git a/scene/resources/environment.h b/scene/resources/environment.h index dd1e664ca6..b71fe8904a 100644 --- a/scene/resources/environment.h +++ b/scene/resources/environment.h @@ -34,7 +34,6 @@ #include "core/io/resource.h" #include "scene/resources/sky.h" #include "scene/resources/texture.h" -#include "servers/rendering_server.h" class Environment : public Resource { GDCLASS(Environment, Resource); diff --git a/scene/resources/material.cpp b/scene/resources/material.cpp index f3e5ece1f9..b74f44c52f 100644 --- a/scene/resources/material.cpp +++ b/scene/resources/material.cpp @@ -2215,7 +2215,9 @@ BaseMaterial3D::EmissionOperator BaseMaterial3D::get_emission_operator() const { RID BaseMaterial3D::get_shader_rid() const { MutexLock lock(material_mutex); - ((BaseMaterial3D *)this)->_update_shader(); + if (element.in_list()) { // _is_shader_dirty() would create anoder mutex lock + ((BaseMaterial3D *)this)->_update_shader(); + } ERR_FAIL_COND_V(!shader_map.has(current_key), RID()); return shader_map[current_key].shader; } diff --git a/scene/resources/skeleton_modification_2d_jiggle.cpp b/scene/resources/skeleton_modification_2d_jiggle.cpp index eee6067dae..0921417656 100644 --- a/scene/resources/skeleton_modification_2d_jiggle.cpp +++ b/scene/resources/skeleton_modification_2d_jiggle.cpp @@ -29,7 +29,9 @@ /*************************************************************************/ #include "skeleton_modification_2d_jiggle.h" + #include "scene/2d/skeleton_2d.h" +#include "scene/resources/world_2d.h" bool SkeletonModification2DJiggle::_set(const StringName &p_path, const Variant &p_value) { String path = p_path; diff --git a/scene/resources/theme.cpp b/scene/resources/theme.cpp index 901ff22252..373fbb94ea 100644 --- a/scene/resources/theme.cpp +++ b/scene/resources/theme.cpp @@ -29,6 +29,7 @@ /*************************************************************************/ #include "theme.h" + #include "core/string/print_string.h" // Universal Theme resources used when no other theme has the item. diff --git a/scene/resources/theme.h b/scene/resources/theme.h index 7a61ccf8af..9afe05007d 100644 --- a/scene/resources/theme.h +++ b/scene/resources/theme.h @@ -32,7 +32,6 @@ #define THEME_H #include "core/io/resource.h" -#include "core/io/resource_loader.h" #include "scene/resources/font.h" #include "scene/resources/style_box.h" #include "scene/resources/texture.h" diff --git a/scene/resources/world_2d.h b/scene/resources/world_2d.h index 91f9a026d3..4a277c3d84 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 "core/config/project_settings.h" #include "core/io/resource.h" +#include "scene/resources/world_2d.h" #include "servers/physics_server_2d.h" class VisibleOnScreenNotifier2D; diff --git a/scene/resources/world_3d.cpp b/scene/resources/world_3d.cpp index c012ab6177..0088236112 100644 --- a/scene/resources/world_3d.cpp +++ b/scene/resources/world_3d.cpp @@ -30,7 +30,7 @@ #include "world_3d.h" -#include "core/math/camera_matrix.h" +#include "core/config/project_settings.h" #include "core/math/octree.h" #include "scene/3d/camera_3d.h" #include "scene/3d/visible_on_screen_notifier_3d.h" |