From f16c483c9dcc4a9ed2c77d9d1ddbf358e8f3805e Mon Sep 17 00:00:00 2001 From: Wysocki Patryk Date: Thu, 16 Apr 2020 23:21:11 +0200 Subject: [PATCH] Expose AnimationNodeOneShot::mix_mode as a property Fixes #23458. --- doc/classes/AnimationNodeOneShot.xml | 15 ++------------- scene/animation/animation_blend_tree.cpp | 2 ++ 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/doc/classes/AnimationNodeOneShot.xml b/doc/classes/AnimationNodeOneShot.xml index 116b54e39ee..71ed82cf46f 100644 --- a/doc/classes/AnimationNodeOneShot.xml +++ b/doc/classes/AnimationNodeOneShot.xml @@ -10,19 +10,6 @@ $DOCS_URL/tutorials/animation/animation_tree.html https://godotengine.org/asset-library/asset/678 - - - - - - - - - - - - - If [code]true[/code], the sub-animation will restart automatically after finishing. @@ -37,6 +24,8 @@ + + diff --git a/scene/animation/animation_blend_tree.cpp b/scene/animation/animation_blend_tree.cpp index 2740103a4aa..9d37b2d6ac7 100644 --- a/scene/animation/animation_blend_tree.cpp +++ b/scene/animation/animation_blend_tree.cpp @@ -371,6 +371,8 @@ void AnimationNodeOneShot::_bind_methods() { ClassDB::bind_method(D_METHOD("set_use_sync", "enable"), &AnimationNodeOneShot::set_use_sync); ClassDB::bind_method(D_METHOD("is_using_sync"), &AnimationNodeOneShot::is_using_sync); + ADD_PROPERTY(PropertyInfo(Variant::INT, "mix_mode", PROPERTY_HINT_ENUM, "Blend,Add"), "set_mix_mode", "get_mix_mode"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "fadein_time", PROPERTY_HINT_RANGE, "0,60,0.01,or_greater"), "set_fadein_time", "get_fadein_time"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "fadeout_time", PROPERTY_HINT_RANGE, "0,60,0.01,or_greater"), "set_fadeout_time", "get_fadeout_time");