Snapshot still broken in 5.0a

johnmeyer wrote on 4/28/2004, 7:16 PM
I just got around to using the "Snapshot to Clipboard" script that I have used many times. It no longer works. When the script gets to the:

Vegas.SaveSnapshot() == RenderStatus.Complete;

line, the cursor first moves to the beginning of the project, and then the snapshot is taken, rather than taking the snapshot at the current position of the cursor.

I am using version 5.0a Build 134.

I took this script below, changed the Sony back to SonicFoundry, and verified that it works perfectly in Vegas 4.0d.

Here is the complete script (I didn't write this one):
// This script copies a snapshot of the current cursor position to the clipboard

import System.Windows.Forms;
import Sony.Vegas.Script;
import Sony.Vegas;

// Save original Settings
var origPreviewRenderQuality = Vegas.Project.Preview.RenderQuality;
var origPreviewFillSize = Vegas.Project.Preview.FullSize;
var origFieldOrder = Vegas.Project.Video.FieldOrder;
var origProjectDeinterlaceMethod = Vegas.Project.Video.DeinterlaceMethod;

try
{

// Setup Preview for image capture
Vegas.Project.Preview.RenderQuality = VideoRenderQuality.Best;
Vegas.Project.Preview.FullSize = true;

// Set the field order and deinterlace method
Vegas.Project.Video.FieldOrder = VideoFieldOrder.ProgressiveScan;
Vegas.Project.Video.DeinterlaceMethod = VideoDeinterlaceMethod.InterpolateFields;

// Copy Snapshot to Clipboard
Vegas.SaveSnapshot() == RenderStatus.Complete;

}
catch (e)
{
MessageBox.Show(e);
}


// Restore Previous Settings
Vegas.Project.Preview.RenderQuality = origPreviewRenderQuality;
Vegas.Project.Preview.FullSize = origPreviewFillSize;
Vegas.Project.Video.FieldOrder = origFieldOrder;
Vegas.Project.Video.DeinterlaceMethod = origProjectDeinterlaceMethod;

Comments

JohnnyRoy wrote on 4/29/2004, 4:56 AM
Yep, broken here too. That looks like a bug. Try passing in the curser timecode. That seems to work for me.
	// Copy Snapshot to Clipboard
Vegas.SaveSnapshot(Vegas.Cursor);
~jr
johnmeyer wrote on 4/29/2004, 9:05 AM
Try passing in the curser timecode.

Yep, that worked. Thanks!

Looks like they (intentionally or otherwise) changed the default behavior.
SonyPJM wrote on 5/3/2004, 7:18 AM

Sorry for this is a bug in 5.0a. I was able to repro and I'll try to
fix it for 5.0b. The work-around for now is, as stated, to specify the
current cursor position.

My apologies.
sacherjj wrote on 6/19/2004, 1:01 PM
Is there any method of changing the SaveSnapshot output to use native pixel width, rather than aspect ratio created sizes? I modified the Export For Range script to give me Lower Field First, Interlaced frames, but can't figure out how to SaveSnapshot at 720x480, instead of 872x480. I didn't see this option in any of the overloaded methods. I'm fine with the generation loss out and back in for the processing I want to do, but I can't have the processing from 720 to 872 then back to 720.
SonyPJM wrote on 6/21/2004, 7:34 AM

You can set Vegas.Project.Video.PixelAspectRatio to 1.0. You will
probably also want to set the aspect ratio of some or all VideoStreams
to 1.0.