summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorRindbee <idleman@yeah.net>2022-09-03 15:14:07 +0800
committerRindbee <idleman@yeah.net>2022-09-03 15:59:59 +0800
commit6c9726e7a7233d7312b307a4ce14a21ce4009d31 (patch)
treec6b034841cb9edccb8519a116b10afaee5a15229 /editor
parent654a31df062b58b3b534e790b2b4a4cc0762f6a4 (diff)
Fix Skeleton3DEditor crash
Diffstat (limited to 'editor')
-rw-r--r--editor/plugins/skeleton_3d_editor_plugin.cpp5
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() {