static public int Optimize(IntPtr l) { try { CinemaDirector.TimelineTrack self = (CinemaDirector.TimelineTrack)checkSelf(l); self.Optimize(); return(0); } catch (Exception e) { return(error(l, e)); } }
/// <summary> /// Prepares the TrackGroup by caching all TimelineTracks. /// </summary> public virtual void Optimize() { if (canOptimize) { trackCache = GetTracks(); hasBeenOptimized = true; } TimelineTrack[] tracks = GetTracks(); if (tracks != null) { for (int i = 0; i < tracks.Length; ++i) { TimelineTrack track = tracks[i]; track.Optimize(); } } }