Log in

View Full Version : subset.Delete() vs subset.Clear()


len0x
17th December 2003, 15:20
I kinda lost here. Before 1.5.10.1 this used to work:

VirtialDub.subset.Delete()
VirtialDub.subset.AddRange(...)

Now it doesn't anymore because AddRange is adding the range to full movie which is not cleared by Delete(). So I had to do this:

VirtialDub.subset.Clear()
VirtialDub.subset.AddRange(...)

It would be ok if it wasn't for generic scripting I was using: .Delete() was added to every script I was using to clear the selection, but not remove the movie from output. Now if I replace it with Clear() without AddRange() I don't get any output.

So the question: is there a generic way of scripting usage with and without AddRange() ?

len0x
17th December 2003, 16:00
Alternative question would be - do I need to use Delete() at all in vcf scripts? I assume that if vcf script contains just one job for one video file then there is no need for it, is it ?

Suiryc
17th December 2003, 16:48
Here is how it seems to work now (dunno for previous versions of VirtualDub(Mod)) :

By default the whole clip is selected for processing.
.Delete() resets the timeline (i.e. it selects the full movie)
.Clear() clear the timeline (i.e. it makes the selection empty)
.AddRange(start, len) add a subset (starting from frame 'start', and lasting 'len' frames) to the selection