Exemple #1
0
 public void AddChildCurvesToList(List <CurveState> curves, AnimationHierarchyData data)
 {
     if (!this.expanded)
     {
         return;
     }
     CurveState[] curveStates = this.curveStates;
     for (int i = 0; i < curveStates.Length; i++)
     {
         CurveState curveState = curveStates[i];
         if (curveState.animated || data.animationWindow.showAllProperties)
         {
             curves.Add(curveState);
         }
     }
 }
		public void SetupEditorCurvesHack()
		{
			if (this.SelectionIsActive())
			{
				List<CurveState> list = new List<CurveState>();
				List<AnimationWindowCurve> activeCurves = this.state.activeCurves;
				foreach (AnimationWindowCurve current in activeCurves)
				{
					if (!current.isPPtrCurve)
					{
						CurveState curveState = new CurveState(current.binding);
						curveState.animationSelection = AnimationWindow.m_Selected[0];
						curveState.animated = true;
						curveState.color = CurveUtility.GetPropertyColor(curveState.curveBinding.propertyName);
						list.Add(curveState);
					}
				}
				this.m_ShownProperties = list.ToArray();
				this.m_EditedCurves = new int[this.m_ShownProperties.Length];
				for (int i = 0; i < this.m_EditedCurves.Length; i++)
				{
					this.m_EditedCurves[i] = i;
				}
			}
			else
			{
				this.m_EditedCurves = new int[0];
				this.m_ShownProperties = new CurveState[0];
			}
		}
		private bool IsLinked(CurveState state, bool onlyLinkEuler)
		{
			return state.type == typeof(Transform) && (!onlyLinkEuler || state.propertyName.StartsWith("localEulerAngles."));
		}