diff options
| author | Juan Linietsky | 2018-06-26 19:05:11 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2018-06-26 19:06:16 -0300 |
| commit | c633b770cb648613ca88fc9e007718acfc219317 (patch) | |
| tree | 2aa72d9bfc3276db0ea8a6b833d7fade724b3c16 /editor/plugins/root_motion_editor_plugin.h | |
| parent | f036353b93269e1162437f188f6792f3953ac155 (diff) | |
| download | godot-mirror.tar.gz godot-mirror.tar.zst godot-mirror.zip | |
Diffstat (limited to 'editor/plugins/root_motion_editor_plugin.h')
| -rw-r--r-- | editor/plugins/root_motion_editor_plugin.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/editor/plugins/root_motion_editor_plugin.h b/editor/plugins/root_motion_editor_plugin.h new file mode 100644 index 000000000..84af47872 --- /dev/null +++ b/editor/plugins/root_motion_editor_plugin.h @@ -0,0 +1,42 @@ +#ifndef ROOT_MOTION_EDITOR_PLUGIN_H +#define ROOT_MOTION_EDITOR_PLUGIN_H + +#include "editor/editor_inspector.h" +#include "editor/editor_spin_slider.h" +#include "editor/property_selector.h" +#include "scene/animation/animation_tree.h" + +class EditorPropertyRootMotion : public EditorProperty { + GDCLASS(EditorPropertyRootMotion, EditorProperty) + Button *assign; + Button *clear; + NodePath base_hint; + + ConfirmationDialog *filter_dialog; + Tree *filters; + + void _confirmed(); + void _node_assign(); + void _node_clear(); + +protected: + static void _bind_methods(); + void _notification(int p_what); + +public: + virtual void update_property(); + void setup(const NodePath &p_base_hint); + EditorPropertyRootMotion(); +}; + +class EditorInspectorRootMotionPlugin : public EditorInspectorPlugin { + GDCLASS(EditorInspectorRootMotionPlugin, EditorInspectorPlugin) + +public: + virtual bool can_handle(Object *p_object); + virtual void parse_begin(Object *p_object); + virtual bool parse_property(Object *p_object, Variant::Type p_type, const String &p_path, PropertyHint p_hint, const String &p_hint_text, int p_usage); + virtual void parse_end(); +}; + +#endif // ROOT_MOTION_EDITOR_PLUGIN_H |
