mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-06-03 03:11:56 +02:00
[ui] Command line option to load the latest project
This commit is contained in:
parent
e972c3d324
commit
9ea478ab6a
1 changed files with 10 additions and 0 deletions
|
@ -148,6 +148,11 @@ Additional Resources:
|
|||
default='',
|
||||
help='Save the created scene to the specified Meshroom project file.'
|
||||
)
|
||||
project_group.add_argument(
|
||||
'-1', '--latest',
|
||||
action='store_true',
|
||||
help='Load the most recent scene.'
|
||||
)
|
||||
|
||||
# Pipeline Options
|
||||
pipeline_group = parser.add_argument_group('Pipeline Options')
|
||||
|
@ -257,6 +262,11 @@ class MeshroomApp(QApplication):
|
|||
args.project = os.path.abspath(args.project)
|
||||
self._activeProject.load(args.project)
|
||||
self.addRecentProjectFile(args.project)
|
||||
elif args.latest:
|
||||
projects = self._recentProjectFiles()
|
||||
if projects:
|
||||
project = os.path.abspath(projects[0]["path"])
|
||||
self._activeProject.load(project)
|
||||
elif getattr(args, "import", None) or args.importRecursive or args.save or args.pipeline:
|
||||
self._activeProject.new()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue