Hi, I'm currently making my own tool for editing character's attack moves. The Editor Looks like this :

(Yeah, I extended and copy-pasted some parts of 2d toolkit editor codes to make this editor)
I wanted to preview selected frame(In the image, it's frame 0) of tk2dSpriteAnimationClip instance, but as you see the thumbnail box is empty.
This is code to draw thumbnail box :
public void Draw()
{
GUILayout.BeginHorizontal();
EditorGUILayout.PrefixLabel(" ");
int tileSize = 128;
Rect r = GUILayoutUtility.GetRect(tileSize, tileSize, GUILayout.ExpandWidth(false));
tk2dGrid.Draw(r);
tk2dSpriteThumbnailCache.DrawSpriteTextureInRect(r, spriteDef, Color.white);
GUILayout.EndHorizontal();
}
...which is copy&pasted from tk2dSpriteEditor.DrawSpriteEditorGUI().
I inserted some logs to find out why, and realized when tk2dSpriteThumbnailCache.DrawSpriteTextureInRect is called, spriteDef.materialInst is null which causes this problem(maybe).
So this is how i get reference of tk2dSpriteDefinition :
1)Before Open the editor, drag&drop SpriteAnimation prefab i created. In the image, you can see "PlayerAnimation" on the right.
2)When you click "New Attack Move" button and set clip from EditorWindow.popup() (in the image, the clip is 'neutral'.), AttackMove class is instantiated and this instance holds reference of tk2dSpriteAnimationClip
3)Create frame list from tk2dSpriteAnimationClip.frames.
4)When a user clicks frame, check the index of frame and get tk2dSpriteAnimationFrame reference
5)tk2dSpriteDefinition spriteDef = currentFrame.spriteCollection.spriteDefinitions [currentFrame.spriteId];
6)use spriteDef to draw thumbnail image
I wrote as much detail as possible. Any missing steps here? Thanks for your help in advance!