Manage a Project
Creating a project
Use Autograph.Application.createProject() to create a new empty Project .
A background project is useful to perform background rendering without any user interface.
Once created, the project is in an unsaved state. You can save it with Autograph.Project.save() .
To reset the project to a default empty state, call Autograph.Project.close() .
You can load a project state from an Autograph project file (.agp), call Autograph.Project.open() .
Note
Since the Application can have multiple projects opened concurrently, you may find useful to retrieve the project actively focused by the user with Autograph.Application.getActiveProject() .
Managing project items
Project Items are any elements that you can find in the Project panel in the UI, such as:
Media reader
USD asset reader
CSV reader
Folder
3D Scene
Composition
The Project class offer various functions to create these ProjectItem .
For example, Autograph.Project.importFootage(filePath)() can be used to create a media reader:
project=Autograph.app.getActiveProject()
myFootage=project.importFootage('/media/myfiles/video.mov')
myFootage.setDisplayName('My Footage')
Creating an empty Composition
project=Autograph.app.getActiveProject()
comp=project.createComposition()
Reacting to project events
You can register Python callable objects to react to the following events of the project:
Autograph.Application.onProjectAboutToClose(): Signature must be: callback(project)
Autograph.Application.onProjectAboutToLoad(): Signature must be: callback(project, filePath)
Autograph.Application.onProjectLoaded(): : Signature must be: callback(project)
Autograph.Application.onProjectCreated(): : Signature must be: callback(project)