@@ -3078,19 +3078,19 @@ static void OnClipContextClick(MenuCommand command)
3078
3078
{
3079
3079
if ( obj . GetType ( ) . Name . Contains ( "EditorClip" ) )
3080
3080
{
3081
- var selClip = obj . GetType ( ) . GetProperty ( "clip" ) . GetValue ( obj , null ) ;
3081
+ var selClip = obj . GetType ( ) . GetProperty ( "clip" ) . GetValue ( obj , null ) ;
3082
3082
UnityEngine . Timeline . TimelineClip timeLineClip = selClip as UnityEngine . Timeline . TimelineClip ;
3083
3083
3084
- var selClipItem = obj . GetType ( ) . GetProperty ( "item" ) . GetValue ( obj , null ) ;
3085
- var selClipItemParentTrack = selClipItem . GetType ( ) . GetProperty ( "parentTrack" ) . GetValue ( selClipItem , null ) ;
3086
- AnimationTrack editorClipAnimationTrack = selClipItemParentTrack as AnimationTrack ;
3084
+ var selClipItem = obj . GetType ( ) . GetProperty ( "item" ) . GetValue ( obj , null ) ;
3085
+ var selClipItemParentTrack = selClipItem . GetType ( ) . GetProperty ( "parentTrack" ) . GetValue ( selClipItem , null ) ;
3086
+ AnimationTrack editorClipAnimationTrack = selClipItemParentTrack as AnimationTrack ;
3087
3087
3088
3088
GameObject animationTrackGObject = UnityEditor . Timeline . TimelineEditor . playableDirector . GetGenericBinding ( editorClipAnimationTrack ) as GameObject ;
3089
3089
3090
- string filePath = folderPath + "/" + animationTrackGObject . name + "@" + timeLineClip . animationClip . name + ".fbx" ;
3091
- UnityEngine . Object [ ] myArray = new UnityEngine . Object [ ] { animationTrackGObject , timeLineClip . animationClip } ;
3090
+ string filePath = folderPath + "/" + animationTrackGObject . name + "@" + timeLineClip . animationClip . name + ".fbx" ;
3091
+ UnityEngine . Object [ ] myArray = new UnityEngine . Object [ ] { animationTrackGObject , timeLineClip . animationClip } ;
3092
3092
3093
- ExportObjects ( filePath , myArray , AnimationExportType . timelineAnimationClip ) ;
3093
+ ExportObjects ( filePath , myArray , AnimationExportType . timelineAnimationClip ) ;
3094
3094
}
3095
3095
}
3096
3096
}
@@ -3115,7 +3115,6 @@ static void OnGameObjectWithTimelineContextClick(MenuCommand command)
3115
3115
{
3116
3116
return ;
3117
3117
}
3118
- Debug . Log ( folderPath ) ;
3119
3118
3120
3119
Object [ ] selection = null ;
3121
3120
@@ -3136,8 +3135,6 @@ static void OnGameObjectWithTimelineContextClick(MenuCommand command)
3136
3135
3137
3136
foreach ( GameObject obj in selection )
3138
3137
{
3139
- Debug . Log ( obj . GetType ( ) . BaseType . ToString ( ) + ":" + obj . name ) ;
3140
-
3141
3138
PlayableDirector pd = obj . GetComponent < PlayableDirector > ( ) ;
3142
3139
if ( pd != null )
3143
3140
{
@@ -3147,12 +3144,10 @@ static void OnGameObjectWithTimelineContextClick(MenuCommand command)
3147
3144
3148
3145
GameObject atObject = pd . GetGenericBinding ( output . sourceObject ) as GameObject ;
3149
3146
// One file by animation clip
3150
- foreach ( TimelineClip timeLineClip in at . GetClips ( ) )
3151
- {
3152
- string filePath = folderPath + "/" + atObject . name + "@" + timeLineClip . animationClip . name + ".fbx" ;
3153
- UnityEngine . Object [ ] myArray = new UnityEngine . Object [ ] { atObject , timeLineClip . animationClip } ;
3154
- Debug . Log ( "filepath: " + filePath ) ;
3155
- ExportObjects ( filePath , myArray , AnimationExportType . timelineAnimationClip ) ;
3147
+ foreach ( TimelineClip timeLineClip in at . GetClips ( ) ) {
3148
+ string filePath = folderPath + "/" + atObject . name + "@" + timeLineClip . animationClip . name + ".fbx" ;
3149
+ UnityEngine . Object [ ] myArray = new UnityEngine . Object [ ] { atObject , timeLineClip . animationClip } ;
3150
+ ExportObjects ( filePath , myArray , AnimationExportType . timelineAnimationClip ) ;
3156
3151
3157
3152
}
3158
3153
}
0 commit comments