private static void AddPropertyModification(GameObject obj, string propertyName) { AnimationModeDriver previewDriver = TimelineWindow.TimelineState.previewDriver; if (!(previewDriver == null) && AnimationMode.InAnimationMode(previewDriver)) { DrivenPropertyManager.RegisterProperty(previewDriver, obj, propertyName); } }
private AnimationModeDriver GetCandidateDriver() { if (this.m_CandidateDriver == null) { this.m_CandidateDriver = ScriptableObject.CreateInstance <AnimationModeDriver>(); this.m_CandidateDriver.name = "AnimationWindowCandidateDriver"; } return(this.m_CandidateDriver); }
private AnimationModeDriver GetCandidateDriver() { if (m_CandidateDriver == null) { m_CandidateDriver = CreateInstance <AnimationModeDriver>(); m_CandidateDriver.name = "AnimationWindowCandidateDriver"; } return(m_CandidateDriver); }
private static void AddPropertyModification(Component comp, string name) { if (!(comp == null)) { AnimationModeDriver previewDriver = TimelineWindow.TimelineState.previewDriver; if (!(previewDriver == null) && AnimationMode.InAnimationMode(previewDriver)) { DrivenPropertyManager.RegisterProperty(previewDriver, comp, name); } } }
private AnimationModeDriver GetAnimationModeDriver() { if (this.m_Driver == null) { this.m_Driver = ScriptableObject.CreateInstance <AnimationModeDriver>(); this.m_Driver.name = "AnimationWindowDriver"; AnimationModeDriver expr_34 = this.m_Driver; expr_34.isKeyCallback = (AnimationModeDriver.IsKeyCallback)Delegate.Combine(expr_34.isKeyCallback, new AnimationModeDriver.IsKeyCallback((UnityEngine.Object target, string propertyPath) => AnimationMode.IsPropertyAnimated(target, propertyPath) && this.KeyExists(new PropertyModification[] { new PropertyModification { target = target, propertyPath = propertyPath } }))); } return(this.m_Driver); }
private AnimationModeDriver GetAnimationModeDriver() { if (m_Driver == null) { m_Driver = CreateInstance <AnimationModeDriver>(); m_Driver.hideFlags = HideFlags.HideAndDontSave; m_Driver.name = "AnimationWindowDriver"; m_Driver.isKeyCallback += (Object target, string propertyPath) => { if (AnimationMode.IsPropertyAnimated(target, propertyPath)) { var modification = new PropertyModification(); modification.target = target; modification.propertyPath = propertyPath; return(KeyExists(new PropertyModification[] { modification })); } return(false); }; } return(m_Driver); }
private void AddSerializedPlayableModifications(IPlayableAsset asset, AnimationClip clip) { Object @object = asset as Object; if (!(@object == null)) { AnimationModeDriver previewDriver = TimelineWindow.TimelineState.previewDriver; if (!(previewDriver == null) && AnimationMode.InAnimationMode(previewDriver)) { EditorCurveBinding[] bindings = AnimationClipCurveCache.Instance.GetCurveInfo(clip).bindings; List <FieldInfo> list = AnimatedParameterExtensions.GetScriptPlayableFields(asset).ToList <FieldInfo>(); EditorCurveBinding[] array = bindings; for (int i = 0; i < array.Length; i++) { EditorCurveBinding editorCurveBinding = array[i]; foreach (FieldInfo current in list) { DrivenPropertyManager.RegisterProperty(previewDriver, @object, current.Name + "." + editorCurveBinding.propertyName); } } } } }