V6: problem with AdjustStartLength?

klaymen wrote on 4/25/2005, 11:20 AM
I just discovered problems with my Vegas-5 scripts that were running perfectly there. I have the impression that there's a problem with AdjustStartLength in Vegas 6. It seems it doesn't correct the offset value anymore... whenever I move around a clip with AdjustStartLength, it seems only the event borders, but not the underlying video stream is moved. I didn't throughly test this out, but wondered if others observe a similar problem in Vegas 6..?

Comments

johnmeyer wrote on 4/25/2005, 9:51 PM
This command has undergone subtle changes before, including one change in an interim release (at 4.0d, to be precise). In the past, I had the same problem you describe. Here is some commented code that describes what I had to do back then to be compatible with both pre- and post- 4.0d:
//      evnt.Start=evnt.Start-DeleteFrames;   // Use this line for versions of Vegas prior to 4.0d
evnt.AdjustStartLength(evnt.Start-DeleteFrames, evnt.Length, true); // Use this line with 4.0d and beyond.


Also, the true/false flag changed (I think) at some point. It was broken at one point and then it worked again.

Since everything I provided above has to do with the past, it may be useless, but then again, things like this sometimes tend to resurface.
klaymen wrote on 4/25/2005, 10:36 PM
Thanks for the info.... the scripts work perfectly under Vegas 5.0d (build 194) though, so it must be something that happened after. I will check it into more details as soon as I have time though - maybe it helps if those who use Vegas 6 and use scripts including AdjustStartLength (to move clips forward and backward in the timeline) verify those still work with events that are not already adjusted to the start or end of the underlying video stream? I observe the problem with all my scripts (removeleft, sortevents, etc).

I will definitely try to add the "evnt.Start=evnt.Start-DeleteFrames" line in my script and report asap.
klaymen wrote on 4/28/2005, 12:33 AM
You're perfectly right... it seems AdjustStartLength works precisely as you described in pre-4.0d (sorry my prior posting. I misread "4.0d" as "5.0d" - I didn't expect Sony to fall back THAT far :-). This can be verified by the following short script that should adjust all events to the cursor position:

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

try {
for (var track in Vegas.Project.Tracks) {
for (var evnt in track.Events) {
// evnt.Start=Vegas.Cursor;
evnt.AdjustStartLength(Vegas.Cursor, evnt.Length, true);
}
}
} catch (e) {MessageBox.Show(e);}


This only works if you uncomment the commented line - otherwise the events are just moved above a fix video stream (so the offsets are then wrong). This is not as documented though, and definitely a bug. It means all scripts for Vegas 5 using AdjustStartLength no longer work. What should we do in our scripts now...? Can we expect this to be fixed soon, or do we need to add version checks for all out scripts? Any comments from Sony about this?
johnmeyer wrote on 4/28/2005, 11:30 AM
If you have a minute to spare, you ought to click on the Support button at the top of this page, and use the Email option to send this in as a bug report. I'd sure rather that they fix this to work like it did before, because I have quite a few scripts that will be broken if what you say is true.
Wolfgang S. wrote on 5/17/2005, 7:28 AM
Will that be corrected really?

This error blows up some important scripts, for me deleteUpToCursor and DeleteAfterCursor.

SONY, please be so kind and let us know!

Desktop: PC AMD 3960X, 24x3,8 Mhz * RTX 3080 Ti (12 GB)* Blackmagic Extreme 4K 12G * QNAP Max8 10 Gb Lan * Resolve Studio 18 * Edius X* Blackmagic Pocket 6K/6K Pro, EVA1, FS7

Laptop: ProArt Studiobook 16 OLED * internal HDR preview * i9 12900H with i-GPU Iris XE * 32 GB Ram) * Geforce RTX 3070 TI 8GB * internal HDR preview on the laptop monitor * Blackmagic Ultrastudio 4K mini

HDR monitor: ProArt Monitor PA32 UCG-K 1600 nits, Atomos Sumo

Others: Edius NX (Canopus NX)-card in an old XP-System. Edius 4.6 and other systems

jetdv wrote on 5/17/2005, 7:46 AM
I put a work-around in version 4.2 of Excalibur just because of this program. I know Sony is aware of the issue but cannot comment on when it might be resolved.

To work around the problem you simply need to adjust the Take Offset to the correct value.
johnmeyer wrote on 5/17/2005, 2:08 PM
Is this related to the fadeout problem I reported in the thread I started a few days ago? No one came up with any clue as to how to resolve that.
Wolfgang S. wrote on 5/21/2005, 6:59 AM
@ jetdv,

thank you for that hint - I have been able to modify the scripts, still based on a script of John.

Download for Vegas6b here:

scripts delete to/up cursor

Desktop: PC AMD 3960X, 24x3,8 Mhz * RTX 3080 Ti (12 GB)* Blackmagic Extreme 4K 12G * QNAP Max8 10 Gb Lan * Resolve Studio 18 * Edius X* Blackmagic Pocket 6K/6K Pro, EVA1, FS7

Laptop: ProArt Studiobook 16 OLED * internal HDR preview * i9 12900H with i-GPU Iris XE * 32 GB Ram) * Geforce RTX 3070 TI 8GB * internal HDR preview on the laptop monitor * Blackmagic Ultrastudio 4K mini

HDR monitor: ProArt Monitor PA32 UCG-K 1600 nits, Atomos Sumo

Others: Edius NX (Canopus NX)-card in an old XP-System. Edius 4.6 and other systems

klaymen wrote on 5/21/2005, 10:14 AM
It's really annoying having to fox such things at every version... don't forget to add an explicit version check for each AdjuststartLength, becaus eI assume it will be the other way around again in one of the next releases. I didn't include the "corrections" in my scripts yet because I don't feel like having zig versions of each script for each subversion of Vegas. I hoped the bug will be removed in 6.0b (I did report this problem to Sony several weeks ago, and they acked it) - obviously I was wrong with this hope which is pretty sad.
Wolfgang S. wrote on 5/22/2005, 11:40 AM
I agree fully - it is boring. I have also forewarded that "bug" or "change" to Sony - no answer yet. I would have liked to see this problem changed back to the old behaviour of AdjustStartLength, too.

However, I think there is no other way then to keep different versions ready. So, if the old version will work again with V6c, then we will use the old versions of the scripts again.

But Sony: this is not very professional, sorry to say so. And I love Vegas because it is a professional tool.

Desktop: PC AMD 3960X, 24x3,8 Mhz * RTX 3080 Ti (12 GB)* Blackmagic Extreme 4K 12G * QNAP Max8 10 Gb Lan * Resolve Studio 18 * Edius X* Blackmagic Pocket 6K/6K Pro, EVA1, FS7

Laptop: ProArt Studiobook 16 OLED * internal HDR preview * i9 12900H with i-GPU Iris XE * 32 GB Ram) * Geforce RTX 3070 TI 8GB * internal HDR preview on the laptop monitor * Blackmagic Ultrastudio 4K mini

HDR monitor: ProArt Monitor PA32 UCG-K 1600 nits, Atomos Sumo

Others: Edius NX (Canopus NX)-card in an old XP-System. Edius 4.6 and other systems

jetdv wrote on 5/22/2005, 5:08 PM
With the workaround I mentioned, it doesn't matter how the command works. One way it will be corrected. The other way, it will simply make no change.
Wolfgang S. wrote on 5/23/2005, 3:57 AM
Yes and No.

Yes, since it can be corrected - takes some time, and the scripts must be tested out again.

No - because it simply makes no sense. Why does Sony change the behaviour of AdjustStartLength from version to version? I have no clue why they so that. But I know, that it triggers some re-work of scripts - and maybe worser: it is dangerous, since people tend to use their well-known scripts.

My overall point is: it has no added value at all, to change that - at least from my perspective. Whatever had driven that change...

Desktop: PC AMD 3960X, 24x3,8 Mhz * RTX 3080 Ti (12 GB)* Blackmagic Extreme 4K 12G * QNAP Max8 10 Gb Lan * Resolve Studio 18 * Edius X* Blackmagic Pocket 6K/6K Pro, EVA1, FS7

Laptop: ProArt Studiobook 16 OLED * internal HDR preview * i9 12900H with i-GPU Iris XE * 32 GB Ram) * Geforce RTX 3070 TI 8GB * internal HDR preview on the laptop monitor * Blackmagic Ultrastudio 4K mini

HDR monitor: ProArt Monitor PA32 UCG-K 1600 nits, Atomos Sumo

Others: Edius NX (Canopus NX)-card in an old XP-System. Edius 4.6 and other systems