summaryrefslogtreecommitdiffstats
path: root/editor/plugins/camera_3d_editor_plugin.h
diff options
context:
space:
mode:
authorGeorge L. Albany <Megacake1234@gmail.com>2024-11-27 21:15:49 +0000
committerGitHub <noreply@github.com>2024-11-27 21:15:49 +0000
commit85d87116e184e7923b8d6804cab2681b61c62d83 (patch)
tree55ec5bfa061a5c27272b831e697b78ed1b756a70 /editor/plugins/camera_3d_editor_plugin.h
parentb06d20bf39d15ec736d08d4e4fcb32e0c3c1ce1e (diff)
parent721f53fde47c2727d99e3ecccdb789a67df36de0 (diff)
downloadredot-engine-85d87116e184e7923b8d6804cab2681b61c62d83.tar.gz
Merge pull request #886 from Spartan322/merge/f128f38HEADmaster
Merge commit godotengine/godot@f128f38
Diffstat (limited to 'editor/plugins/camera_3d_editor_plugin.h')
-rw-r--r--editor/plugins/camera_3d_editor_plugin.h27
1 files changed, 24 insertions, 3 deletions
diff --git a/editor/plugins/camera_3d_editor_plugin.h b/editor/plugins/camera_3d_editor_plugin.h
index b3ec6927da..d361bf5a88 100644
--- a/editor/plugins/camera_3d_editor_plugin.h
+++ b/editor/plugins/camera_3d_editor_plugin.h
@@ -34,7 +34,10 @@
#define CAMERA_3D_EDITOR_PLUGIN_H
#include "editor/plugins/editor_plugin.h"
-#include "scene/3d/camera_3d.h"
+#include "editor/plugins/texture_editor_plugin.h"
+
+class Camera3D;
+class SubViewport;
class Camera3DEditor : public Control {
GDCLASS(Camera3DEditor, Control);
@@ -53,11 +56,29 @@ public:
Camera3DEditor();
};
+class Camera3DPreview : public TexturePreview {
+ GDCLASS(Camera3DPreview, TexturePreview);
+
+ Camera3D *camera = nullptr;
+ SubViewport *sub_viewport = nullptr;
+
+ void _update_sub_viewport_size();
+
+public:
+ Camera3DPreview(Camera3D *p_camera);
+};
+
+class EditorInspectorPluginCamera3DPreview : public EditorInspectorPluginTexture {
+ GDCLASS(EditorInspectorPluginCamera3DPreview, EditorInspectorPluginTexture);
+
+public:
+ virtual bool can_handle(Object *p_object) override;
+ virtual void parse_begin(Object *p_object) override;
+};
+
class Camera3DEditorPlugin : public EditorPlugin {
GDCLASS(Camera3DEditorPlugin, EditorPlugin);
- //CameraEditor *camera_editor;
-
public:
virtual String get_name() const override { return "Camera3D"; }
bool has_main_screen() const override { return false; }