From 695c212cf0a0af6bfbdb64bc7de861d439dcceef Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Thu, 18 Apr 2024 13:10:33 +0200 Subject: [PATCH] Add tooltips to Multi Blend points --- .../Surface/Archetypes/Animation.MultiBlend.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Source/Editor/Surface/Archetypes/Animation.MultiBlend.cs b/Source/Editor/Surface/Archetypes/Animation.MultiBlend.cs index 89eda77b4..1998ce8f4 100644 --- a/Source/Editor/Surface/Archetypes/Animation.MultiBlend.cs +++ b/Source/Editor/Surface/Archetypes/Animation.MultiBlend.cs @@ -275,7 +275,9 @@ namespace FlaxEditor.Surface.Archetypes GetData(out _rangeX, out _rangeY, _pointsAnims, _pointsLocations); for (int i = 0; i < Animation.MultiBlend.MaxAnimationsCount; i++) { - if (_pointsAnims[i] != Guid.Empty) + var animId = _pointsAnims[i]; + var location = _pointsLocations[i]; + if (animId != Guid.Empty) { if (_blendPoints[i] == null) { @@ -287,7 +289,13 @@ namespace FlaxEditor.Surface.Archetypes } // Update blend point - _blendPoints[i].Location = BlendSpacePosToBlendPointPos(_pointsLocations[i]); + _blendPoints[i].Location = BlendSpacePosToBlendPointPos(location); + var asset = Editor.Instance.ContentDatabase.FindAsset(animId); + var tooltip = asset?.ShortName ?? string.Empty; + tooltip += "\nX: " + location.X; + if (_is2D) + tooltip += "\nY: " + location.Y; + _blendPoints[i].TooltipText = tooltip; } else {