- updated Tcl commands to make use of either 0 or False for False value or 1 or True for True in case of a parameter with type Bool
This commit is contained in:
@@ -34,7 +34,7 @@ class TclCommandPanelize(TclCommand):
|
||||
('spacing_rows', float),
|
||||
('box', str),
|
||||
('outname', str),
|
||||
('threaded', int)
|
||||
('run_threaded', bool)
|
||||
])
|
||||
|
||||
# array of mandatory options for current Tcl command: required = {'name','outname'}
|
||||
@@ -52,7 +52,7 @@ class TclCommandPanelize(TclCommand):
|
||||
('columns', 'Number of columns.'),
|
||||
('rows', 'Number of rows;'),
|
||||
('outname', 'Name of the new geometry object.'),
|
||||
('threaded', '0 = non-threaded || 1 = threaded')
|
||||
('run_threaded', 'False = non-threaded || True = threaded')
|
||||
]),
|
||||
'examples': []
|
||||
}
|
||||
@@ -93,23 +93,23 @@ class TclCommandPanelize(TclCommand):
|
||||
else:
|
||||
outname = name + '_panelized'
|
||||
|
||||
if 'threaded' in args:
|
||||
threaded = args['threaded']
|
||||
if 'run_threaded' in args:
|
||||
threaded = bool(args['run_threaded'])
|
||||
else:
|
||||
threaded = 0
|
||||
threaded = False
|
||||
|
||||
if 'spacing_columns' in args:
|
||||
spacing_columns = args['spacing_columns']
|
||||
spacing_columns = int(args['spacing_columns'])
|
||||
else:
|
||||
spacing_columns = 5
|
||||
|
||||
if 'spacing_rows' in args:
|
||||
spacing_rows = args['spacing_rows']
|
||||
spacing_rows = int(args['spacing_rows'])
|
||||
else:
|
||||
spacing_rows = 5
|
||||
|
||||
rows = args['rows']
|
||||
columns = args['columns']
|
||||
rows = int(args['rows'])
|
||||
columns = int(args['columns'])
|
||||
|
||||
xmin, ymin, xmax, ymax = box.bounds()
|
||||
lenghtx = xmax - xmin + spacing_columns
|
||||
@@ -277,7 +277,7 @@ class TclCommandPanelize(TclCommand):
|
||||
self.app.progress.emit(50)
|
||||
self.app.new_object("geometry", outname, job_init_geometry, plot=False, autoselected=True)
|
||||
|
||||
if threaded == 1:
|
||||
if threaded is True:
|
||||
proc = self.app.proc_container.new("Generating panel ... Please wait.")
|
||||
|
||||
def job_thread(app_obj):
|
||||
|
||||
Reference in New Issue
Block a user