void AnimationPlayerEditor::set_state(const Dictionary& p_state) { if (p_state.has("visible") && p_state["visible"]) { Node *n = EditorNode::get_singleton()->get_edited_scene()->get_node(p_state["player"]); if (n && n->cast_to<AnimationPlayer>()) { player=n->cast_to<AnimationPlayer>(); _update_player(); show(); set_process(true); ensure_visibility(); EditorNode::get_singleton()->animation_panel_make_visible(true); if (p_state.has("animation")) { String anim = p_state["animation"]; _select_anim_by_name(anim); if (p_state.has("editing") && p_state["editing"]) { edit_anim->set_pressed(true); _animation_edit(); } } } } }
void AnimationPlayerEditor::ensure_visibility() { if (player && pin->is_pressed()) return; // another player is pinned, don't reset _animation_edit(); }
void AnimationPlayerEditor::ensure_visibility() { _animation_edit(); }