diff options
author | Josh Chandler <j5d1c7@gmail.com> | 2020-04-28 11:04:07 -0400 |
---|---|---|
committer | Josh Chandler <j5d1c7@gmail.com> | 2021-07-03 15:08:17 -0400 |
commit | 879f84d8f8e7d9467bb9049b445d576916c847c0 (patch) | |
tree | e824ecb7e4670b4e0ede7de99f0f21e2254acec1 /editor/plugins | |
parent | e849dc1791cd064b3b9736ac91f0ae9fae3bc8d9 (diff) |
add viewport.get_camera_2d()
* there is now a more clear distinction between camera_2d and camera_3d functions in the engine code
* simplified camera2d's exported interface - now everything happens directly with the 'current' variable and make_current and clear_current are no longer exposed- there were some situations where calling one instead of set_current would result in incomplete results
* rebased to current godot master
Diffstat (limited to 'editor/plugins')
-rw-r--r-- | editor/plugins/node_3d_editor_plugin.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/node_3d_editor_plugin.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp index 5a4d79cdc8..a8bbc7ccd4 100644 --- a/editor/plugins/node_3d_editor_plugin.cpp +++ b/editor/plugins/node_3d_editor_plugin.cpp @@ -2418,7 +2418,7 @@ void Node3DEditorViewport::_notification(int p_what) { Node *scene_root = editor->get_scene_tree_dock()->get_editor_data()->get_edited_scene_root(); if (previewing_cinema && scene_root != nullptr) { - Camera3D *cam = scene_root->get_viewport()->get_camera(); + Camera3D *cam = scene_root->get_viewport()->get_camera_3d(); if (cam != nullptr && cam != previewing) { //then switch the viewport's camera to the scene's viewport camera if (previewing != nullptr) { diff --git a/editor/plugins/node_3d_editor_plugin.h b/editor/plugins/node_3d_editor_plugin.h index ac0b2e1859..48858b6a6c 100644 --- a/editor/plugins/node_3d_editor_plugin.h +++ b/editor/plugins/node_3d_editor_plugin.h @@ -494,7 +494,7 @@ public: AcceptDialog *p_accept); SubViewport *get_viewport_node() { return viewport; } - Camera3D *get_camera() { return camera; } // return the default camera object. + Camera3D *get_camera_3d() { return camera; } // return the default camera object. Node3DEditorViewport(Node3DEditor *p_spatial_editor, EditorNode *p_editor, int p_index); ~Node3DEditorViewport(); |