Add bone icon for Anim Graph connections with local skeleton nodes pose
This commit is contained in:
BIN
Content/Editor/IconsAtlas.flax
(Stored with Git LFS)
BIN
Content/Editor/IconsAtlas.flax
(Stored with Git LFS)
Binary file not shown.
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user