@@ -60,6 +60,7 @@ CSkelMeshViewer::CSkelMeshViewer(CSkeletalMesh* Mesh0, CApplication* Window)
60
60
, Mesh(Mesh0)
61
61
, Anim(NULL )
62
62
, AnimIndex(-1 )
63
+ , MorphIndex(-1 )
63
64
, IsFollowingMesh(false )
64
65
, ShowSkel(0 )
65
66
, ShowLabels(false )
@@ -335,12 +336,17 @@ void CSkelMeshViewer::Draw2D()
335
336
if (bIsUE4Mesh)
336
337
{
337
338
if (Skeleton)
338
- DrawTextLeft (S_GREEN" Skeleton: " S_WHITE " %s" , Skeleton->Name );
339
+ DrawTextLeft (S_GREEN " Skeleton: " S_WHITE " %s" , Skeleton->Name );
339
340
else
340
341
DrawTextBottomLeft (S_RED" WARNING: no skeleton, animation will not work!" );
341
342
}
342
343
#endif // UNREAL4
343
344
345
+ if (Mesh->Morphs .Num ())
346
+ {
347
+ DrawTextLeft (S_GREEN " Moprhs : " S_WHITE " %d" , Mesh->Morphs .Num ());
348
+ }
349
+
344
350
// mesh
345
351
DrawTextLeft (S_GREEN " LOD : " S_WHITE " %d/%d\n "
346
352
S_GREEN " Verts : " S_WHITE " %d\n "
@@ -410,6 +416,19 @@ void CSkelMeshViewer::Draw2D()
410
416
DrawTextBottomLeft (S_GREEN " Anim:" S_WHITE " 0/%d (none)" , MeshInst->GetAnimCount ());
411
417
}
412
418
}
419
+
420
+ if (Mesh->Morphs .Num ())
421
+ {
422
+ int MorphCount = Mesh->Morphs .Num ();
423
+ if (MorphIndex >= 0 )
424
+ {
425
+ DrawTextBottomLeft (S_GREEN " Morph: " S_WHITE " %d/%d (%s)" , MorphIndex+1 , MorphCount, *Mesh->Morphs [MorphIndex]->Name );
426
+ }
427
+ else
428
+ {
429
+ DrawTextBottomLeft (S_GREEN " Morph: " S_WHITE " 0/%d (none)" , MorphCount);
430
+ }
431
+ }
413
432
}
414
433
415
434
@@ -622,6 +641,24 @@ void CSkelMeshViewer::ProcessKey(int key)
622
641
}
623
642
break ;
624
643
644
+ case ' [' |KEY_CTRL:
645
+ case ' ]' |KEY_CTRL:
646
+ if (Mesh->Morphs .Num ())
647
+ {
648
+ int NumMorphs = Mesh->Morphs .Num ();
649
+ if (key == (' [' |KEY_CTRL))
650
+ {
651
+ if (--MorphIndex < -1 )
652
+ MorphIndex = NumMorphs - 1 ;
653
+ }
654
+ else
655
+ {
656
+ if (++MorphIndex >= NumMorphs)
657
+ MorphIndex = -1 ;
658
+ }
659
+ }
660
+ break ;
661
+
625
662
case ' ,' : // '<'
626
663
case ' .' : // '>'
627
664
if (NumFrames)
0 commit comments