Add bone icon for Anim Graph connections with local skeleton nodes pose

This commit is contained in:
Wojtek Figat
2021-08-01 23:18:20 +02:00
parent 0e76bf22ed
commit 37cfe692f6
3 changed files with 14 additions and 3 deletions

BIN
Content/Editor/IconsAtlas.flax (Stored with Git LFS)

Binary file not shown.

View File

@@ -52,6 +52,8 @@ namespace FlaxEditor
public SpriteHandle Info32;
public SpriteHandle Warning32;
public SpriteHandle Error32;
public SpriteHandle Bone32;
public SpriteHandle BoneFull32;
// Visject
public SpriteHandle VisjectBoxOpen32;

View File

@@ -282,7 +282,7 @@ namespace FlaxEditor.Surface
/// <inheritdoc />
public AnimGraphSurface(IVisjectSurfaceOwner owner, Action onSave, FlaxEditor.Undo undo)
: base(owner, onSave, undo)
: base(owner, onSave, undo, CreateStyle())
{
// Find custom nodes for Anim Graph
var customNodes = Editor.Instance.CodeEditing.AnimGraphNodes.GetArchetypes();
@@ -299,6 +299,15 @@ namespace FlaxEditor.Surface
}
}
private static SurfaceStyle CreateStyle()
{
var editor = Editor.Instance;
var style = SurfaceStyle.CreateStyleHandler(editor);
style.Icons.ArrowOpen = editor.Icons.Bone32;
style.Icons.ArrowClose = editor.Icons.BoneFull32;
return style;
}
private void OnScriptsReloadBegin()
{
Owner.OnSurfaceClose();