diff options
Diffstat (limited to 'editor/plugins/skeleton_3d_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/skeleton_3d_editor_plugin.cpp | 32 |
1 files changed, 10 insertions, 22 deletions
diff --git a/editor/plugins/skeleton_3d_editor_plugin.cpp b/editor/plugins/skeleton_3d_editor_plugin.cpp index 9a709e8dda..53fdde9e14 100644 --- a/editor/plugins/skeleton_3d_editor_plugin.cpp +++ b/editor/plugins/skeleton_3d_editor_plugin.cpp @@ -34,12 +34,12 @@ #include "editor/editor_node.h" #include "editor/editor_properties.h" #include "editor/editor_properties_vector.h" -#include "editor/editor_scale.h" #include "editor/editor_settings.h" #include "editor/editor_string_names.h" #include "editor/editor_undo_redo_manager.h" #include "editor/plugins/animation_player_editor_plugin.h" -#include "node_3d_editor_plugin.h" +#include "editor/plugins/node_3d_editor_plugin.h" +#include "editor/themes/editor_scale.h" #include "scene/3d/collision_shape_3d.h" #include "scene/3d/joint_3d.h" #include "scene/3d/mesh_instance_3d.h" @@ -837,10 +837,10 @@ void Skeleton3DEditor::_notification(int p_what) { joint_tree->connect("item_selected", callable_mp(this, &Skeleton3DEditor::_joint_tree_selection_changed)); joint_tree->connect("item_mouse_selected", callable_mp(this, &Skeleton3DEditor::_joint_tree_rmb_select)); #ifdef TOOLS_ENABLED - skeleton->connect("pose_updated", callable_mp(this, &Skeleton3DEditor::_draw_gizmo)); - skeleton->connect("pose_updated", callable_mp(this, &Skeleton3DEditor::_update_properties)); - skeleton->connect("bone_enabled_changed", callable_mp(this, &Skeleton3DEditor::_bone_enabled_changed)); - skeleton->connect("show_rest_only_changed", callable_mp(this, &Skeleton3DEditor::_update_gizmo_visible)); + skeleton->connect(SceneStringNames::get_singleton()->pose_updated, callable_mp(this, &Skeleton3DEditor::_draw_gizmo)); + skeleton->connect(SceneStringNames::get_singleton()->pose_updated, callable_mp(this, &Skeleton3DEditor::_update_properties)); + skeleton->connect(SceneStringNames::get_singleton()->bone_enabled_changed, callable_mp(this, &Skeleton3DEditor::_bone_enabled_changed)); + skeleton->connect(SceneStringNames::get_singleton()->show_rest_only_changed, callable_mp(this, &Skeleton3DEditor::_update_gizmo_visible)); #endif get_tree()->connect("node_removed", callable_mp(this, &Skeleton3DEditor::_node_removed), Object::CONNECT_ONE_SHOT); @@ -865,10 +865,10 @@ void Skeleton3DEditor::_notification(int p_what) { if (skeleton) { select_bone(-1); // Requires that the joint_tree has not been deleted. #ifdef TOOLS_ENABLED - skeleton->disconnect("show_rest_only_changed", callable_mp(this, &Skeleton3DEditor::_update_gizmo_visible)); - skeleton->disconnect("bone_enabled_changed", callable_mp(this, &Skeleton3DEditor::_bone_enabled_changed)); - skeleton->disconnect("pose_updated", callable_mp(this, &Skeleton3DEditor::_draw_gizmo)); - skeleton->disconnect("pose_updated", callable_mp(this, &Skeleton3DEditor::_update_properties)); + skeleton->disconnect(SceneStringNames::get_singleton()->show_rest_only_changed, callable_mp(this, &Skeleton3DEditor::_update_gizmo_visible)); + skeleton->disconnect(SceneStringNames::get_singleton()->bone_enabled_changed, callable_mp(this, &Skeleton3DEditor::_bone_enabled_changed)); + skeleton->disconnect(SceneStringNames::get_singleton()->pose_updated, callable_mp(this, &Skeleton3DEditor::_draw_gizmo)); + skeleton->disconnect(SceneStringNames::get_singleton()->pose_updated, callable_mp(this, &Skeleton3DEditor::_update_properties)); skeleton->set_transform_gizmo_visible(true); #endif if (handles_mesh_instance->get_parent()) { @@ -889,18 +889,6 @@ void Skeleton3DEditor::_node_removed(Node *p_node) { _update_properties(); } -void Skeleton3DEditor::_bind_methods() { - ClassDB::bind_method(D_METHOD("_node_removed"), &Skeleton3DEditor::_node_removed); - ClassDB::bind_method(D_METHOD("_joint_tree_selection_changed"), &Skeleton3DEditor::_joint_tree_selection_changed); - ClassDB::bind_method(D_METHOD("_joint_tree_rmb_select"), &Skeleton3DEditor::_joint_tree_rmb_select); - ClassDB::bind_method(D_METHOD("_update_properties"), &Skeleton3DEditor::_update_properties); - ClassDB::bind_method(D_METHOD("_on_click_skeleton_option"), &Skeleton3DEditor::_on_click_skeleton_option); - - ClassDB::bind_method(D_METHOD("move_skeleton_bone"), &Skeleton3DEditor::move_skeleton_bone); - - ClassDB::bind_method(D_METHOD("_draw_gizmo"), &Skeleton3DEditor::_draw_gizmo); -} - void Skeleton3DEditor::edit_mode_toggled(const bool pressed) { edit_mode = pressed; _update_gizmo_visible(); |