Files
Magical-Jumping-Bean/Library/metadata/b7/b7cabea05434bb9479aee1e121b0d103
T

154 lines
11 KiB
Plaintext
Raw Normal View History

2019-09-29 19:40:54 -04:00
í*¼2019.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_Namespacelp\ày¯ÐÜ{¬ë
EC»I—ê 0DPackages/com.unity.timeline/Editor/Manipulators/Sequence/EaseClip.csày¯EaseClipkusing System;
using System.Text;
using UnityEngine;
using UnityEngine.Timeline;
namespace UnityEditor.Timeline
{
class EaseClip : Manipulator
{
bool m_IsCaptured;
bool m_UndoSaved;
TimelineClipHandle m_EaseClipHandler;
ManipulateEdges m_Edges;
TimelineClip m_Clip;
StringBuilder m_OverlayText = new StringBuilder("");
double m_OriginalValue;
public static readonly string EaseInClipText = L10n.Tr("Ease In Clip");
public static readonly string EaseOutClipText = L10n.Tr("Ease Out Clip");
public static readonly string EaseInText = L10n.Tr("Ease In");
public static readonly string EaseOutText = L10n.Tr("Ease Out");
public static readonly string DurationFrameText = L10n.Tr(" Duration {0:0.00;-0.00} frames ");
public static readonly string DurationSecText = L10n.Tr(" Duration {0:0.00;-0.00} s ");
public static readonly string DeltaFrameText = L10n.Tr("({0:+0.00;-0.00} frames)");
public static readonly string DeltaSecText = L10n.Tr("({0:+0.00;-0.00} s)");
protected override bool MouseDown(Event evt, WindowState state)
{
if (evt.modifiers != ManipulatorsUtils.actionModifier)
return false;
return MouseDownInternal(evt, state, PickerUtils.PickedLayerableOfType<TimelineClipHandle>());
}
protected bool MouseDownInternal(Event evt, WindowState state, TimelineClipHandle handle)
{
if (handle == null)
return false;
if (handle.clipGUI.clip != null && !handle.clipGUI.clip.clipCaps.HasAny(ClipCaps.Blending))
return false;
m_Edges = ManipulateEdges.Right;
if (handle.trimDirection == TrimEdge.Start)
m_Edges = ManipulateEdges.Left;
if (m_Edges == ManipulateEdges.Left && handle.clipGUI.clip.hasBlendIn || m_Edges == ManipulateEdges.Right && handle.clipGUI.clip.hasBlendOut)
return false;
m_IsCaptured = true;
m_UndoSaved = false;
m_EaseClipHandler = handle;
m_Clip = handle.clipGUI.clip;
m_OriginalValue = m_Edges == ManipulateEdges.Left ? m_Clip.easeInDuration : m_Clip.easeOutDuration;
// Change cursor only when OnGUI Process (not in test)
if (GUIUtility.guiDepth > 0)
TimelineCursors.SetCursor(m_Edges == ManipulateEdges.Left ? TimelineCursors.CursorType.MixRight : TimelineCursors.CursorType.MixLeft);
state.AddCaptured(this);
return true;
}
protected override bool MouseUp(Event evt, WindowState state)
{
if (!m_IsCaptured)
return false;
m_IsCaptured = false;
m_UndoSaved = false;
state.captured.Clear();
// Clear cursor only when OnGUI Process (not in test)
if (GUIUtility.guiDepth > 0)
TimelineCursors.ClearCursor();
return true;
}
protected override bool MouseDrag(Event evt, WindowState state)
{
if (!m_IsCaptured)
return false;
if (!m_UndoSaved)
{
var uiClip = m_EaseClipHandler.clipGUI;
string undoName = m_Edges == ManipulateEdges.Left ? EaseInClipText : EaseOutClipText;
TimelineUndo.PushUndo(uiClip.clip.parentTrack, undoName);
m_UndoSaved = true;
}
double d = state.PixelDeltaToDeltaTime(evt.delta.x);
if (m_Edges == ManipulateEdges.Left)
{
m_Clip.easeInDuration = Math.Max(0, m_Clip.easeInDuration + d);
}
else if (m_Edges == ManipulateEdges.Right)
{
m_Clip.easeOutDuration = Math.Max(0, m_Clip.easeOutDuration - d);
}
RefreshOverlayStrings(m_EaseClipHandler, state);
return true;
}
public override void Overlay(Event evt, WindowState state)
{
if (!m_IsCaptured)
return;
if (m_OverlayText.Length > 0)
{
int stringLength = m_OverlayText.Length;
var r = new Rect(evt.mousePosition.x - (stringLength / 2.0f),
m_EaseClipHandler.clipGUI.rect.yMax,
stringLength, 20);
GUI.Label(r, m_OverlayText.ToString(), TimelineWindow.styles.tinyFont);
}
}
void RefreshOverlayStrings(TimelineClipHandle handle, WindowState state)
{
m_OverlayText.Length = 0;
m_OverlayText.Append(m_Edges == ManipulateEdges.Left ? EaseInText : EaseOutText);
double easeDuration = m_Edges == ManipulateEdges.Left ? m_Clip.easeInDuration : m_Clip.easeOutDuration;
double deltaDuration = easeDuration - m_OriginalValue;
bool hasDurationDelta = Math.Abs(deltaDuration) > double.Epsilon;
if (state.timeInFrames)
{
easeDuration *= state.editSequence.frameRate;
deltaDuration *= state.editSequence.frameRate;
m_OverlayText.AppendFormat(DurationFrameText, easeDuration);
if (hasDurationDelta)
{
m_OverlayText.AppendFormat(DeltaFrameText, deltaDuration);
}
}
else
{
m_OverlayText.AppendFormat(DurationSecText, easeDuration);
if (hasDurationDelta)
{
m_OverlayText.AppendFormat(DeltaSecText, deltaDuration);
}
}