summaryrefslogtreecommitdiff
path: root/tools/editor/animation_editor.h
diff options
context:
space:
mode:
authorAnton Yabchinskiy <arn@bestmx.ru>2015-07-29 23:01:36 +0300
committerAnton Yabchinskiy <arn@bestmx.ru>2015-07-29 23:01:36 +0300
commitdc8df8a91a995796f0f330bf6bb6b209f6dfce08 (patch)
tree46cfe09124703b07860754d6b44e0289422e0573 /tools/editor/animation_editor.h
parent16746f157f83d666079ba3266acec13d35b84c3f (diff)
parent922356b903061cda7591090bf19e8346c3a78cf5 (diff)
Merge branch 'master' of github.com:okamstudio/godot
Diffstat (limited to 'tools/editor/animation_editor.h')
-rw-r--r--tools/editor/animation_editor.h31
1 files changed, 26 insertions, 5 deletions
diff --git a/tools/editor/animation_editor.h b/tools/editor/animation_editor.h
index 1f17922552..35053fb6a3 100644
--- a/tools/editor/animation_editor.h
+++ b/tools/editor/animation_editor.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -37,6 +37,7 @@
#include "scene/gui/scroll_bar.h"
#include "scene/gui/tool_button.h"
#include "scene/gui/file_dialog.h"
+#include "scene/gui/tab_container.h"
#include "scene/resources/animation.h"
#include "scene/animation/animation_cache.h"
@@ -46,6 +47,7 @@
class AnimationKeyEdit;
+class AnimationCurveEdit;
class AnimationKeyEditor : public VBoxContainer {
@@ -86,7 +88,13 @@ class AnimationKeyEditor : public VBoxContainer {
TRACK_MENU_SET_ALL_TRANS_OUTIN,
TRACK_MENU_NEXT_STEP,
TRACK_MENU_PREV_STEP,
- TRACK_MENU_OPTIMIZE
+ TRACK_MENU_OPTIMIZE,
+ CURVE_SET_LINEAR,
+ CURVE_SET_IN,
+ CURVE_SET_OUT,
+ CURVE_SET_INOUT,
+ CURVE_SET_OUTIN,
+ CURVE_SET_CONSTANT
};
struct MouseOver {
@@ -169,6 +177,14 @@ class AnimationKeyEditor : public VBoxContainer {
ToolButton *move_down_button;
ToolButton *remove_button;
+ ToolButton *curve_linear;
+ ToolButton *curve_in;
+ ToolButton *curve_out;
+ ToolButton *curve_inout;
+ ToolButton *curve_outin;
+ ToolButton *curve_constant;
+
+
ConfirmationDialog *optimize_dialog;
SpinBox *optimize_linear_error;
SpinBox *optimize_angular_error;
@@ -183,11 +199,11 @@ class AnimationKeyEditor : public VBoxContainer {
Control *track_editor;
Control *track_pos;
+ TabContainer *key_editor_tab;
ConfirmationDialog *scale_dialog;
SpinBox *scale;
- PopupDialog *key_edit_dialog;
PropertyEditor *key_editor;
Ref<Animation> animation;
@@ -203,6 +219,7 @@ class AnimationKeyEditor : public VBoxContainer {
AnimationKeyEdit *key_edit;
+ AnimationCurveEdit *curve_edit;
bool inserting;
@@ -220,6 +237,7 @@ class AnimationKeyEditor : public VBoxContainer {
int track_idx;
Variant value;
String query;
+ bool advance;
};/* insert_data;*/
bool insert_query;
@@ -254,7 +272,7 @@ class AnimationKeyEditor : public VBoxContainer {
void _scale();
-
+ void _clear_selection();
//void _browse_path();
@@ -270,12 +288,15 @@ class AnimationKeyEditor : public VBoxContainer {
void _clear_selection_for_anim(const Ref<Animation>& p_anim);
void _select_at_anim(const Ref<Animation>& p_anim,int p_track,float p_pos);
+ void _curve_transition_changed(float p_what);
PropertyInfo _find_hint_for_track(int p_idx);
void _create_value_item(int p_type);
void _pane_drag(const Point2& p_delta);
+ bool _edit_if_single_selection();
+ void _toggle_edit_curves();
void _animation_len_update();
void _root_removed();
@@ -296,7 +317,7 @@ public:
void set_anim_pos(float p_pos);
void insert_node_value_key(Node* p_node, const String& p_property,const Variant& p_value,bool p_only_if_exists=false);
- void insert_value_key(const String& p_property,const Variant& p_value);
+ void insert_value_key(const String& p_property, const Variant& p_value, bool p_advance);
void insert_transform_key(Spatial *p_node,const String& p_sub,const Transform& p_xform);
AnimationKeyEditor(UndoRedo *p_undo_redo, EditorHistory *p_history, EditorSelection *p_selection);