@@ -850,26 +850,37 @@ public static void ExportAnimatorWithAnimationClip(AssetItem animator, List<Asse
850
850
ThreadPool . QueueUserWorkItem ( state =>
851
851
{
852
852
Progress . Reset ( ) ;
853
- Logger . Info ( $ "Exporting { animator . Text } ") ;
854
- Logger . Debug ( $ "Selected AnimationClip(s): \n \" { string . Join ( " \" \n \" " , animationList . Select ( x => x . Text ) ) } \" " ) ;
853
+ Logger . Info ( $ "Exporting { animator . Text } with { animationList . Count } AnimationClip(s)... ") ;
854
+
855
855
try
856
856
{
857
- ExportAnimator ( animator , exportPath , animationList ) ;
857
+ int current = 0 ;
858
+ foreach ( var clip in animationList )
859
+ {
860
+ var clipFolder = Path . Combine ( exportPath , clip . Text ) ;
861
+ Directory . CreateDirectory ( clipFolder ) ;
862
+
863
+ Logger . Info ( $ "Exporting clip: { clip . Text } to { clipFolder } ") ;
864
+
865
+ ExportAnimator ( animator , clipFolder , new List < AssetItem > { clip } ) ;
866
+ Progress . Report ( ++ current , animationList . Count ) ;
867
+ }
868
+
858
869
if ( Properties . Settings . Default . openAfterExport )
859
870
{
860
871
OpenFolderInExplorer ( exportPath ) ;
861
872
}
862
- Progress . Report ( 1 , 1 ) ;
863
- Logger . Info ( $ "Finished exporting { animator . Text } ") ;
873
+
874
+ Logger . Info ( $ "Finished exporting all clips for { animator . Text } ") ;
864
875
}
865
876
catch ( Exception ex )
866
877
{
867
- Logger . Error ( $ "Export Animator:{ animator . Text } error", ex ) ;
868
- Logger . Info ( "Error in export" ) ;
878
+ Logger . Error ( $ "Export Animator error for { animator . Text } ", ex ) ;
869
879
}
870
880
} ) ;
871
881
}
872
882
883
+
873
884
public static void ExportObjectsWithAnimationClip ( string exportPath , TreeNodeCollection nodes , List < AssetItem > animationList = null )
874
885
{
875
886
ThreadPool . QueueUserWorkItem ( state =>
0 commit comments