Esempio n. 1
0
        public static UndoPropertyModification[] Process(IAnimationRecordingState state, UndoPropertyModification[] modifications)
        {
            GameObject activeRootGameObject = state.activeRootGameObject;

            UndoPropertyModification[] result;
            if (activeRootGameObject == null)
            {
                result = modifications;
            }
            else if (!AnimationRecording.HasAnyRecordableModifications(activeRootGameObject, modifications))
            {
                result = modifications;
            }
            else
            {
                Dictionary <object, AnimationRecording.RotationModification> dictionary  = new Dictionary <object, AnimationRecording.RotationModification>();
                Dictionary <object, AnimationRecording.Vector3Modification>  dictionary2 = new Dictionary <object, AnimationRecording.Vector3Modification>();
                Dictionary <object, AnimationRecording.Vector3Modification>  dictionary3 = new Dictionary <object, AnimationRecording.Vector3Modification>();
                AnimationRecording.CollectRotationModifications(state, ref modifications, ref dictionary);
                UndoPropertyModification[] second = AnimationRecording.FilterRotationModifications(state, ref dictionary);
                UndoPropertyModification[] array  = AnimationRecording.FilterModifications(state, ref modifications);
                AnimationRecording.CollectVector3Modifications(state, ref modifications, ref dictionary3, "m_LocalPosition");
                AnimationRecording.CollectVector3Modifications(state, ref modifications, ref dictionary2, "m_LocalScale");
                AnimationRecording.ProcessAnimatorModifications(state, ref dictionary3, ref dictionary, ref dictionary2);
                AnimationRecording.ProcessVector3Modifications(state, ref dictionary3);
                AnimationRecording.ProcessRotationModifications(state, ref dictionary);
                AnimationRecording.ProcessVector3Modifications(state, ref dictionary2);
                AnimationRecording.ProcessModifications(state, modifications);
                array.Concat(second);
                result = array.ToArray <UndoPropertyModification>();
            }
            return(result);
        }