- fixed some bugs in the Tcl Commands

- modified the Tcl Commands to be able to use as boolean values keywords with lower case like 'false' instead of expected 'False'
This commit is contained in:
Marius Stanciu
2020-04-22 14:37:03 +03:00
committed by Marius
parent f690c2b09d
commit 66d9ddd402
14 changed files with 178 additions and 120 deletions

View File

@@ -37,7 +37,7 @@ class TclCommandPanelize(TclCommand):
('spacing_rows', float),
('box', str),
('outname', str),
('run_threaded', str)
('use_thread', str)
])
# array of mandatory options for current Tcl command: required = {'name','outname'}
@@ -55,7 +55,7 @@ class TclCommandPanelize(TclCommand):
('columns', 'Number of columns.'),
('rows', 'Number of rows;'),
('outname', 'Name of the new geometry object.'),
('run_threaded', 'False (0) = non-threaded execution or True (1) = threaded execution')
('use_thread', 'False (0) = non-threaded execution or True (1) = threaded execution')
]),
'examples': [
'panelize obj_name',
@@ -113,8 +113,12 @@ class TclCommandPanelize(TclCommand):
else:
outname = name + '_panelized'
if 'run_threaded' in args:
threaded = bool(eval(args['run_threaded']))
if 'use_thread' in args:
try:
par = args['use_thread'].capitalize()
except AttributeError:
par = args['use_thread']
threaded = bool(eval(par))
else:
threaded = False