diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-02-14 16:40:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-14 16:40:40 +0100 |
commit | f810f76890f23843f3895262fe2f88a7d5d3c3f3 (patch) | |
tree | cc47e48e0e378357dc4d82822a0d8c415990df1e /editor/plugins/skeleton_3d_editor_plugin.cpp | |
parent | cd6301ae255f7d4fc6f0c885ea1531b4574512e9 (diff) | |
parent | 05b56f316ddc94c2bb55b62477ec3914fe81a220 (diff) |
Merge pull request #57306 from trollodel/remove_editornode_param
Diffstat (limited to 'editor/plugins/skeleton_3d_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/skeleton_3d_editor_plugin.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/editor/plugins/skeleton_3d_editor_plugin.cpp b/editor/plugins/skeleton_3d_editor_plugin.cpp index 774868a33a..761a0cdfbd 100644 --- a/editor/plugins/skeleton_3d_editor_plugin.cpp +++ b/editor/plugins/skeleton_3d_editor_plugin.cpp @@ -787,8 +787,7 @@ void Skeleton3DEditor::edit_mode_toggled(const bool pressed) { _update_gizmo_visible(); } -Skeleton3DEditor::Skeleton3DEditor(EditorInspectorPluginSkeleton *e_plugin, EditorNode *p_editor, Skeleton3D *p_skeleton) : - editor(p_editor), +Skeleton3DEditor::Skeleton3DEditor(EditorInspectorPluginSkeleton *e_plugin, Skeleton3D *p_skeleton) : editor_plugin(e_plugin), skeleton(p_skeleton) { singleton = this; @@ -822,7 +821,7 @@ void fragment() { } )"); handle_material->set_shader(handle_shader); - Ref<Texture2D> handle = editor->get_gui_base()->get_theme_icon(SNAME("EditorBoneHandle"), SNAME("EditorIcons")); + Ref<Texture2D> handle = EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("EditorBoneHandle"), SNAME("EditorIcons")); handle_material->set_shader_param("point_size", handle->get_width()); handle_material->set_shader_param("texture_albedo", handle); @@ -1013,15 +1012,12 @@ void EditorInspectorPluginSkeleton::parse_begin(Object *p_object) { Skeleton3D *skeleton = Object::cast_to<Skeleton3D>(p_object); ERR_FAIL_COND(!skeleton); - skel_editor = memnew(Skeleton3DEditor(this, editor, skeleton)); + skel_editor = memnew(Skeleton3DEditor(this, skeleton)); add_custom_control(skel_editor); } -Skeleton3DEditorPlugin::Skeleton3DEditorPlugin(EditorNode *p_node) { - editor = p_node; - +Skeleton3DEditorPlugin::Skeleton3DEditorPlugin() { skeleton_plugin = memnew(EditorInspectorPluginSkeleton); - skeleton_plugin->editor = editor; EditorInspector::add_inspector_plugin(skeleton_plugin); |