From 6340e4c83f46c1a525ad39e769cc2496d48e8ddc 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. (cherry picked from commit f16c483c9dcc4a9ed2c77d9d1ddbf358e8f3805e) --- doc/classes/AnimationNodeOneShot.xml | 13 ++----------- scene/animation/animation_blend_tree.cpp | 2 ++ 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/doc/classes/AnimationNodeOneShot.xml b/doc/classes/AnimationNodeOneShot.xml index 70cd76e78a0..f5fc6f02da8 100644 --- a/doc/classes/AnimationNodeOneShot.xml +++ b/doc/classes/AnimationNodeOneShot.xml @@ -11,17 +11,6 @@ https://godotengine.org/asset-library/asset/678 - - - - - - - - - - - @@ -37,6 +26,8 @@ + + diff --git a/scene/animation/animation_blend_tree.cpp b/scene/animation/animation_blend_tree.cpp index c1783a6b9e7..a9e3a441503 100644 --- a/scene/animation/animation_blend_tree.cpp +++ b/scene/animation/animation_blend_tree.cpp @@ -321,6 +321,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::REAL, "fadein_time", PROPERTY_HINT_RANGE, "0,60,0.01,or_greater"), "set_fadein_time", "get_fadein_time"); ADD_PROPERTY(PropertyInfo(Variant::REAL, "fadeout_time", PROPERTY_HINT_RANGE, "0,60,0.01,or_greater"), "set_fadeout_time", "get_fadeout_time");