string GetErrorText(AnimationPlayableAsset animationAsset, AnimationTrack track, string defaultError) { if (animationAsset.clip == null) { return(k_NoClipAssignedError); } if (animationAsset.clip.legacy) { return(k_LegacyClipError); } if (animationAsset.clip.hasMotionCurves || animationAsset.clip.hasRootCurves) { if (track != null && track.trackOffset == TrackOffset.Auto) { var animator = track.GetBinding(TimelineEditor.inspectedDirector); if (animator != null && !animator.applyRootMotion && !animationAsset.clip.hasGenericRootTransform) { if (animationAsset.clip.hasMotionCurves) { return(k_MotionCurveError); } return(k_RootCurveError); } } } return(defaultError); }
public override string ModifyPropertyDisplayName(string path, string propertyName) { if (m_AnimationTrack == null || !AnimatedPropertyUtility.IsMaterialProperty(propertyName)) { return(propertyName); } var binding = m_AnimationTrack.GetBinding(TimelineEditor.inspectedDirector); if (binding == null) { return(propertyName); } var target = binding.transform; if (!string.IsNullOrEmpty(path)) { target = target.Find(path); } if (target == null) { return(propertyName); } return(AnimatedPropertyUtility.RemapMaterialName(target.gameObject, propertyName)); }