C# Class UnityEditor.AnimationUtility

Editor utility functions for modifying animation clips.

Show file Open project: CarlosHBC/UnityDecompiled Class Usage Examples

Public Properties

Property Type Description
onCurveWasModified OnCurveWasModified

Public Methods

Method Description
GetAnimatedObject ( GameObject root, EditorCurveBinding binding ) : Object

Returns the animated object that the binding is pointing to.

GetEditorCurve ( AnimationClip clip, EditorCurveBinding binding ) : AnimationCurve

Return the float curve that the binding is pointing to.

GetEditorCurveValueType ( GameObject root, EditorCurveBinding binding ) : Type
GetFloatValue ( GameObject root, EditorCurveBinding binding, float &data ) : bool
GetObjectReferenceCurve ( AnimationClip clip, EditorCurveBinding binding ) : UnityEditor.ObjectReferenceKeyframe[]

Return the object reference curve that the binding is pointing to.

GetObjectReferenceValue ( GameObject root, EditorCurveBinding binding, Object &targetObject ) : bool
SetAnimationEvents ( AnimationClip clip, AnimationEvent events ) : void

Replaces all animation events in the animation clip.

SetEditorCurve ( AnimationClip clip, EditorCurveBinding binding, AnimationCurve curve ) : void

Adds, modifies or removes an editor float curve in a given clip.

SetKeyBroken ( AnimationCurve curve, int index, bool broken ) : void

Change the specified keyframe broken tangent flag.

SetKeyLeftTangentMode ( AnimationCurve curve, int index, TangentMode tangentMode ) : void
SetKeyRightTangentMode ( AnimationCurve curve, int index, TangentMode tangentMode ) : void
SetObjectReferenceCurve ( AnimationClip clip, EditorCurveBinding binding, ObjectReferenceKeyframe keyframes ) : void

Adds, modifies or removes an object reference curve in a given clip.

Private Methods

Method Description
AmbiguousBinding ( string path, int classID, Transform root ) : bool
CalculateTransformPath ( Transform targetTransform, Transform root ) : string
ConstrainToPolynomialCurve ( AnimationCurve curve ) : void
CurveSupportsProcedural ( AnimationCurve curve ) : bool
GetAllCurves ( AnimationClip clip ) : UnityEditor.AnimationClipCurveData[]
GetAllCurves ( AnimationClip clip, [ includeCurveData ) : UnityEditor.AnimationClipCurveData[]
GetAnimatableBindings ( GameObject targetObject, GameObject root ) : UnityEditor.EditorCurveBinding[]
GetAnimationClipSettings ( AnimationClip clip ) : AnimationClipSettings
GetAnimationClipStats ( AnimationClip clip ) : AnimationClipStats
GetAnimationClips ( Animation component ) : UnityEngine.AnimationClip[]
GetAnimationClips ( GameObject gameObject ) : UnityEngine.AnimationClip[]
GetAnimationEvents ( AnimationClip clip ) : UnityEngine.AnimationEvent[]
GetCurveBindings ( AnimationClip clip ) : UnityEditor.EditorCurveBinding[]
GetEditorCurve ( AnimationClip clip, string relativePath, Type type, string propertyName ) : AnimationCurve
GetFloatValue ( GameObject root, string relativePath, Type type, string propertyName, float &data ) : bool
GetGenerateMotionCurves ( AnimationClip clip ) : bool
GetKeyBroken ( Keyframe key ) : bool
GetKeyLeftTangentMode ( Keyframe key ) : TangentMode
GetKeyRightTangentMode ( Keyframe key ) : TangentMode
GetObjectReferenceCurveBindings ( AnimationClip clip ) : UnityEditor.EditorCurveBinding[]
GetScriptableObjectAnimatableBindings ( ScriptableObject scriptableObject ) : UnityEditor.EditorCurveBinding[]
GetScriptableObjectEditorCurveValueType ( ScriptableObject scriptableObject, EditorCurveBinding binding ) : Type
HasGenericRootTransform ( AnimationClip clip ) : bool
HasMotionCurves ( AnimationClip clip ) : bool
HasMotionFloatCurves ( AnimationClip clip ) : bool
HasRootCurves ( AnimationClip clip ) : bool
INTERNAL_CALL_GetAnimatedObject ( GameObject root, EditorCurveBinding &binding ) : Object
INTERNAL_CALL_GetEditorCurve ( AnimationClip clip, EditorCurveBinding &binding ) : AnimationCurve
INTERNAL_CALL_GetEditorCurveValueType ( GameObject root, EditorCurveBinding &binding ) : Type
INTERNAL_CALL_GetFloatValue ( GameObject root, EditorCurveBinding &binding, float &data ) : bool
INTERNAL_CALL_GetObjectReferenceCurve ( AnimationClip clip, EditorCurveBinding &binding ) : ObjectReferenceKeyframe[]
INTERNAL_CALL_GetObjectReferenceValue ( GameObject root, EditorCurveBinding &binding, Object &targetObject ) : bool
INTERNAL_CALL_GetScriptableObjectEditorCurveValueType ( ScriptableObject scriptableObject, EditorCurveBinding &binding ) : Type
INTERNAL_CALL_Internal_SetEditorCurve ( AnimationClip clip, EditorCurveBinding &binding, AnimationCurve curve ) : void
INTERNAL_CALL_Internal_SetObjectReferenceCurve ( AnimationClip clip, EditorCurveBinding &binding, ObjectReferenceKeyframe keyframes ) : void
InAnimationMode ( ) : bool
Internal_CalculateAutoTangent ( AnimationCurve curve, int index ) : void
Internal_CalculateLinearTangent ( AnimationCurve curve, int index, int toIndex ) : float
Internal_CallAnimationClipAwake ( AnimationClip clip ) : void
Internal_SetAnimationEvents ( AnimationClip clip, AnimationEvent events ) : void
Internal_SetEditorCurve ( AnimationClip clip, EditorCurveBinding binding, AnimationCurve curve ) : void
Internal_SetObjectReferenceCurve ( AnimationClip clip, EditorCurveBinding binding, ObjectReferenceKeyframe keyframes ) : void
Internal_UpdateTangents ( AnimationCurve curve, int index ) : void
IsValidPolynomialCurve ( AnimationCurve curve ) : bool
PropertyModificationToEditorCurveBinding ( PropertyModification modification, GameObject gameObject, EditorCurveBinding &binding ) : Type
SetAdditiveReferencePose ( AnimationClip clip, AnimationClip referenceClip, float time ) : void
SetAnimationClipSettings ( AnimationClip clip, AnimationClipSettings srcClipInfo ) : void
SetAnimationClipSettingsNoDirty ( AnimationClip clip, AnimationClipSettings srcClipInfo ) : void
SetAnimationClips ( Animation animation, AnimationClip clips ) : void
SetAnimationType ( AnimationClip clip, ModelImporterAnimationType type ) : void
SetEditorCurve ( AnimationClip clip, string relativePath, Type type, string propertyName, AnimationCurve curve ) : void
SetGenerateMotionCurves ( AnimationClip clip, bool value ) : void
SetKeyBroken ( Keyframe &key, bool broken ) : void
SetKeyLeftTangentMode ( Keyframe &key, TangentMode tangentMode ) : void
SetKeyRightTangentMode ( Keyframe &key, TangentMode tangentMode ) : void
StartAnimationMode ( Object objects ) : void
StopAnimationMode ( ) : void
UpdateTangentsFromMode ( AnimationCurve curve ) : void
UpdateTangentsFromModeSurrounding ( AnimationCurve curve, int index ) : void

Method Details

GetAnimatedObject() public static method

Returns the animated object that the binding is pointing to.

public static GetAnimatedObject ( GameObject root, EditorCurveBinding binding ) : Object
root UnityEngine.GameObject
binding EditorCurveBinding
return Object

GetEditorCurve() public static method

Return the float curve that the binding is pointing to.

public static GetEditorCurve ( AnimationClip clip, EditorCurveBinding binding ) : AnimationCurve
clip UnityEngine.AnimationClip
binding EditorCurveBinding
return UnityEngine.AnimationCurve

GetEditorCurveValueType() public static method

public static GetEditorCurveValueType ( GameObject root, EditorCurveBinding binding ) : Type
root UnityEngine.GameObject
binding EditorCurveBinding
return System.Type

GetFloatValue() public static method

public static GetFloatValue ( GameObject root, EditorCurveBinding binding, float &data ) : bool
root UnityEngine.GameObject
binding EditorCurveBinding
data float
return bool

GetObjectReferenceCurve() public static method

Return the object reference curve that the binding is pointing to.

public static GetObjectReferenceCurve ( AnimationClip clip, EditorCurveBinding binding ) : UnityEditor.ObjectReferenceKeyframe[]
clip UnityEngine.AnimationClip
binding EditorCurveBinding
return UnityEditor.ObjectReferenceKeyframe[]

GetObjectReferenceValue() public static method

public static GetObjectReferenceValue ( GameObject root, EditorCurveBinding binding, Object &targetObject ) : bool
root UnityEngine.GameObject
binding EditorCurveBinding
targetObject Object
return bool

SetAnimationEvents() public static method

Replaces all animation events in the animation clip.

public static SetAnimationEvents ( AnimationClip clip, AnimationEvent events ) : void
clip AnimationClip
events AnimationEvent
return void

SetEditorCurve() public static method

Adds, modifies or removes an editor float curve in a given clip.

public static SetEditorCurve ( AnimationClip clip, EditorCurveBinding binding, AnimationCurve curve ) : void
clip AnimationClip The animation clip to which the curve will be added.
binding EditorCurveBinding The bindings which defines the path and the property of the curve.
curve AnimationCurve The curve to add. Setting this to null will remove the curve.
return void

SetKeyBroken() public static method

Change the specified keyframe broken tangent flag.

public static SetKeyBroken ( AnimationCurve curve, int index, bool broken ) : void
curve AnimationCurve The curve to modify.
index int Keyframe index.
broken bool Broken flag.
return void

SetKeyLeftTangentMode() public static method

public static SetKeyLeftTangentMode ( AnimationCurve curve, int index, TangentMode tangentMode ) : void
curve AnimationCurve
index int
tangentMode TangentMode
return void

SetKeyRightTangentMode() public static method

public static SetKeyRightTangentMode ( AnimationCurve curve, int index, TangentMode tangentMode ) : void
curve AnimationCurve
index int
tangentMode TangentMode
return void

SetObjectReferenceCurve() public static method

Adds, modifies or removes an object reference curve in a given clip.

public static SetObjectReferenceCurve ( AnimationClip clip, EditorCurveBinding binding, ObjectReferenceKeyframe keyframes ) : void
clip AnimationClip
binding EditorCurveBinding
keyframes ObjectReferenceKeyframe Setting this to null will remove the curve.
return void

Property Details

onCurveWasModified public static property

Triggered when an animation curve inside an animation clip has been modified.

public static OnCurveWasModified onCurveWasModified
return OnCurveWasModified