Merge pull request #64386 from timothyqiu/anim-disable
Fix crash when loading Animation Library after reloading a scene
This commit is contained in:
commit
1782557339
@ -843,15 +843,16 @@ void AnimationPlayerEditor::_update_player() {
|
|||||||
|
|
||||||
animation->clear();
|
animation->clear();
|
||||||
|
|
||||||
|
tool_anim->set_disabled(player == nullptr);
|
||||||
|
pin->set_disabled(player == nullptr);
|
||||||
|
|
||||||
if (!player) {
|
if (!player) {
|
||||||
AnimationPlayerEditor::get_singleton()->get_track_editor()->update_keying();
|
AnimationPlayerEditor::get_singleton()->get_track_editor()->update_keying();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
List<StringName> libraries;
|
List<StringName> libraries;
|
||||||
if (player) {
|
player->get_animation_library_list(&libraries);
|
||||||
player->get_animation_library_list(&libraries);
|
|
||||||
}
|
|
||||||
|
|
||||||
int active_idx = -1;
|
int active_idx = -1;
|
||||||
bool no_anims_found = true;
|
bool no_anims_found = true;
|
||||||
@ -926,10 +927,8 @@ void AnimationPlayerEditor::_update_player() {
|
|||||||
frame->set_editable(!no_anims_found);
|
frame->set_editable(!no_anims_found);
|
||||||
animation->set_disabled(no_anims_found);
|
animation->set_disabled(no_anims_found);
|
||||||
autoplay->set_disabled(no_anims_found);
|
autoplay->set_disabled(no_anims_found);
|
||||||
tool_anim->set_disabled(player == nullptr);
|
|
||||||
onion_toggle->set_disabled(no_anims_found);
|
onion_toggle->set_disabled(no_anims_found);
|
||||||
onion_skinning->set_disabled(no_anims_found);
|
onion_skinning->set_disabled(no_anims_found);
|
||||||
pin->set_disabled(player == nullptr);
|
|
||||||
|
|
||||||
_update_animation_list_icons();
|
_update_animation_list_icons();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user