Debian Codegraph @

bin/meshroom_submit

raw
1 #!/usr/bin/env python
2 import argparse
3
4 import meshroom
5 meshroom.setupEnvironment()
6
7 import meshroom.core.graph
8
9 parser = argparse.ArgumentParser(description='Submit a Graph of processes on renderfarm.')
10 parser.add_argument('meshroomFile', metavar='MESHROOMFILE.mg', type=str,
11 help='Filepath to a graph file.')
12 parser.add_argument('--toNode', metavar='NODE_NAME', type=str,
13 help='Process the node with its dependencies.')
14 parser.add_argument('--submitter',
15 type=str,
16 default='SimpleFarm',
17 help='Execute job with a specific submitter.')
18 parser.add_argument("--submitLabel",
19 type=str,
20 default='[Meshroom] {projectName}',
21 help="Label of a node in the submitter")
22
23 args = parser.parse_args()
24
25 meshroom.core.initPlugins()
26 meshroom.core.initNodes()
27 meshroom.core.initSubmitters()
28
29 meshroom.core.graph.submit(args.meshroomFile, args.submitter, toNode=args.toNode, submitLabel=args.submitLabel)