You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
-Massive editor dialog cleanup
-Added a bottom menu list
This commit is contained in:
@@ -37,6 +37,8 @@
|
||||
#include "os/input.h"
|
||||
#include "tools/editor/editor_settings.h"
|
||||
#include "scene/gui/grid_container.h"
|
||||
#include "tools/editor/animation_editor.h"
|
||||
#include "tools/editor/plugins/animation_player_editor_plugin.h"
|
||||
|
||||
class SnapDialog : public ConfirmationDialog {
|
||||
|
||||
@@ -407,7 +409,7 @@ void CanvasItemEditor::_node_removed(Node *p_node) {
|
||||
|
||||
void CanvasItemEditor::_keying_changed() {
|
||||
|
||||
if (editor->get_animation_editor()->has_keying())
|
||||
if (AnimationPlayerEditor::singleton->get_key_editor()->has_keying())
|
||||
animation_hb->show();
|
||||
else
|
||||
animation_hb->hide();
|
||||
@@ -2695,11 +2697,11 @@ void CanvasItemEditor::_popup_callback(int p_op) {
|
||||
Node2D *n2d = canvas_item->cast_to<Node2D>();
|
||||
|
||||
if (key_pos)
|
||||
editor->get_animation_editor()->insert_node_value_key(n2d,"transform/pos",n2d->get_pos(),existing);
|
||||
AnimationPlayerEditor::singleton->get_key_editor()->insert_node_value_key(n2d,"transform/pos",n2d->get_pos(),existing);
|
||||
if (key_rot)
|
||||
editor->get_animation_editor()->insert_node_value_key(n2d,"transform/rot",Math::rad2deg(n2d->get_rot()),existing);
|
||||
AnimationPlayerEditor::singleton->get_key_editor()->insert_node_value_key(n2d,"transform/rot",Math::rad2deg(n2d->get_rot()),existing);
|
||||
if (key_scale)
|
||||
editor->get_animation_editor()->insert_node_value_key(n2d,"transform/scale",n2d->get_scale(),existing);
|
||||
AnimationPlayerEditor::singleton->get_key_editor()->insert_node_value_key(n2d,"transform/scale",n2d->get_scale(),existing);
|
||||
|
||||
|
||||
if (n2d->has_meta("_edit_bone_") && n2d->get_parent_item()) {
|
||||
@@ -2727,11 +2729,11 @@ void CanvasItemEditor::_popup_callback(int p_op) {
|
||||
for(List<Node2D*>::Element *F=ik_chain.front();F;F=F->next()) {
|
||||
|
||||
if (key_pos)
|
||||
editor->get_animation_editor()->insert_node_value_key(F->get(),"transform/pos",F->get()->get_pos(),existing);
|
||||
AnimationPlayerEditor::singleton->get_key_editor()->insert_node_value_key(F->get(),"transform/pos",F->get()->get_pos(),existing);
|
||||
if (key_rot)
|
||||
editor->get_animation_editor()->insert_node_value_key(F->get(),"transform/rot",Math::rad2deg(F->get()->get_rot()),existing);
|
||||
AnimationPlayerEditor::singleton->get_key_editor()->insert_node_value_key(F->get(),"transform/rot",Math::rad2deg(F->get()->get_rot()),existing);
|
||||
if (key_scale)
|
||||
editor->get_animation_editor()->insert_node_value_key(F->get(),"transform/scale",F->get()->get_scale(),existing);
|
||||
AnimationPlayerEditor::singleton->get_key_editor()->insert_node_value_key(F->get(),"transform/scale",F->get()->get_scale(),existing);
|
||||
|
||||
|
||||
}
|
||||
@@ -2743,9 +2745,9 @@ void CanvasItemEditor::_popup_callback(int p_op) {
|
||||
Control *ctrl = canvas_item->cast_to<Control>();
|
||||
|
||||
if (key_pos)
|
||||
editor->get_animation_editor()->insert_node_value_key(ctrl,"rect/pos",ctrl->get_pos(),existing);
|
||||
AnimationPlayerEditor::singleton->get_key_editor()->insert_node_value_key(ctrl,"rect/pos",ctrl->get_pos(),existing);
|
||||
if (key_scale)
|
||||
editor->get_animation_editor()->insert_node_value_key(ctrl,"rect/size",ctrl->get_size(),existing);
|
||||
AnimationPlayerEditor::singleton->get_key_editor()->insert_node_value_key(ctrl,"rect/size",ctrl->get_size(),existing);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2867,7 +2869,7 @@ void CanvasItemEditor::_popup_callback(int p_op) {
|
||||
if (key_pos)
|
||||
ctrl->set_pos(Point2());
|
||||
//if (key_scale)
|
||||
// editor->get_animation_editor()->insert_node_value_key(ctrl,"rect/size",ctrl->get_size());
|
||||
// AnimationPlayerEditor::singleton->get_key_editor()->insert_node_value_key(ctrl,"rect/size",ctrl->get_size());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3416,7 +3418,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
|
||||
box_selecting=false;
|
||||
//zoom=0.5;
|
||||
singleton=this;
|
||||
editor->get_animation_editor()->connect("keying_changed",this,"_keying_changed");
|
||||
AnimationPlayerEditor::singleton->get_key_editor()->connect("keying_changed",this,"_keying_changed");
|
||||
set_process_unhandled_key_input(true);
|
||||
can_move_pivot=false;
|
||||
drag=DRAG_NONE;
|
||||
|
||||
Reference in New Issue
Block a user