public AnimationLayer(AnimationClass Owner, string Name) { this.Name = Name; this.Owner = Owner; ListChildren = new List <AnimationLayer>(); DicTimelineEvent = new Dictionary <int, List <Timeline> >(); ListVisibleObject = new List <VisibleTimeline>(); ListActiveMarker = new List <MarkerTimeline>(); ListPolygonCutter = new List <PolygonCutterTimeline>(); DicGroupEvent = new Dictionary <uint, GroupTimeline>(); _LayerBlendState = LayerBlendStates.Add; _LayerSamplerStates = LayerSamplerStates.LinearClamp; SamplerState = SamplerState.LinearClamp; ShowChildren = true; IsVisible = true; IsLocked = false; IsSelected = false; }
protected void UpdateFrom(AnimationLayer Other) { _Name = Other._Name; Owner = Other.Owner; ListChildren = new List <AnimationLayer>(Other.ListChildren.Count); foreach (AnimationLayer ActiveLayer in Other.ListChildren) { ListChildren.Add(ActiveLayer.Copy()); } DicTimelineEvent = new Dictionary <int, List <Timeline> >(Other.DicTimelineEvent.Count); foreach (KeyValuePair <int, List <Timeline> > ActiveListTimelineEvent in Other.DicTimelineEvent) { List <Timeline> ListTimelineEvent = new List <Timeline>(ActiveListTimelineEvent.Value.Count); foreach (Timeline ActiveTimelineEvent in ActiveListTimelineEvent.Value) { ListTimelineEvent.Add(ActiveTimelineEvent.Copy(this)); } DicTimelineEvent.Add(ActiveListTimelineEvent.Key, ListTimelineEvent); } DicGroupEvent = new Dictionary <uint, GroupTimeline>(Other.DicGroupEvent.Count); foreach (KeyValuePair <uint, GroupTimeline> ActiveGroupEvent in Other.DicGroupEvent) { DicGroupEvent.Add(ActiveGroupEvent.Key, (GroupTimeline)ActiveGroupEvent.Value.Copy(this)); } ListVisibleObject = new List <VisibleTimeline>(); ListActiveMarker = new List <MarkerTimeline>(); ListPolygonCutter = new List <PolygonCutterTimeline>(); renderTarget = Other.renderTarget; _LayerBlendState = Other._LayerBlendState; _Alpha = Other._Alpha; ShowChildren = Other.ShowChildren; IsSelected = Other.IsSelected; IsVisible = Other.IsVisible; IsLocked = Other.IsLocked; }