@jetdv Edward, I wonder if you could help me with a problem.
One of the tools in my extension allows the length and/or leading edge trim to be adjusted for selected events.
During my extensive testing, I found that empty video, empty audio or adjustment events were causing Vegas to crash when the tool was applied. After many hours of debugging, I found that one line of code was causing the crash. This is the line:-
myEvent.ActiveTake.Offset = myEvent.ActiveTake.Offset + timecodeLeadingTrim; //Trim the leading edge
The code works OK for any other type of event. It's just the three types I've mentioned that gives the problem. I've worked around it by enclosing the code in a try/catch block so I can display an appropriate message.
Is this line of code the correct way of trimming an event at the leading edge (it seems so, as any other event type is trimmed correctly)?
If it is, there's a problem which could affect anyone trying to apply a leading edge trim to one of these types.
That's the background. My question is, do you have a way to test an event to see if it's any of the three events mentioned? If, you do, I could test for these and take the appropriate action.
Many thanks for any help you can give me.