diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-09-03 12:33:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-03 12:33:01 +0200 |
commit | b8977ca333fd0334669de0253f86abf6d401256a (patch) | |
tree | c6b034841cb9edccb8519a116b10afaee5a15229 /editor | |
parent | 654a31df062b58b3b534e790b2b4a4cc0762f6a4 (diff) | |
parent | 6c9726e7a7233d7312b307a4ce14a21ce4009d31 (diff) |
Merge pull request #65279 from Rindbee/fix-Skeleton3DEditor-crash
Fix Skeleton3DEditor crash
Diffstat (limited to 'editor')
-rw-r--r-- | editor/plugins/skeleton_3d_editor_plugin.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/editor/plugins/skeleton_3d_editor_plugin.cpp b/editor/plugins/skeleton_3d_editor_plugin.cpp index c57412978d..15ae4ffcff 100644 --- a/editor/plugins/skeleton_3d_editor_plugin.cpp +++ b/editor/plugins/skeleton_3d_editor_plugin.cpp @@ -711,7 +711,6 @@ void Skeleton3DEditor::create_editors() { ne->add_control_to_menu_panel(skeleton_options); skeleton_options->set_text(TTR("Skeleton3D")); - skeleton_options->set_icon(EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("Skeleton3D"), SNAME("EditorIcons"))); // Skeleton options. PopupMenu *p = skeleton_options->get_popup(); @@ -824,7 +823,6 @@ void Skeleton3DEditor::create_editors() { void Skeleton3DEditor::_notification(int p_what) { switch (p_what) { case NOTIFICATION_ENTER_TREE: { - create_editors(); update_joint_tree(); update_editors(); @@ -844,6 +842,7 @@ void Skeleton3DEditor::_notification(int p_what) { add_theme_constant_override("separation", 0); } break; case NOTIFICATION_THEME_CHANGED: { + skeleton_options->set_icon(get_theme_icon(SNAME("Skeleton3D"), SNAME("EditorIcons"))); edit_mode_button->set_icon(get_theme_icon(SNAME("ToolBoneSelect"), SNAME("EditorIcons"))); key_loc_button->set_icon(get_theme_icon(SNAME("KeyPosition"), SNAME("EditorIcons"))); key_rot_button->set_icon(get_theme_icon(SNAME("KeyRotation"), SNAME("EditorIcons"))); @@ -928,6 +927,8 @@ void fragment() { handles_mesh_instance->set_cast_shadows_setting(GeometryInstance3D::SHADOW_CASTING_SETTING_OFF); handles_mesh.instantiate(); handles_mesh_instance->set_mesh(handles_mesh); + + create_editors(); } void Skeleton3DEditor::update_bone_original() { |