Shortcut to restore event pan/crop settings

pdmath wrote on 8/7/2003, 9:02 AM
Is there an easier way to remove a pan/crop setting other than having to open the pan/crop window, right click and restore, then close the window ? ...It just takes too many steps. I would like to just hit a single button or key and have the pan/crop setting "disabled" and then hit the key again to "enable" it again if I want.

Thanks...Phil

Comments

lnetzel wrote on 8/7/2003, 9:10 AM
You could write a script to do this! then you would only have to press ctrl+[NUM] or connect to a button in the toolbar.
jetdv wrote on 8/7/2003, 9:59 AM
Here you go. Will work on ALL SELECTED events:

Reset Pan/Crop Script


Right-click the link, choose Save File As, and remove the ending ".txt"
Erk wrote on 8/7/2003, 10:24 AM
Jetdv, very helpful, many thanks.

G
pdmath wrote on 8/7/2003, 1:22 PM
Thanks Jetdv. That's exactly what I wanted to be able to do. I am getting crashes though. If I run the script, it restores the crop settings just fine...but if I then choose the event pan/crop button on the same event again, it crashes Vegas.

Here are the dialog window details regarding the crash:

Sonic Foundry Vegas 4.0
Version 4.0c (Build 184)
Exception 0xC0000005 (access violation) READ:0x0 IP:0x5C46EC
In Module 'vegas40.exe' at Address 0x400000 + 0x1C46EC
Thread: GUI ID=0x824 Stack=0x12F000-0x130000
Registers:
EAX=00123920 CS=001b EIP=005c46ec EFLGS=00010246
EBX=00000000 SS=0023 ESP=0012f780 EBP=0012f86c
ECX=00000017 DS=0023 ESI=00000000 FS=0038
EDX=0012f948 ES=0023 EDI=0012f948 GS=0000
Bytes at CS:EIP:
005C46EC: F3 A5 5F 5E 5B 8B E5 5D .._^[..]
005C46F4: C2 14 00 8B 45 10 85 C0 ....E...
Stack Dump:
0012F780: 01C5A428 01C40000 + 1A428
0012F784: 00000000
0012F788: 0050F0A0 00400000 + 10F0A0 (vegas40.exe)
0012F78C: 77E422EB 77E10000 + 322EB (USER32.dll)
0012F790: 44010B01
0012F794: 00000031
0012F798: 00000000
0012F79C: 0012F7B0 00030000 + FF7B0
0012F7A0: 00000006
0012F7A4: 00000031
0012F7A8: 0012FABC 00030000 + FFABC
0012F7AC: 00000006
0012F7B0: 006F0053 00400000 + 2F0053 (vegas40.exe)
0012F7B4: 00720075 00400000 + 320075 (vegas40.exe)
0012F7B8: 00650063 00400000 + 250063 (vegas40.exe)
0012F7BC: 77F44A44 77F40000 + 4A44 (GDI32.dll)
> 0012F7E0: 77F44A44 77F40000 + 4A44 (GDI32.dll)
> 0012F7F4: 77EC7B50 77E80000 + 47B50 (KERNEL32.dll)
> 0012F7FC: 717675E0 71710000 + 575E0 (COMCTL32.dll)
> 0012F828: 77FB2598 77F80000 + 32598 (ntdll.dll)
> 0012F848: 77FB64F4 77F80000 + 364F4 (ntdll.dll)
> 0012F84C: 77F830F0 77F80000 + 30F0 (ntdll.dll)
> 0012F858: 77FC8D32 77F80000 + 48D32 (ntdll.dll)
> 0012F870: 005C4C81 00400000 + 1C4C81 (vegas40.exe)
0012F874: 0012F948 00030000 + FF948
0012F878: 00000000
0012F87C: 00000000
0012F880: 00000000
> 0012F894: 77F4436D 77F40000 + 436D (GDI32.dll)
> 0012F8C4: 77F4440B 77F40000 + 440B (GDI32.dll)
> 0012F8CC: 77E423AE 77E10000 + 323AE (USER32.dll)
> 0012F8D0: 77F42121 77F40000 + 2121 (GDI32.dll)
> 0012F8E4: 77E423B6 77E10000 + 323B6 (USER32.dll)
> 0012F8F8: 77F41CF0 77F40000 + 1CF0 (GDI32.dll)
> 0012F8FC: 00740053 00400000 + 340053 (vegas40.exe)
- - -
0012FFF0: 00000000
0012FFF4: 00000000
0012FFF8: 0067A03A 00400000 + 27A03A (vegas40.exe)
0012FFFC: 00000000

jetdv wrote on 8/7/2003, 2:07 PM
I've made a change to it. Re-download it and see if it gives the error now.


Revised Reset Pan/Crop Script

pdmath wrote on 8/7/2003, 3:38 PM
good job...I can't make it crash now. I obviously don't know how (haven't tried to learn) how to write a script, but did you just knock this out after reading my post? Or was it something you already had...also curious what you changed to prevent it from crashing Vegas.

I appreciate the help....Phil
jetdv wrote on 8/7/2003, 3:42 PM
Yes, it was something I wrote after reading your post. However, I started with another script I wrote and just made the necessary changes. For example, going through the tracks and finding all selected events is a common task and the largest amount of code in this script. I started with a script that already did that, deleted the previous task, and added this one. It really helps that I have a base of scripts already written and can usually find one that is "close".

Glad the new version does not error. What I changed: After deleting all keyframes, I now add back in a "base" keyframe since pan/crop is assumed to always have ONE.
NickHope wrote on 1/24/2012, 5:28 AM
Alert! Reviving a thread from the depths of time...

In V8.0c and V10.0e, jetdv's script gives me this error. Anyone know if it can be updated? I want to restore/reset pan/crop for a bunch of selected events, but leave the fx on them.

amendegw wrote on 1/24/2012, 5:45 AM
I got the script to work by changing the line:

import SonicFoundry.Vegas;

to

Import Sony.Vegas;

...Jerry

PS: Welcome Back, Nick!

System Model:     Alienware M18 R1
System:           Windows 11 Pro
Processor:        13th Gen Intel(R) Core(TM) i9-13980HX, 2200 Mhz, 24 Core(s), 32 Logical Processor(s)

Installed Memory: 64.0 GB
Display Adapter:  NVIDIA GeForce RTX 4090 Laptop GPU (16GB), Nvidia Studio Driver 566.14 Nov 2024
Overclock Off

Display:          1920x1200 240 hertz
Storage (8TB Total):
    OS Drive:       NVMe KIOXIA 4096GB
        Data Drive:     NVMe Samsung SSD 990 PRO 4TB
        Data Drive:     Glyph Blackbox Pro 14TB

Vegas Pro 22 Build 239

Cameras:
Canon R5 Mark II
Canon R3
Sony A9

rs170a wrote on 1/24/2012, 5:47 AM
Nick, change the line that reads import SonicFoundry.Vegas; to import Sony.Vegas; and see if that helps.

edit: Jerry beat me to it :)

Mike
amendegw wrote on 1/24/2012, 5:50 AM
Mike,

Ha! I finally beat someone with an overpost. It seems like I'm always second on the list.

In any case, Great minds think alike! [grin]

...Jerry

System Model:     Alienware M18 R1
System:           Windows 11 Pro
Processor:        13th Gen Intel(R) Core(TM) i9-13980HX, 2200 Mhz, 24 Core(s), 32 Logical Processor(s)

Installed Memory: 64.0 GB
Display Adapter:  NVIDIA GeForce RTX 4090 Laptop GPU (16GB), Nvidia Studio Driver 566.14 Nov 2024
Overclock Off

Display:          1920x1200 240 hertz
Storage (8TB Total):
    OS Drive:       NVMe KIOXIA 4096GB
        Data Drive:     NVMe Samsung SSD 990 PRO 4TB
        Data Drive:     Glyph Blackbox Pro 14TB

Vegas Pro 22 Build 239

Cameras:
Canon R5 Mark II
Canon R3
Sony A9

rs170a wrote on 1/24/2012, 6:05 AM
Jerry, I will happily concede the win to you :)

Mike
NickHope wrote on 1/24/2012, 6:27 AM
Doh! Lazy me for not taking a closer look at the script before coming running here.

OK, so that now works thanks, but what I would really like is a script that will also reset and/or disable the mask within event pan/crop. Any takers?

Edit: Added "...and/or disable..."
amendegw wrote on 1/24/2012, 6:50 AM
"OK, so that now works thanks, but what I would really like is a script that will also reset and/or disable the mask within event pan/crop. Any takers?Nick, I might give this a shot, but since I'm such a rookie scripter, it might take me a couple days. In the meantime, if someone with more advanced scripting skills beats me to this, great!

...Jerry

Edit: I should have done some research before I volunteered. It appears that masking is not accessible from the scripting api. Anyone else have any insight?

System Model:     Alienware M18 R1
System:           Windows 11 Pro
Processor:        13th Gen Intel(R) Core(TM) i9-13980HX, 2200 Mhz, 24 Core(s), 32 Logical Processor(s)

Installed Memory: 64.0 GB
Display Adapter:  NVIDIA GeForce RTX 4090 Laptop GPU (16GB), Nvidia Studio Driver 566.14 Nov 2024
Overclock Off

Display:          1920x1200 240 hertz
Storage (8TB Total):
    OS Drive:       NVMe KIOXIA 4096GB
        Data Drive:     NVMe Samsung SSD 990 PRO 4TB
        Data Drive:     Glyph Blackbox Pro 14TB

Vegas Pro 22 Build 239

Cameras:
Canon R5 Mark II
Canon R3
Sony A9

NickHope wrote on 1/24/2012, 7:00 AM
Well, I've just gone through my whole timeline to reset and disable the masks manually, but it would still be a very useful script. As far as I can see, even Excalibur doesn't have it.
johnmeyer wrote on 1/24/2012, 12:31 PM
Well, I've just gone through my whole timeline to reset and disable the masks manually, but it would still be a very useful script. As far as I can see, even Excalibur doesn't have it.I just searched the script forum and found posts by JohnnyRoy that the mask parameters are not in the scripting API. I then confirmed this by looking at the script API. Even the presets are not available. So, scriptable masking --even simply removing existing settings -- cannot be done via a script.
NickHope wrote on 1/24/2012, 12:53 PM
Ah, that's a shame. Thanks for looking John!