From db1105d4b3b9f9bee87f69a0780704b4d18fa9f4 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 f65c89ff2c3..b8a1250d536 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 c697c9128fa..a73deeb0b07 100644 --- a/scene/animation/animation_blend_tree.cpp +++ b/scene/animation/animation_blend_tree.cpp @@ -319,6 +319,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");