- 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:
Marius Stanciu
2019-12-08 22:11:39 +02:00
committed by Marius
parent facc077493
commit e54dd14e6c
12 changed files with 40 additions and 33 deletions

View File

@@ -52,8 +52,8 @@ class TclCommandSetOrigin(TclCommand):
'main': "Will set the origin at the specified x,y location.",
'args': collections.OrderedDict([
('loc', 'Location to offset all the selected objects. No spaces between x and y pair. Use like this: 2,3'),
('auto', 'If set to 1 it will set the origin to the minimum x, y of the object selection bounding box.'
'-auto=1 is not correct but -auto 1 or -auto True is correct.')
('auto', 'If set to True it will set the origin to the minimum x, y of the object selection bounding box.'
'-auto=True is not correct but -auto 1 or -auto True is correct.')
]),
'examples': ['set_origin 3,2', 'set_origin -auto 1']
}
@@ -68,7 +68,7 @@ class TclCommandSetOrigin(TclCommand):
loc = list()
if 'auto' in args:
if args['auto'] == 1:
if bool(args['auto']) is True:
objs = self.app.collection.get_list()
minx, miny, __, ___ = get_bounds(objs)