summaryrefslogtreecommitdiff
path: root/editor/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'editor/plugins')
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp4
-rw-r--r--editor/plugins/material_editor_plugin.cpp4
-rw-r--r--editor/plugins/material_editor_plugin.h4
-rw-r--r--editor/plugins/mesh_editor_plugin.h6
-rw-r--r--editor/plugins/node_3d_editor_plugin.cpp24
-rw-r--r--editor/plugins/node_3d_editor_plugin.h4
6 files changed, 23 insertions, 23 deletions
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index d8b9fb4d8f..2f7747d0ff 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -48,7 +48,7 @@
#include "scene/2d/touch_screen_button.h"
#include "scene/gui/grid_container.h"
#include "scene/gui/nine_patch_rect.h"
-#include "scene/gui/viewport_container.h"
+#include "scene/gui/subviewport_container.h"
#include "scene/main/canvas_layer.h"
#include "scene/main/window.h"
#include "scene/resources/packed_scene.h"
@@ -5434,7 +5434,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
viewport_scrollable->set_h_size_flags(Control::SIZE_EXPAND_FILL);
viewport_scrollable->connect("draw", callable_mp(this, &CanvasItemEditor::_update_scrollbars));
- ViewportContainer *scene_tree = memnew(ViewportContainer);
+ SubViewportContainer *scene_tree = memnew(SubViewportContainer);
viewport_scrollable->add_child(scene_tree);
scene_tree->set_stretch(true);
scene_tree->set_anchors_and_margins_preset(Control::PRESET_WIDE);
diff --git a/editor/plugins/material_editor_plugin.cpp b/editor/plugins/material_editor_plugin.cpp
index 5623805201..00e8a05e4e 100644
--- a/editor/plugins/material_editor_plugin.cpp
+++ b/editor/plugins/material_editor_plugin.cpp
@@ -31,7 +31,7 @@
#include "material_editor_plugin.h"
#include "editor/editor_scale.h"
-#include "scene/gui/viewport_container.h"
+#include "scene/gui/subviewport_container.h"
#include "scene/resources/particles_material.h"
#include "scene/resources/sky_material.h"
@@ -110,7 +110,7 @@ void MaterialEditor::_bind_methods() {
MaterialEditor::MaterialEditor() {
- vc = memnew(ViewportContainer);
+ vc = memnew(SubViewportContainer);
vc->set_stretch(true);
add_child(vc);
vc->set_anchors_and_margins_preset(PRESET_WIDE);
diff --git a/editor/plugins/material_editor_plugin.h b/editor/plugins/material_editor_plugin.h
index 0938e79ca2..50036e4f72 100644
--- a/editor/plugins/material_editor_plugin.h
+++ b/editor/plugins/material_editor_plugin.h
@@ -41,13 +41,13 @@
#include "scene/3d/mesh_instance_3d.h"
#include "scene/resources/material.h"
-class ViewportContainer;
+class SubViewportContainer;
class MaterialEditor : public Control {
GDCLASS(MaterialEditor, Control);
- ViewportContainer *vc;
+ SubViewportContainer *vc;
SubViewport *viewport;
MeshInstance3D *sphere_instance;
MeshInstance3D *box_instance;
diff --git a/editor/plugins/mesh_editor_plugin.h b/editor/plugins/mesh_editor_plugin.h
index 59810517d9..072e21f260 100644
--- a/editor/plugins/mesh_editor_plugin.h
+++ b/editor/plugins/mesh_editor_plugin.h
@@ -36,12 +36,12 @@
#include "scene/3d/camera_3d.h"
#include "scene/3d/light_3d.h"
#include "scene/3d/mesh_instance_3d.h"
-#include "scene/gui/viewport_container.h"
+#include "scene/gui/subviewport_container.h"
#include "scene/resources/material.h"
-class MeshEditor : public ViewportContainer {
+class MeshEditor : public SubViewportContainer {
- GDCLASS(MeshEditor, ViewportContainer);
+ GDCLASS(MeshEditor, SubViewportContainer);
float rot_x;
float rot_y;
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp
index afd8d2d075..2a27332051 100644
--- a/editor/plugins/node_3d_editor_plugin.cpp
+++ b/editor/plugins/node_3d_editor_plugin.cpp
@@ -48,7 +48,7 @@
#include "scene/3d/mesh_instance_3d.h"
#include "scene/3d/physics_body_3d.h"
#include "scene/3d/visual_instance_3d.h"
-#include "scene/gui/viewport_container.h"
+#include "scene/gui/subviewport_container.h"
#include "scene/resources/packed_scene.h"
#include "scene/resources/surface_tool.h"
#include "servers/display_server.h"
@@ -418,12 +418,12 @@ Vector3 Node3DEditorViewport::_get_camera_position() const {
Point2 Node3DEditorViewport::_point_to_screen(const Vector3 &p_point) {
- return camera->unproject_position(p_point) * viewport_container->get_stretch_shrink();
+ return camera->unproject_position(p_point) * subviewport_container->get_stretch_shrink();
}
Vector3 Node3DEditorViewport::_get_ray_pos(const Vector2 &p_pos) const {
- return camera->project_ray_origin(p_pos / viewport_container->get_stretch_shrink());
+ return camera->project_ray_origin(p_pos / subviewport_container->get_stretch_shrink());
}
Vector3 Node3DEditorViewport::_get_camera_normal() const {
@@ -433,7 +433,7 @@ Vector3 Node3DEditorViewport::_get_camera_normal() const {
Vector3 Node3DEditorViewport::_get_ray(const Vector2 &p_pos) const {
- return camera->project_ray_normal(p_pos / viewport_container->get_stretch_shrink());
+ return camera->project_ray_normal(p_pos / subviewport_container->get_stretch_shrink());
}
void Node3DEditorViewport::_clear_selected() {
@@ -494,7 +494,7 @@ ObjectID Node3DEditorViewport::_select_ray(const Point2 &p_pos, bool p_append, b
Vector3 ray = _get_ray(p_pos);
Vector3 pos = _get_ray_pos(p_pos);
- Vector2 shrinked_pos = p_pos / viewport_container->get_stretch_shrink();
+ Vector2 shrinked_pos = p_pos / subviewport_container->get_stretch_shrink();
Vector<ObjectID> instances = RenderingServer::get_singleton()->instances_cull_ray(pos, ray, get_tree()->get_root()->get_world()->get_scenario());
Set<Ref<EditorNode3DGizmo>> found_gizmos;
@@ -2472,8 +2472,8 @@ void Node3DEditorViewport::_notification(int p_what) {
bool shrink = view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(VIEW_HALF_RESOLUTION));
- if (shrink != (viewport_container->get_stretch_shrink() > 1)) {
- viewport_container->set_stretch_shrink(shrink ? 2 : 1);
+ if (shrink != (subviewport_container->get_stretch_shrink() > 1)) {
+ subviewport_container->set_stretch_shrink(shrink ? 2 : 1);
}
//update msaa if changed
@@ -3237,8 +3237,8 @@ void Node3DEditorViewport::update_transform_gizmo_view() {
const int viewport_base_height = 400 * MAX(1, EDSCALE);
gizmo_scale =
(gizmo_size / Math::abs(dd)) * MAX(1, EDSCALE) *
- MIN(viewport_base_height, viewport_container->get_size().height) / viewport_base_height /
- viewport_container->get_stretch_shrink();
+ MIN(viewport_base_height, subviewport_container->get_size().height) / viewport_base_height /
+ subviewport_container->get_stretch_shrink();
Vector3 scale = Vector3(1, 1, 1) * gizmo_scale;
xform.basis.scale(scale);
@@ -3398,7 +3398,7 @@ Dictionary Node3DEditorViewport::get_state() const {
d["gizmos"] = view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(VIEW_GIZMOS));
d["information"] = view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(VIEW_INFORMATION));
d["fps"] = view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(VIEW_FPS));
- d["half_res"] = viewport_container->get_stretch_shrink() > 1;
+ d["half_res"] = subviewport_container->get_stretch_shrink() > 1;
d["cinematic_preview"] = view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(VIEW_CINEMATIC_PREVIEW));
if (previewing)
d["previewing"] = EditorNode::get_singleton()->get_edited_scene()->get_path_to(previewing);
@@ -3829,8 +3829,8 @@ Node3DEditorViewport::Node3DEditorViewport(Node3DEditor *p_spatial_editor, Edito
zoom_indicator_delay = 0.0;
spatial_editor = p_spatial_editor;
- ViewportContainer *c = memnew(ViewportContainer);
- viewport_container = c;
+ SubViewportContainer *c = memnew(SubViewportContainer);
+ subviewport_container = c;
c->set_stretch(true);
add_child(c);
c->set_anchors_and_margins_preset(Control::PRESET_WIDE);
diff --git a/editor/plugins/node_3d_editor_plugin.h b/editor/plugins/node_3d_editor_plugin.h
index e485edae02..552afb99e0 100644
--- a/editor/plugins/node_3d_editor_plugin.h
+++ b/editor/plugins/node_3d_editor_plugin.h
@@ -43,7 +43,7 @@ class Camera3D;
class Node3DEditor;
class EditorNode3DGizmoPlugin;
class Node3DEditorViewport;
-class ViewportContainer;
+class SubViewportContainer;
class EditorNode3DGizmo : public Node3DGizmo {
@@ -256,7 +256,7 @@ private:
UndoRedo *undo_redo;
CheckBox *preview_camera;
- ViewportContainer *viewport_container;
+ SubViewportContainer *subviewport_container;
MenuButton *view_menu;
PopupMenu *display_submenu;