internal static bool ProcessPlayableAssetRecording(UndoPropertyModification mod, WindowState state, TimelineClip clip)
        {
            if (mod.currentValue == null)
            {
                return(false);
            }

            if (!clip.IsParameterAnimatable(mod.currentValue.propertyPath))
            {
                return(false);
            }

            // don't use time global to local since it will possibly loop.
            double localTime = clip.ToLocalTimeUnbound(state.editSequence.time);

            if (localTime < 0)
            {
                return(false);
            }

            // grab the value from the current modification
            float fValue = 0;

            if (!float.TryParse(mod.currentValue.value, out fValue))
            {
                // case 916913 -- 'Add Key' menu item will passes 'True' or 'False' (instead of 1, 0)
                // so we need a special case to parse the boolean string
                bool bValue = false;
                if (!bool.TryParse(mod.currentValue.value, out bValue))
                {
                    Debug.Assert(false, "Invalid type in PlayableAsset recording");
                    return(false);
                }

                fValue = bValue ? 1 : 0;
            }

            bool added = (clip.AddAnimatedParameterValueAt(mod.currentValue.propertyPath, fValue, (float)localTime));

            if (added && AnimationMode.InAnimationMode())
            {
                EditorCurveBinding binding = clip.GetCurveBinding(mod.previousValue.propertyPath);
                AnimationMode.AddPropertyModification(binding, mod.previousValue, true);
                clip.parentTrack.SetShowInlineCurves(true);
                if (state.GetWindow() != null && state.GetWindow().treeView != null)
                {
                    state.GetWindow().treeView.CalculateRowRects();
                }
            }
            return(added);
        }