Fix animation toolbar
This commit is contained in:
parent
1d99e71d94
commit
9f5d537993
4 changed files with 10 additions and 11 deletions
|
@ -3022,9 +3022,14 @@ Node *AnimationKeyEditor::get_root() const {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void AnimationKeyEditor::set_keying(bool p_enabled) {
|
void AnimationKeyEditor::update_keying() {
|
||||||
|
|
||||||
keying=p_enabled;
|
bool keying_enabled=is_visible() && animation.is_valid();
|
||||||
|
|
||||||
|
if (keying_enabled==keying)
|
||||||
|
return;
|
||||||
|
|
||||||
|
keying=keying_enabled;
|
||||||
_update_menu();
|
_update_menu();
|
||||||
emit_signal("keying_changed");
|
emit_signal("keying_changed");
|
||||||
|
|
||||||
|
@ -3032,7 +3037,7 @@ void AnimationKeyEditor::set_keying(bool p_enabled) {
|
||||||
|
|
||||||
bool AnimationKeyEditor::has_keying() const {
|
bool AnimationKeyEditor::has_keying() const {
|
||||||
|
|
||||||
return is_visible() && animation.is_valid();
|
return keying;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AnimationKeyEditor::_query_insert(const InsertData& p_id) {
|
void AnimationKeyEditor::_query_insert(const InsertData& p_id) {
|
||||||
|
|
|
@ -324,7 +324,7 @@ public:
|
||||||
Ref<Animation> get_current_animation() const;
|
Ref<Animation> get_current_animation() const;
|
||||||
void set_root(Node *p_root);
|
void set_root(Node *p_root);
|
||||||
Node *get_root() const;
|
Node *get_root() const;
|
||||||
void set_keying(bool p_enabled);
|
void update_keying();
|
||||||
bool has_keying() const;
|
bool has_keying() const;
|
||||||
|
|
||||||
void cleanup();
|
void cleanup();
|
||||||
|
|
|
@ -3661,6 +3661,7 @@ void EditorNode::update_keying() {
|
||||||
|
|
||||||
property_editor->set_keying(valid);
|
property_editor->set_keying(valid);
|
||||||
|
|
||||||
|
AnimationPlayerEditor::singleton->get_key_editor()->update_keying();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -128,16 +128,9 @@ void AnimationPlayerEditor::_notification(int p_what) {
|
||||||
anim_editor_load->set_hover_texture( get_icon("AnimGetHl","EditorIcons"));
|
anim_editor_load->set_hover_texture( get_icon("AnimGetHl","EditorIcons"));
|
||||||
anim_editor_store->set_hover_texture( get_icon("AnimSetHl","EditorIcons"));
|
anim_editor_store->set_hover_texture( get_icon("AnimSetHl","EditorIcons"));
|
||||||
*/
|
*/
|
||||||
}
|
|
||||||
|
|
||||||
if (p_what==NOTIFICATION_READY) {
|
|
||||||
|
|
||||||
get_tree()->connect("node_removed",this,"_node_removed");
|
get_tree()->connect("node_removed",this,"_node_removed");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p_what==NOTIFICATION_DRAW) {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void AnimationPlayerEditor::_autoplay_pressed() {
|
void AnimationPlayerEditor::_autoplay_pressed() {
|
||||||
|
|
Loading…
Reference in a new issue