From 2873f1c4f9c1e29d178f376ec5c5b121feba39d6 Mon Sep 17 00:00:00 2001 From: Chandler Cox Date: Fri, 1 Mar 2024 08:11:55 -0600 Subject: [PATCH] Add min and max values to limit the min and max that can be set for multiblend nodes. --- .../Surface/Archetypes/Animation.MultiBlend.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Source/Editor/Surface/Archetypes/Animation.MultiBlend.cs b/Source/Editor/Surface/Archetypes/Animation.MultiBlend.cs index 1a5e04e75..39eca356e 100644 --- a/Source/Editor/Surface/Archetypes/Animation.MultiBlend.cs +++ b/Source/Editor/Surface/Archetypes/Animation.MultiBlend.cs @@ -595,6 +595,11 @@ namespace FlaxEditor.Surface.Archetypes { var data0 = (Float4)_node.Values[0]; rangeX = new Float2(data0.X, data0.Y); + if (_node._animationX != null) + { + _node._animationX.MinValue = rangeX.X; + _node._animationX.MaxValue = rangeX.Y; + } rangeY = Float2.Zero; for (int i = 0; i < MaxAnimationsCount; i++) { @@ -725,7 +730,17 @@ namespace FlaxEditor.Surface.Archetypes { var data0 = (Float4)_node.Values[0]; rangeX = new Float2(data0.X, data0.Y); + if (_node._animationX != null) + { + _node._animationX.MinValue = rangeX.X; + _node._animationX.MaxValue = rangeX.Y; + } rangeY = new Float2(data0.Z, data0.W); + if (_node._animationY != null) + { + _node._animationY.MinValue = rangeY.X; + _node._animationY.MaxValue = rangeY.Y; + } for (int i = 0; i < MaxAnimationsCount; i++) { var dataA = (Float4)_node.Values[4 + i * 2];