void CinemaCurveControl_TranslateCurveClipItem(object sender, CurveClipItemEventArgs e) { CinemaClipCurve curveClip = e.curveClipItem as CinemaClipCurve; if (curveClip == null) return; Undo.RecordObject(e.curveClipItem, string.Format("Changed {0}", curveClip.name)); curveClip.TranslateCurves(e.firetime - curveClip.Firetime); EditorUtility.SetDirty(e.curveClipItem); }
void CinemaCurveControl_TranslateCurveClipItem(object sender, CurveClipItemEventArgs e) { CinemaClipCurve curveClip = e.curveClipItem as CinemaClipCurve; if (curveClip == null) { return; } Undo.RecordObject(e.curveClipItem, string.Format("Changed {0}", curveClip.name)); curveClip.TranslateCurves(e.firetime - curveClip.Firetime); }
void CinemaCurveControl_AlterDuration(object sender, CurveClipItemEventArgs e) { CinemaClipCurve curveClip = e.curveClipItem as CinemaClipCurve; if (curveClip == null) return; Undo.RecordObject(e.curveClipItem, string.Format("Changed {0}", curveClip.name)); curveClip.AlterDuration(e.duration); if (e.duration <= 0) { GUIUtility.hotControl = 0; deleteItem(e.curveClipItem); } EditorUtility.SetDirty(e.curveClipItem); }
void CinemaCurveControl_AlterDuration(object sender, CurveClipItemEventArgs e) { CinemaClipCurve curveClip = e.curveClipItem as CinemaClipCurve; if (curveClip == null) { return; } Undo.RecordObject(e.curveClipItem, string.Format("Changed {0}", curveClip.name)); curveClip.AlterDuration(e.duration); if (e.duration <= 0) { GUIUtility.hotControl = 0; deleteItem(e.curveClipItem); } }