Skip to content

Commit 8a8c389

Browse files
committed
Improve extrusion error reporting
1 parent cf1be36 commit 8a8c389

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

vpython/vpython.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3788,6 +3788,9 @@ def __init__(self, **args):
37883788
args['color'] = self.vecs_to_list(args, 'color')
37893789
else:
37903790
args['_firstcolor'] = vector(1,1,1)
3791+
for attr in ['scale', 'xscale', 'yscale', 'twist']:
3792+
if attr in args and isinstance(args[attr],list) and len(args[attr]) != self._pathlength:
3793+
raise AttributeError("The "+attr+" list must be the same length as the list of points on the path ("+str(self._pathlength)+").")
37913794

37923795
super(extrusion, self).setup(args)
37933796

0 commit comments

Comments
 (0)