pna/crop programming

cgarrett wrote on 10/9/2004, 11:07 AM
having a tough time figuring this out. any advice is most appreciated.

attempting to modify crop boundaries in vegas 4 with the following code:

var myBounds = trackEvent.VideoMotion.Keyframes[zero].Bounds;
var myVertex = new VideoMotionVertex(100, 100);
myBounds.leftTop.X = myVertex;

throws exception no matter what i try so far.

thanks in advance.

Comments

jetdv wrote on 10/9/2004, 6:48 PM
"TopLeft" is the correct keyword and "X" would be a single value such as:

myBounds.TopLeft.X = 100;
myBounds.TopLeft.Y = 100;
cgarrett wrote on 10/10/2004, 1:05 PM
sorry, that seemed too obvious...

even so, its still not working... when i add the second line below then i get an "object required" error.

var myBounds = trackEvent.VideoMotion.Keyframes[zero].Bounds;
myBounds.leftTop.X = 100;
trackEvent.VideoMotion.Keyframes[zero].Bounds = myBounds;

but without the second line then no problem... but the bounds of the event are not modified.

thanks in advance for any advice...
jetdv wrote on 10/10/2004, 1:15 PM
It's NOT "leftTop"

It's "TopLeft"

myBounds.leftTop.X = 100; should be: myBounds.TopLeft.X = 100;