Insert Empty Event

Jack S wrote on 1/5/2024, 10:04 AM

@jetdv Hi Edward. I've just watched your video on inserting an adjustment event. I then wondered if the same method could be used for inserting an empty event. I couldn't find any reference to adjustment event or empty event in the API, but then, the API was revised over two years ago, so it isn't surprising. On a hunch, I replaced the reference VideoAdjustmentEvent with VideoEmpty Event (well, it seemed logical), but it failed. Obviously the reference for an empty event is different, or is there a reference at all? I thought, if anyone would know this, Edward will. Is there a valid reference, or is that wishful thinking? Thaks in advance.

My system
Genshin Infinity Gaming PC
Motherboard Gigabyte H610M H: m-ATX w/, USB 3.2, 1 x M.2
Power Supply Corsair RM750X
Intel Core i7-13700K - 16-Core [8P @ 3.4GHz-5.4GHz / 8E @ 2.50GHz-4.20GHz]
30MB Cache + UHD Graphics, Ultimate OC Compatible
Case Fan 4 x CyberPowerPC Hyperloop 120mm ARGB & PWM Fan Kit
CPU Fan CyberPowerPC Master Liquid LITE 360 ARGB AIO Liquid Cooler, Ultimate OC Compatible
Memory 32GB (2 x 16GB) DDR5/5200MHz Corsair Vengeance RGB
MSI GeForce RTX 4060 Ti 8GB - Ray Tracing Technology, DX12, VR Ready, HDMI, DP
System drive 1TB WD Black SN770 M.2 NVMe PCIe SSD - 5150MB/s Read & 4900MB/s Write
Storage 2 x 2TB Seagate BarraCuda SATA-III 6.0Gb/s 7200RPM
Windows 11 Home (x64)
Monitors
Generic Monitor (PHL 222V8) connected to GeForce RTX 4060 Ti
Generic Monitor (SAMSUNG) connected to iGPU

Camcorder
SONY Handycam HDR-XR550VE

Comments

jetdv wrote on 1/5/2024, 10:11 AM

@Jack S, it's even easier. Just create a video event, add it to the video track, and don't assign any media to it:

            VideoEvent newEvent = new VideoEvent(Timecode.FromSeconds(1), Timecode.FromSeconds(10));
            myVegas.Project.Tracks[0].Events.Add(newEvent);

 

Jack S wrote on 1/5/2024, 10:13 AM

@jetdv Thanks for the quick response. I just knew that you would come up with a solution. Once again, thanks for your help.

My system
Genshin Infinity Gaming PC
Motherboard Gigabyte H610M H: m-ATX w/, USB 3.2, 1 x M.2
Power Supply Corsair RM750X
Intel Core i7-13700K - 16-Core [8P @ 3.4GHz-5.4GHz / 8E @ 2.50GHz-4.20GHz]
30MB Cache + UHD Graphics, Ultimate OC Compatible
Case Fan 4 x CyberPowerPC Hyperloop 120mm ARGB & PWM Fan Kit
CPU Fan CyberPowerPC Master Liquid LITE 360 ARGB AIO Liquid Cooler, Ultimate OC Compatible
Memory 32GB (2 x 16GB) DDR5/5200MHz Corsair Vengeance RGB
MSI GeForce RTX 4060 Ti 8GB - Ray Tracing Technology, DX12, VR Ready, HDMI, DP
System drive 1TB WD Black SN770 M.2 NVMe PCIe SSD - 5150MB/s Read & 4900MB/s Write
Storage 2 x 2TB Seagate BarraCuda SATA-III 6.0Gb/s 7200RPM
Windows 11 Home (x64)
Monitors
Generic Monitor (PHL 222V8) connected to GeForce RTX 4060 Ti
Generic Monitor (SAMSUNG) connected to iGPU

Camcorder
SONY Handycam HDR-XR550VE

Jack S wrote on 1/7/2024, 8:14 AM

@jetdv Another question please. I've successfully included code to create an empty event immediately above a selected event in my custom command. I'd now like to do the same for an adjustment event, but my version of ScriptPortal.Vegas doesn't recognise this. I presume that I'd have to use the ScriptPortal.Vegas.dll from the VP21 folder, but using this would necessitate me using a later version of.NET. Do you happen to know which version this dll was built with?

EDIT. I solved the problem. I had the .NET 4.8 installed, but it was the SDK version. I found that it had to be the targeting pack, so I installed that. After adding the ScriptPortal.Vegas.dll from the VP21 folder I can now reference 'VideoAdjustmentEvent'.

Last changed by Jack S on 1/7/2024, 10:36 AM, changed a total of 1 times.

My system
Genshin Infinity Gaming PC
Motherboard Gigabyte H610M H: m-ATX w/, USB 3.2, 1 x M.2
Power Supply Corsair RM750X
Intel Core i7-13700K - 16-Core [8P @ 3.4GHz-5.4GHz / 8E @ 2.50GHz-4.20GHz]
30MB Cache + UHD Graphics, Ultimate OC Compatible
Case Fan 4 x CyberPowerPC Hyperloop 120mm ARGB & PWM Fan Kit
CPU Fan CyberPowerPC Master Liquid LITE 360 ARGB AIO Liquid Cooler, Ultimate OC Compatible
Memory 32GB (2 x 16GB) DDR5/5200MHz Corsair Vengeance RGB
MSI GeForce RTX 4060 Ti 8GB - Ray Tracing Technology, DX12, VR Ready, HDMI, DP
System drive 1TB WD Black SN770 M.2 NVMe PCIe SSD - 5150MB/s Read & 4900MB/s Write
Storage 2 x 2TB Seagate BarraCuda SATA-III 6.0Gb/s 7200RPM
Windows 11 Home (x64)
Monitors
Generic Monitor (PHL 222V8) connected to GeForce RTX 4060 Ti
Generic Monitor (SAMSUNG) connected to iGPU

Camcorder
SONY Handycam HDR-XR550VE

jetdv wrote on 1/7/2024, 12:53 PM

Yes, you do have to use the newer DLL as the older ones do not know about this new feature. Glad to hear you got it solved. I do have mine set to .NET 4.8.

bvideo wrote on 1/7/2024, 10:15 PM

EDIT. I solved the problem. I had the .NET 4.8 installed, but it was the SDK version. I found that it had to be the targeting pack, so I installed that. After adding the ScriptPortal.Vegas.dll from the VP21 folder I can now reference 'VideoAdjustmentEvent'.

@Jack S how do you engage the "targeting pack"? I believe I have downloaded it, but don't see it in the choice dropdown.

 

Jack S wrote on 1/8/2024, 5:09 AM

@bvideo This is what I did. In Visual Studio, select Tools/Get Tools and Features and select Individual Components. This will list all versions of .NET that are available. You say you downloaded it, but did you install it? If you did, it should show up in this list. Scroll down to .NET Framework 4.8 targeting pack and tick the checkbox.
Now go to Solution Properties and open up the Target Framework drop-down list. 4.8 should be listed at the bottom and you can select it. You'll have to close and restart VS.
You'll then have to remove the existing reference to ScriptPortal.Vegas and browse for the one in the VegasPro 21 folder.

Hope this helps.

My system
Genshin Infinity Gaming PC
Motherboard Gigabyte H610M H: m-ATX w/, USB 3.2, 1 x M.2
Power Supply Corsair RM750X
Intel Core i7-13700K - 16-Core [8P @ 3.4GHz-5.4GHz / 8E @ 2.50GHz-4.20GHz]
30MB Cache + UHD Graphics, Ultimate OC Compatible
Case Fan 4 x CyberPowerPC Hyperloop 120mm ARGB & PWM Fan Kit
CPU Fan CyberPowerPC Master Liquid LITE 360 ARGB AIO Liquid Cooler, Ultimate OC Compatible
Memory 32GB (2 x 16GB) DDR5/5200MHz Corsair Vengeance RGB
MSI GeForce RTX 4060 Ti 8GB - Ray Tracing Technology, DX12, VR Ready, HDMI, DP
System drive 1TB WD Black SN770 M.2 NVMe PCIe SSD - 5150MB/s Read & 4900MB/s Write
Storage 2 x 2TB Seagate BarraCuda SATA-III 6.0Gb/s 7200RPM
Windows 11 Home (x64)
Monitors
Generic Monitor (PHL 222V8) connected to GeForce RTX 4060 Ti
Generic Monitor (SAMSUNG) connected to iGPU

Camcorder
SONY Handycam HDR-XR550VE

bvideo wrote on 1/8/2024, 11:26 AM

@Jack S Hi, thanks. I was missing the Tools/Get Tools and Features step. My Target Framework drop-down choice already was ".NET Framework 4.8" before getting and installing the "targeting pack". That dropdown didn't seem to change or show different versions of 4.8. So I don't know if anything changed. "VideoAdjustmentEvent" is an available type, so all is well I guess.

Also, @jetdv I am using Visual Studio 2022 (17.8.3) and I would dearly love to be able to run Vegas under the debugger as I could in a previous Visual Studio, but nope.

jetdv wrote on 1/8/2024, 11:42 AM

@bvideo I'm still using VS2015 which does debug correctly. I had tried it in 2019 and it does not work correctly (all the tabs on all of the windows are missing.) Also, finding the correct preset to start a new project was much harder to find in 2019. I downloaded the installer for 2022 but never installed it. I also like that with 2015, I have the entire installation downloaded and ready to install. With 2019 and 2022, the installer is just a stub and then everything has to be downloaded every time you install.

My results using VS2019 (debugging a custom command and missing the tabs)...

and picking the correct preset:

bvideo wrote on 1/8/2024, 2:42 PM

@jetdv Thanks for that info. I had previously used a set of your videos to develop a custom command. Using Visual Studio 2017, the tabs were missing, but the Vegas app would at least run and VS 2017 (edit: not 2027😄) let me do some debugging. My 2017 is gone, and I use 2022 mostly for some Windows apps. But now, attempting to debug Vegas 21 in VS2022 shows that Vegas starts and then exits immediately (code 0). I'm hoping someone will discover the workaround for that, tabs or not.

Last changed by bvideo on 1/8/2024, 2:52 PM, changed a total of 1 times.

Dedicated: Vegas 20, 21, & 22, i7 8700k (UHD 630), 32 gig ram, ssd & 2 spinning units.

General purpose: i5 11400 (UHD 730), 32 gigs, ssd, 1 spinning unit (Vegas 21 & 22)

jetdv wrote on 1/8/2024, 2:45 PM

You can actually still download 2015: https://visualstudio.microsoft.com/vs/older-downloads/

And you can have multiple versions installed at the same time.

You might try installing 2015 and loading that project just to see what happens. I've loaded the same project in 15 and 19.