@@ -203,6 +203,24 @@ public static void SetObjectReferenceCurve(AnimationClip clip, EditorCurveBindin
203203 Internal_InvokeOnCurveWasModified ( clip , binding , keyframes != null ? CurveModifiedType . CurveModified : CurveModifiedType . CurveDeleted ) ;
204204 }
205205
206+ public static void SetObjectReferenceCurves ( AnimationClip clip , EditorCurveBinding [ ] bindings , ObjectReferenceKeyframe [ ] [ ] keyframes )
207+ {
208+ if ( bindings == null )
209+ throw new ArgumentNullException ( nameof ( bindings ) , $ "{ nameof ( bindings ) } must be non-null") ;
210+ if ( keyframes == null )
211+ throw new ArgumentNullException ( nameof ( keyframes ) , $ "{ nameof ( keyframes ) } must be non-null") ;
212+ if ( bindings . Length != keyframes . Length )
213+ throw new InvalidOperationException ( $ "{ nameof ( bindings ) } and { nameof ( keyframes ) } must be of equal length") ;
214+
215+ int length = bindings . Length ;
216+ for ( int i = 0 ; i < length ; i ++ )
217+ {
218+ SetObjectReferenceCurveNoSync ( clip , bindings [ i ] , keyframes [ i ] ) ;
219+ }
220+ SyncEditorCurves ( clip ) ;
221+ Internal_InvokeOnCurveWasModified ( clip , new EditorCurveBinding ( ) , CurveModifiedType . ClipModified ) ;
222+ }
223+
206224 internal static void SetObjectReferenceCurveNoSync ( AnimationClip clip , EditorCurveBinding binding , ObjectReferenceKeyframe [ ] keyframes )
207225 {
208226 Internal_SetObjectReferenceCurve ( clip , binding , keyframes , false ) ;
@@ -220,6 +238,25 @@ public static void SetEditorCurve(AnimationClip clip, EditorCurveBinding binding
220238 Internal_InvokeOnCurveWasModified ( clip , binding , curve != null ? CurveModifiedType . CurveModified : CurveModifiedType . CurveDeleted ) ;
221239 }
222240
241+ public static void SetEditorCurves ( AnimationClip clip , EditorCurveBinding [ ] bindings , AnimationCurve [ ] curves )
242+ {
243+ if ( bindings == null )
244+ throw new ArgumentNullException ( nameof ( bindings ) , $ "{ nameof ( bindings ) } must be non-null") ;
245+ if ( curves == null )
246+ throw new ArgumentNullException ( nameof ( curves ) , $ "{ nameof ( curves ) } must be non-null") ;
247+ if ( bindings . Length != curves . Length )
248+ throw new InvalidOperationException ( $ "{ nameof ( bindings ) } and { nameof ( curves ) } must be of equal length") ;
249+
250+ int length = bindings . Length ;
251+ for ( int i = 0 ; i < length ; i ++ )
252+ {
253+ SetEditorCurveNoSync ( clip , bindings [ i ] , curves [ i ] ) ;
254+ }
255+ SyncEditorCurves ( clip ) ;
256+
257+ Internal_InvokeOnCurveWasModified ( clip , new EditorCurveBinding ( ) , AnimationUtility . CurveModifiedType . ClipModified ) ;
258+ }
259+
223260 internal static void SetEditorCurveNoSync ( AnimationClip clip , EditorCurveBinding binding , AnimationCurve curve )
224261 {
225262 Internal_SetEditorCurve ( clip , binding , curve , false ) ;
0 commit comments