Activity › Forums › VEGAS Pro › Change default folder to be the current directory -maybe one of you script guys
-
Change default folder to be the current directory -maybe one of you script guys
Posted by John Lenihan on March 8, 2014 at 4:43 pmI have read all the posts and don’t think I saw this exact request.
Is there a way to use a system variable for the default render location.
I keep my rendered files in the project folder along with the vegas files.
I would like the default render location to be the same folder that the vegas file was in. So I am wondering if there is a way to put some kind of variable into the set default render location to it comes up there.
I am constantly working on 3 to 5 projects at a time, going between them, and the default render is the last place I rendered. So I end up with files in the wrong place because I am multitasking.
Is there like a %CD% or something I could put into the default prepare folder space?
John Lenihan
LeniCam Video Productions
https://www.lenicamvideoproductions.comTyson Onaga replied 12 years, 2 months ago 4 Members · 11 Replies -
11 Replies
-
Graham Bernard
March 8, 2014 at 5:29 pmMy Render As dropdown menu suits me.
Grazie
Video Content Creator and Potter
PC 7 64-bit 16gb * Intel® Core™i7-2600k Quad Core 3.40GHz * 2GB NVIDIA GEFORCE GTX 560 Ti
Cameras: Canon XF300 + PowerShot SX50HS Bridge -
Stephen Mann
March 8, 2014 at 10:39 pmI am not sure you can do it in a script, but have you sent a product suggestion to Sony?
Steve Mann
MannMade Digital Video
http://www.mmdv.com -
Tyson Onaga
March 9, 2014 at 2:01 amPut this into a .cs file (eg, ProjectPathToClipboard.cs)
using System;
using System.IO;
using Sony.Vegas;class EntryPoint
{
public void FromVegas( Vegas vegasApp )
{
try
{
string vegDir = Path.GetDirectoryName( vegasApp.Project.FilePath ) ;
Clipboard.SetDataObject( vegDir, true );
}
catch (Exception e)
{
MessageBox.Show(e.Message, "Unexpected Error", MessageBoxButtons.OK, MessageBoxIcon.Stop);
}
} // FromVegas()
}Either:
(a) run it manually via Tools, Scripting, [choose script]
(b) bind it to a hot key, or
(c) add it to your Vegas toolbar.It will extract the directory of your current .veg project and copy that value to the Windows clipboard. When you open the Render dialog, use Ctrl-V to paste it into FileName field. Vegas will switch the directory (folder) but it should change the Filename field back to the value when the dialog first opened.
-
John Lenihan
March 9, 2014 at 6:10 pmWow, thank you Tyson, I can’t wait to try it out.
And Stephen, your suggestion is a good one too. I will do that. However, I admit my expectation level of Sony Creative Support and product development is low.
John
John Lenihan
LeniCam Video Productions
https://www.lenicamvideoproductions.com -
Stephen Mann
March 11, 2014 at 11:01 pmI have always had good response from SCS support, but, then, I don’t ask them to fix my PC.
As far as product suggestions, they apparently collect them in aggregate. Meaning if ten or fifteen users ask for the same thing, they may look into adding it in a future release.Steve Mann
MannMade Digital Video
http://www.mmdv.com -
Stephen Mann
March 11, 2014 at 11:09 pmI would like to have such a script, but it won’t run:
E:\Documents\Sony\Vegas\Scripts\ProjectPathToClipboard.cs(14) : The name ‘Clipboard’ does not exist in the current context
E:\Documents\Sony\Vegas\Scripts\ProjectPathToClipboard.cs(18) : The name ‘MessageBox’ does not exist in the current context
E:\Documents\Sony\Vegas\Scripts\ProjectPathToClipboard.cs(18) : The name ‘MessageBoxButtons’ does not exist in the current context
E:\Documents\Sony\Vegas\Scripts\ProjectPathToClipboard.cs(18) : The name ‘MessageBoxIcon’ does not exist in the current contextWhat’s missing?
Steve Mann
MannMade Digital Video
http://www.mmdv.com -
John Lenihan
March 11, 2014 at 11:54 pmI get the same error message.
I have tried it on several computers and get the same message. No, actually, sometimes the application won’t start up with that script in the folder.
John
John Lenihan
LeniCam Video Productions
https://www.lenicamvideoproductions.com -
Tyson Onaga
March 12, 2014 at 1:20 amTry this:
// ================================================================================
// Program: ProjectPathToClipboard.cs
// Description: Copy full path from current .veg to Windows Clipboard.
// ================================================================================using System;
using System.IO;
using System.Collections;
using System.Windows.Forms;
using Sony.Vegas;class EntryPoint
{// --------------------------------------------------------------------------------
// FromVegas()
//
// Main entry point.
// --------------------------------------------------------------------------------public void FromVegas( Vegas vegasApp )
{
try
{
string vegDir = Path.GetDirectoryName( vegasApp.Project.FilePath ) ;
if ( Directory.Exists( vegDir + @"\Rendered") )
vegDir = vegDir + @"\Rendered";Clipboard.SetDataObject( vegDir, true );
}
catch (Exception e)
{
MessageBox.Show(e.Message, "Unexpected Error", MessageBoxButtons.OK, MessageBoxIcon.Stop);
}
} // FromVegas()// --------------------------------------------------------------------------------
} // class EntryPoint
// ================================================================================
This version looks for a \Rendered subfolder within the project’s folder.
You can change those line or comment/delete them.Remember, in order to run it from the Tools Script menu, you need to copy the .cs to:
C:\Users\%USERNAME%\Documents\Vegas Script Menu -
Stephen Mann
March 12, 2014 at 12:44 pm -
John Lenihan
March 13, 2014 at 1:43 amTyson,
This works Great!
Thank you
thank you.John
John Lenihan
LeniCam Video Productions
https://www.lenicamvideoproductions.com
Reply to this Discussion! Login or Sign Up