Пример #1
0
 public RenderParamSet(RenderParamSet regionParams)
 {
     foreach (RenderParameter param in regionParams.UserParams)
     {
         AddUserParam(param.Name, param.Value);
     }
 }
Пример #2
0
 public void MergeWith(RenderParamSet renderParamSet)
 {
     foreach (var param in renderParamSet.UserParams)
     {
         AddUserParam(param.Name, param.Value);
     }
 }
Пример #3
0
 // set up some defaults
 public RenderItem(Region Region, RenderParamSet Params)
 {
     this.Region  = new RenderRegion(Region);
     RenderParams = Params;
 }
Пример #4
0
        private void BuildScanRegions(ScriptPortal.Vegas.Vegas Vegas)
        {
            var regions = UseSelection ? Vegas.GetSelectedRegions().Where(r => !r.Label.ContainsRenderTag(RenderTags.NoRender)).ToList() : Vegas.Project.Regions.Where(region => !region.Label.ContainsRenderTag(RenderTags.NoRender)).ToList();

            SetProgressBounds(regions.Count);
            SetProgressStatus(RenderStrings.StatusBuildingScanningRegions);

            for (int scanCounter = 0; scanCounter < regions.Count; scanCounter++)
            {
                SetProgress(scanCounter);
                if (Cancel)
                {
                    return;
                }

                var reg = regions[scanCounter];

                var regionParams = Vegas.Project.GetParamsAt(reg.End);
                regionParams.ParseString(reg.Label);

                var tracks = Vegas.Project.Tracks.Where(trk => string.IsNullOrEmpty(trk.Name) || !trk.Name.ContainsRenderTag(RenderTags.NoRender)).ToList();
                if (regionParams.GetParam <bool>(RenderTags.NoEmpty))
                {
                    tracks = tracks.Where(item => item.Events.Any(ev => ev.Start <= reg.End && ev.End >= reg.Position)).ToList();
                }
                if (!regionParams.GetParam <bool>(RenderTags.DoVideo))
                {
                    tracks = tracks.Where(trk => !trk.IsVideo()).ToList();
                }

                // straight mode
                if (!regionParams.GetParam <bool>(RenderTags.DoStems))
                {
                    var localParams = new RenderParamSet(regionParams);
                    foreach (var trk in tracks)
                    {
                        localParams.ParseString(trk.Name);
                        localParams.ParseString(trk.BusTrack.Name);
                    }
                    var ri = new RenderItem(reg, localParams);
                    ri.Tracks.AddRange(tracks);

                    Add(ri);
                }

                else                 // stem mode
                {
                    foreach (var trk in tracks)
                    {
                        var localParams = new RenderParamSet(regionParams);

                        localParams.ParseString(trk.Name);
                        localParams.ParseString(trk.BusTrack.Name);
                        var ri = new RenderItem(reg, localParams);
                        ri.Tracks.Add(trk);

                        Add(ri);
                    }
                }
            }
        }