Files
Magical-Jumping-Bean/Library/metadata/73/7341c0cd0aad4994e8fa461cb443aa7d
T

122 lines
9.6 KiB
Plaintext
Raw Normal View History

2019-09-29 19:40:54 -04:00
í&42019.2.3f1þÿÿÿÿÿ’3$øÌuñ옲e+ Í=^7€ÿÿÿÿ€¦€²€Ѐ¦€¦€¦€#¦€+H€3ÿÿÿÿ€1€1€ÿÿÿÿ@Þ€€ Q€j€
H€<ÿÿÿÿ €1€1€ÿÿÿÿ @Þ€€
Q€j€Õ€Iÿÿÿÿ€1€1€ÿÿÿÿÀÞ€€H€j€ÿÿÿÿ€1€1€ÿÿÿÿ@Þ€€Q€j€™€PAssetMetaDataguiddata[0]data[1]data[2]data[3]pathNameoriginalNamelabelsassetStoreRef ÿÿfš†!ë5˜9Ý4QÁóBí7€ÿÿÿÿ€¦€²€
E€ Þ€#€.€,€5a€ Þ€#€.€,€†€r€ Þ€# €.€,
€H€«€ÿÿÿÿ €1€1€ÿÿÿÿ @Þ€€
Q€j€ñ€JÿÿÿÿÀ1€1€ÿÿÿÿ€Þ€€€j€ÿÿÿÿ€\›€ÿÿÿÿ€H€rÿÿÿÿ€1€1€ÿÿÿÿ@Þ€€Q€j€H€wÿÿÿÿ€1€1€ÿÿÿÿ@Þ€€Q€j€H€€ÿÿÿÿ€1€1€ÿÿÿÿ@Þ€€Q€j€y€
€ Þ€#!€.€,"€€…ÿÿÿÿ#@1€1€ÿÿÿÿ$Þ€€%.€j€&Õ€“ÿÿÿÿ'€1€1€ÿÿÿÿ(ÀÞ€€)€j€ÿÿÿÿ*€H€›€ÿÿÿÿ+€1€1€ÿÿÿÿ,@Þ€€-Q€j€.y€
€ /Þ€#0€.€,1€ €§2@¾€¶ 3@Þ€#4€.€,5€H€»ÿÿÿÿ6€1€1€ÿÿÿÿ7@Þ€€8Q€j€9H€Æÿÿÿÿ:€1€1€ÿÿÿÿ;@Þ€€<Q€j€=H€Øÿÿÿÿ>€1€1€ÿÿÿÿ?@Þ€€@Q€j€AMonoImporterPPtr<EditorExtension>m_FileIDm_PathIDPPtr<PrefabInstance>m_ExternalObjectsSourceAssetIdentifiertypeassemblynamem_UsedFileIDsm_DefaultReferencesexecutionOrdericonm_UserDatam_AssetBundleNamem_AssetBundleVariantsÿÿ£Gñ×Ü�Z56 :!@iÁJ*�€7€ÿÿÿÿ€¦€²€E€ Þ€€.€€(a€ Þ€€.€€†€r€ Þ€ €.€
€H€«€ÿÿÿÿ €1€1€ÿÿÿÿ @Þ€€
Q€j€H€ê€ÿÿÿÿ€1€1€ÿÿÿÿ@Þ€€Q€j€ñ€=ÿÿÿÿ€1€1€ÿÿÿÿ€Þ€€€j€ÿÿÿÿ€H€›€ÿÿÿÿ€1€1€ÿÿÿÿ@Þ€€Q€j€y€
€ Þ€€.€€y€Q Þ€€.€ €Þ€X!H€iÿÿÿÿ"€1€1€ÿÿÿÿ#@Þ€€$Q€j€%H€uÿÿÿÿ&€1€1€ÿÿÿÿ'@Þ€€(Q€j€)PPtr<EditorExtension>m_FileIDm_PathIDPPtr<PrefabInstance>m_DefaultReferencesm_Iconm_ExecutionOrderm_ClassNamem_Namespacexx\ày¯ØL7 Ü Ú”IޝdÁK4ª×OPackages/com.unity.timeline/Editor/Recording/TimelineRecording_PlayableAsset.csày¯TimelineRecording_PlayableAsset¾using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEngine.Timeline;
using UnityEngine.Playables;
namespace UnityEditor.Timeline
{
// Handles Undo animated properties on PlayableAssets from clips to create parameter animation
static partial class TimelineRecording
{
internal static bool HasAnyPlayableAssetModifications(UndoPropertyModification[] modifications)
{
return modifications.Any(x => GetTarget(x) as IPlayableAsset != null);
}
internal static UndoPropertyModification[] ProcessPlayableAssetModification(UndoPropertyModification[] modifications, WindowState state)
{
// can't record without a director since the asset being modified might be a scene instance
if (state == null || state.editSequence.director == null)
return modifications;
var remaining = new List<UndoPropertyModification>();
foreach (UndoPropertyModification mod in modifications)
{
if (!ProcessPlayableAssetModification(mod, state))
remaining.Add(mod);
}
if (remaining.Count != modifications.Length)
{
state.rebuildGraph = true;
state.GetWindow().Repaint();
}
return remaining.ToArray();
}
static bool ProcessPlayableAssetModification(UndoPropertyModification mod, WindowState state)
{
var target = GetTarget(mod) as IPlayableAsset;
if (target == null)
return false;
var curvesOwner = AnimatedParameterUtility.ToCurvesOwner(target, state.editSequence.asset);
if (curvesOwner == null || !state.IsTrackRecordable(curvesOwner.targetTrack))
return false;
return ProcessPlayableAssetRecording(mod, state, curvesOwner);
}
internal static TimelineClip FindClipWithAsset(TimelineAsset asset, IPlayableAsset target)
{
if (target == null || asset == null)
return null;
var clips = asset.flattenedTracks.SelectMany(x => x.clips);
return clips.FirstOrDefault(x => x != null && x.asset != null && target == x.asset as IPlayableAsset);
}
static bool ProcessPlayableAssetRecording(UndoPropertyModification mod, WindowState state, ICurvesOwner curvesOwner)
{
if (mod.currentValue == null)
return false;
if (!curvesOwner.IsParameterAnimatable(mod.currentValue.propertyPath))
return false;
var localTime = state.editSequence.time;
var timelineClip = curvesOwner as TimelineClip;
if (timelineClip != null)
{
// don't use time global to local since it will possibly loop.
localTime = timelineClip.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;
if (!bool.TryParse(mod.currentValue.value, out bValue))
{
Debug.Assert(false, "Invalid type in PlayableAsset recording");
return false;
}
fValue = bValue ? 1 : 0;
}
var added = curvesOwner.AddAnimatedParameterValueAt(mod.currentValue.propertyPath, fValue, (float)localTime);
if (added && AnimationMode.InAnimationMode())
{
EditorCurveBinding binding = curvesOwner.GetCurveBinding(mod.previousValue.propertyPath);
AnimationMode.AddPropertyModification(binding, mod.previousValue, true);
curvesOwner.targetTrack.SetShowInlineCurves(true);
if (state.GetWindow() != null && state.GetWindow().treeView != null)
state.GetWindow().treeView.CalculateRowRects();
}
return added;
}
static bool IsPlayableAssetProperty(SerializedProperty property)
{
return property.serializedObject.targetObject is IPlayableAsset;