Default Folders

Moderator: Impudent1

Post Reply
Impudent1
Posts: 57
Joined: June 12th, 2004, 6:40 pm

This set of scripts is basically the same script modified to work in one of three ways, depending on preference.

The main gist of the script is to create a set of default folders . It will take a predefined array of folder names. It will loop through a: renaming solids dir->creating new layer to get new default solids dir->rename that dir->delete unused layer then rename the existing solids folder back cycle.

http://www.leapfrog-productions.com/Scr ... tartup.jsx

is for use on starting AFX and goes in the scripts\startup folder.

http://www.leapfrog-productions.com/Scr ... olders.jsx

is the same script minus the app.newProject(); line , as its not needed if not used on startup. This script can be safely used in existing projects .

http://www.leapfrog-productions.com/Scr ... dersUI.jsx

is modified further to open up a dialog box with edit text fields containing the default folder name structure, esc/cancel and ok/return.

The known catch to these is that if you create a solid that creates the
default "Solids" folder, then using the history, undo. It will only undo the
solids creation not undo the "Solids" folder creation (hence on the UI
having the control events allowing cancel)
pixelbot
Posts: 9
Joined: June 17th, 2004, 11:19 am

so i am trying the startup version of the script and after it build the folders it ask if I want to save before closing - so if I save the project, AE opens up a blank project and in order to use the newly created folders I need to cancel. Is there away to not have AE close the newly created project.

thanks,
timt
timt
Impudent1
Posts: 57
Joined: June 12th, 2004, 6:40 pm

The startup one is meant to go in the scripts/startup folder vs being run once the application is running, DefaultFolders or DefaultFoldersUI are safe to run from the running application without messing with the existing project.

the line that you need to get rid of to answer the question tho is :

app.newProject();

that will prompt to save the open project

hth
pixelbot
Posts: 9
Joined: June 17th, 2004, 11:19 am

the script is in the startup folder (sorry I wasn't clear) but after it creates the folders it wants to close the newly created project. and if you get rid of the line: app.newProject(); you will get a javascript error.

thanks,
timt
timt
Impudent1
Posts: 57
Joined: June 12th, 2004, 6:40 pm

hmm interesting, it works here on 3 machines all windows flavor. As well you are correct that line is needed for it to work when ae starts up.

Do the other two run ok there?
pixelbot
Posts: 9
Joined: June 17th, 2004, 11:19 am

both other flavors work as advertised - I wonder if AE 6.5 on the mac does things in a different order when starting up.

hey I have a question does the windows version of AE 6.5 open up a blank project when you start it up?

thanks,
timt
timt
Impudent1
Posts: 57
Joined: June 12th, 2004, 6:40 pm

well if the others work I am assuming it is something with the line:

app.newProject();

your asking about how windows starts with untitled project leads me to see if this makes any difference on the mac side

could you try replacing lines 8-15 ( from after undo group line to above the array declaration) with this snippet?

if (app.project != null) {
app.project.showWindow(true); //set the project window active
} else {

app.newProject(); //creates a new project to open AE into
}

app.project.bitsPerChannel = 16; //sets the project bit depth


I will have to check and see if I can just do this snippet and make the non ui work both ways in one script :)
pixelbot
Posts: 9
Joined: June 17th, 2004, 11:19 am

I tried it and it still didn't work I'm actually thinking it is something at the end of the script that causes the newly created project to close - or that the mac version of AE closes it for some reason thus prompting the "do you want to save before closing" dialog box.

sorry I can't be of more scripting help.

timt
timt
Impudent1
Posts: 57
Joined: June 12th, 2004, 6:40 pm

Well thanks to a lot of input from Paul Tuersley there are new versions that should take care of the mac issue as well as some other little things I missed.

These now use the prefs file to store your foldernames and allow you to create "up to" 6 default folders.


if you have the older versions, please remove them from the scripts and scripts/startup folders.

This update is only two files: The UI version which is used to set/modify your folder name preferences, blank name being no folder is created. This file should be put in the default scripts directory as it is referenced by the standard script.

http://www.leapfrog-productions.com/Scr ... I_v1_8.jsx

The standard script can be put in either/both the default scripts directory as well as the scripts/startup directory. As mentioned the UI is called on first run to set the default folder names, so if you have custom folder structures you will have to modify to fit

http://www.leapfrog-productions.com/Scr ... s_v1_8.jsx
pixelbot
Posts: 9
Joined: June 17th, 2004, 11:19 am

thanks that works great - I appreciate you tracking this down and thanks to Paul T. You guys are great.

timt

I edited it to make an 8 bpc project - and my 3 favorite folders
timt
aswaab
Posts: 1
Joined: September 3rd, 2004, 3:14 pm

I think your script is great. I'd love to be able to create subfolders as well with it. Can you tell me how I would go about doing this?
Impudent1
Posts: 57
Joined: June 12th, 2004, 6:40 pm

Well thanks for the positive feedback :)

I sadly have not been able to figure out how to make it do subfolders. In a nutshell this script works by using the solid creating a default solids folder. That means that it will always create it as a base folder in the project window, no matter what you have set as the activeItem.

I had thought it might be able to be gotten around by duplicating the folder but duplicate as well as cut/copy/paste are disabled in the AFX interface so I am assuming they are unavailable by scripting actions.
payal1711
Posts: 12
Joined: August 3rd, 2004, 7:43 pm

Hi,

This is awesome. DefaultFoldersStartup.jsx is the type of feature I was looking for.

Thanks a bunch!

-Payal
User avatar
zlovatt
Posts: 47
Joined: October 31st, 2016, 5:00 pm
Location: Portland
Contact:

Prompting discussion on ae-list, I've rebuilt the DefaultFolders script to work a little bit differently. This way

If installed to ScriptUI Panels, and run via Window > DefaultFolders:
  • You'll see a UI where you can specify folder names, and some buttons.
    "Create" will create folders matching the UI, and save the names you've entered to prefs
    "Reset" will reset the UI names to default
If installed to the Startup or Scripts folder and run on launch (or via File > Scripts):
  • Folders will be created matching saved prefs
Attachments
DefaultFolders v2.0.jsx
(3.4 KiB) Downloaded 1732 times
Post Reply