Skip to main content

Pr Project

These blocks allow you to work with Premiere Pro projects. Open, save and close projects, import footage into a project, iterate over project items, and more.

Accessing a Particular Project

Usually, you do all your actions on the active project. However, Premiere Pro supports having multiple projects open at the same time, and Automation Blocks can also perform operations on the other currently open projects. Instead of active project, you can use one of the following methods to explicitly use another project (note that this only works with projects that are already open in Pr):

  • use a text block with the name of the project: myProject.prproj

  • use a block that represents a project item, sequence, or clip within a sequence. If these are used in a context where a project is expected, they will be converted to the project that contains the project item, sequence or clip.

  • you can iterate over all open projects with the For All Open Projects block, to do something with each of them.

Active Project

Block pr_project_active_project

Represents the currently active project (this is used in other blocks that do something with a particular project - like opening or saving it).

Create Project Bin

Block pr_project_item_create_bin

This block creates a new bin in the project. In the example above, the bin with name subbin is created inside the bin with name bin. If bin does not exist yet, it is also created.

Block pr_project_item_create_bin

This example also creates the bin subbin inside the bin bin, but this time, if bin does not exist yet, the script stops with an error. Note that this time it will also search for a bin with the name bin inside all sub-bins of the project if it does not find it in the root bin (see Accessing a Particular Project Item for details of all possibilities to specify a parent bin).

Import File(s)

Block block_pr_project_import_file

Imports a single file or a list of files into the given project bin. If you import a lot of files, it is best to put them all into a list and then import them with a single call of this block. This is much faster than importing each file separately.

If you import images, you can

  • import as normal footage: if there is an image in your list of files to import, it just imports that single image
  • import as image sequence: if there is an image in your list of files to import, it assumes that it is the first image of an image sequence and imports the entire sequence as a single project item.
Syncing folders

If you want to import all the files in a particular folder, the Sync Folder with Project Bin Block is the most powerful and convenient choice.

Import Ae Comps

Block pr_project_import_ae_comps

This block imports the After Effects compositions from the given After Effects project file (.aep file) into the given project bin.

Import Comps By Name

If you choose comps by name instead of all comps, you can provide a list of the names of the comps you want to import (or also just a single name). The following example imports comps with names first comp name, second comp nameand third comp name:

Import Comps Example
Import in a single call

If you want to import a lot of comps, it's better to put them in a list and import them all at once. This will be faster than calling the block several times with different comp names.

Sync Folder with Project Bin

Block block_pr_sync_project_bin_with_folder

This block imports all files from the chosen folder into the given bin of your Premiere Pro Project. Even better: it checks if some of these files have already been imported into that bin before and if so, it does not import them a second time. So whenever you add some new files to the folder, you can run the block again to import only the new files.

If the bin does not exist in your project yet, it will be created.

subfolders

Here you have three options:

  • include: imports all footage from the folder and all sub-folders (and creates corresponding subbins in the project as needed)
  • exclude: imports only the footage in the folder, but no footage from sub-folders
  • flatten: imports all footage from the folder and all sub-folders but does not create subbins in the project. Instead, all project items are placed directly in the given bin. If you have footage files with identical names in different sub-folders, this may result in several project items with the exact same name (in the exact same bin).

image sequence

If you enable this option, the block detects image sequences in the folder and imports them as a single video file. Other images that are not part of an image sequence are still imported as a single image file (and not as a sequence with just a single frame). If you disable this option, all images are imported as a separate project item.

delete other items

With this option, all project items that have no corresponding file in the folder anymore are deleted from the project. This is useful if you deleted files in the folder and want to get rid of the corresponding project items. But be careful: This also deletes sequences and other project items in the bin which have no file associated with them.

suppress warning dialogs

Enable this only in fully automated scenarios where you want to avoid any user interaction.

Don't Sync Root Bin

It is good practice to always sync with a subbin of your project and not the root bin \: Since your project also contains other items like sequences (which have no corresponding file on your hard-drive), these would be lost if you sync with the delete other items option enabled.

Project Name

Block block_pr_project_name

This block returns the filename of the given project. It returns either the full name like myProject.prproj or, if you choose the option without extension, the name without the file suffix, i.e. just myProject.

By default, the block uses the active project. See Accessing a Particular Project for how to use another currently open project instead.

Project File

Block block_pr_project_file

This block returns the project file of the given project. Since in Automation Blocks files are simply represented by the full file path on your hard-drive, the result is a text containing that path.

By default, the block uses the active project. See Accessing a Particular Project for how to use another currently open project instead.

Project Folder

Block block_pr_project_folder

This block returns the full path of the folder on your hard-drive, where the given project file is located. This is the same as the Project File but without the Project Name at the end.

By default, the block uses the active project. See Accessing a Particular Project for how to use another currently open project instead.

New Project

Block pr_project_open

Creates a new Premiere Pro project file - please provide the path of the project file as argument. The block will give an error if the file path has a different file extension than ".prproj". If the path has no file extension at all, the extension ".prproj" will be added.

allow to overwrite if file exists

If this option is enabled, the block deletes the project file before creating a new one. If the option is disabled, the block gives an error if the project file already exists.

create folder if not existing

If this option is enabled, the block creates the folder on your hard-drive where the project should be located (and its parent folders) if needed. If the option is disabled, the block gives an error if the folder does not exist yet.

See Accessing a Particular File for all the ways to specify a file.

Open Project

Block pr_project_open

Opens the given Premiere Pro project file (must be a .prproj) file.

See Accessing a Particular File for all the ways to specify a file.

Save Project

Block pr_project_save

Saves the given project.

By default, the block uses the active project. See Accessing a Particular Project for how to use another currently open project instead.

Save Project As

Block pr_project_save_as

Saves the given project to a new file.

allow to overwrite

If this option is not enabled, the script stops with an error if the project file already exists.

create folder if not existing

With this option, you can save the project to a new folder that does not exist yet. The block will create the folder where the project file is located (and any parent folder thereof) if needed, before actually saving the project.

See Accessing a Particular File for all the ways to specify a project file.

By default, the block uses the active project. See Accessing a Particular Project for how to use another currently open project instead.

Close Project

Block pr_project_close

This block closes the given project.

By default, the block uses the active project. See Accessing a Particular Project for how to use another currently open project instead.

For Each Open Project

Block block_pr_for_all_open_projects

This block iterates over all projects that are currently open in Premiere Pro. The blocks you nest inside this block are executed once for each open project. During the execution of these blocks, the project itself is saved in the variable my project.

For an example of how to use this block, see the script save and close all projects except active one.

Set Scratch Disk Path

Block pr_project_set_scratch_disk_path

Allows you to set the scratch disk paths for the project, which you would manually change with the Premiere Pro menu command File->Project Settings->Scratch Disks... in this dialog:

Scratch Disks Dialog

The available scratch disks you can set are

  • Captured video
  • Captured audio
  • Video Previews
  • Audio Previews
  • Project Auto Save
  • CC Libraries Downloads
  • Motion Graphics Template Media