Add support of overriding scenes list
This commit is contained in:
@@ -32,10 +32,10 @@ def configureArgumentParser():
|
||||
parser.add_argument("-d", "--scenes-dir",
|
||||
help="Directory with scenes",
|
||||
default="")
|
||||
# parser.add_argument('-s', '--scenes',
|
||||
# nargs='+',
|
||||
# help='Scenes to be rendered',
|
||||
# default=[])
|
||||
parser.add_argument('-c', '--scenes',
|
||||
nargs='+',
|
||||
help='Scenes to be rendered',
|
||||
default=[])
|
||||
parser.add_argument('-t', '--device-type',
|
||||
help="Type of the device to render on",
|
||||
default="")
|
||||
@@ -68,6 +68,7 @@ def injectDefaultConfiguration(config):
|
||||
"""
|
||||
root_dir = util.getBundleRootDirectory()
|
||||
section = {
|
||||
"scenes": "",
|
||||
"scenes_dir": os.path.join(root_dir, "scenes"),
|
||||
"device_name": "",
|
||||
"device_single": "False",
|
||||
@@ -82,6 +83,8 @@ def injectArgparseConfiguration(config, args):
|
||||
section = config['farm']
|
||||
if args.blender:
|
||||
section['blender'] = args.blender
|
||||
if args.scenes:
|
||||
section['scenes'] = ",".join(args.scenes)
|
||||
if args.scenes_dir:
|
||||
section['scenes_dir'] = args.scenes_dir
|
||||
if args.device_type:
|
||||
@@ -338,6 +341,9 @@ def main():
|
||||
# Don't do any scenes when only querying for system information.
|
||||
if args.system_info:
|
||||
ctx.scenes = []
|
||||
else:
|
||||
if farm_config['scenes']:
|
||||
ctx.scenes = farm_config['scenes'].split(",")
|
||||
else:
|
||||
ctx.scenes = ctx.listAllScenes(ctx.scenes_dir)
|
||||
# Print prelmiinary information.
|
||||
|
Reference in New Issue
Block a user