Merge pull request #119052 from DexterFstone/Expose-ScenePaint2DEditor
Expose `ScenePaint2DEditor`
This commit is contained in:
@@ -49,6 +49,7 @@
|
||||
#include "editor/inspector/editor_resource_preview.h"
|
||||
#include "editor/inspector/property_selector.h"
|
||||
#include "editor/run/editor_run_bar.h"
|
||||
#include "editor/scene/2d/scene_paint_2d_editor_plugin.h"
|
||||
#include "editor/scene/3d/node_3d_editor_plugin.h"
|
||||
#include "editor/scene/3d/node_3d_editor_viewport.h"
|
||||
#include "editor/scene/editor_scene_tabs.h"
|
||||
@@ -112,6 +113,10 @@ EditorUndoRedoManager *EditorInterface::get_editor_undo_redo() const {
|
||||
return EditorUndoRedoManager::get_singleton();
|
||||
}
|
||||
|
||||
ScenePaint2DEditor *EditorInterface::get_scene_paint_2d() const {
|
||||
return ScenePaint2DEditor::get_singleton();
|
||||
}
|
||||
|
||||
AABB EditorInterface::_calculate_aabb_for_scene(Node *p_node, AABB &p_scene_aabb) {
|
||||
MeshInstance3D *mesh_node = Object::cast_to<MeshInstance3D>(p_node);
|
||||
if (mesh_node && mesh_node->get_mesh().is_valid()) {
|
||||
@@ -855,6 +860,7 @@ void EditorInterface::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("get_editor_settings"), &EditorInterface::get_editor_settings);
|
||||
ClassDB::bind_method(D_METHOD("get_editor_toaster"), &EditorInterface::get_editor_toaster);
|
||||
ClassDB::bind_method(D_METHOD("get_editor_undo_redo"), &EditorInterface::get_editor_undo_redo);
|
||||
ClassDB::bind_method(D_METHOD("get_scene_paint_2d"), &EditorInterface::get_scene_paint_2d);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("make_mesh_previews", "meshes", "preview_size"), &EditorInterface::_make_mesh_previews);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user