Initial support of single GPU rendering when multiple cards with same name exists
This commit is contained in:
@@ -42,6 +42,10 @@ def configureArgumentParser():
|
||||
parser.add_argument('-n', '--device-name',
|
||||
help="Device name to render on",
|
||||
default="")
|
||||
parser.add_argument('-s', '--device-single',
|
||||
help="Use single device when multiple matches",
|
||||
action='store_true',
|
||||
default=False)
|
||||
parser.add_argument('-v', '--verbose',
|
||||
help="Do verbose logging",
|
||||
action='store_true',
|
||||
@@ -66,6 +70,7 @@ def injectDefaultConfiguration(config):
|
||||
section = {
|
||||
"scenes_dir": os.path.join(root_dir, "scenes"),
|
||||
"device_name": "",
|
||||
"device_single": "False",
|
||||
}
|
||||
config['farm'] = section
|
||||
|
||||
@@ -83,6 +88,8 @@ def injectArgparseConfiguration(config, args):
|
||||
section['device_type'] = args.device_type
|
||||
if args.device_name:
|
||||
section['device_name'] = args.device_name
|
||||
if args.device_single:
|
||||
section['device_single'] = args.device_single
|
||||
|
||||
|
||||
def readConfiguration(args):
|
||||
@@ -323,6 +330,10 @@ def main():
|
||||
ctx.scenes_dir = farm_config['scenes_dir']
|
||||
ctx.device_type = farm_config['device_type']
|
||||
ctx.device_name = farm_config['device_name']
|
||||
if farm_config['device_single'].lower() == "true":
|
||||
ctx.device_single = True
|
||||
else:
|
||||
ctx.device_single = False
|
||||
ctx.image_output_dir = images_output_dir
|
||||
# Don't do any scenes when only querying for system information.
|
||||
if args.system_info:
|
||||
|
Reference in New Issue
Block a user