Skip to content

Commit e493ee2

Browse files
committed
BF: Fix polygon vertices each frame/repeat setting
1 parent 1e0b107 commit e493ee2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

psychopy/experiment/components/polygon/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def __init__(self, exp, parentName, name='polygon', interpolate='linear',
7575
self.params['nVertices'] = Param(
7676
nVertices, valType='int', inputType="single", categ='Basic',
7777
updates='constant',
78-
allowedUpdates=['constant'],
78+
allowedUpdates=['constant', 'set every repeat', 'set every frame'],
7979
hint=msg,
8080
label=_localized['nVertices'])
8181

@@ -156,11 +156,11 @@ def writeInitCode(self, buff):
156156
inits['size'].val = '[1.0, 1.0]'
157157

158158
if self.params['shape'] == 'regular polygon...':
159-
vertices = self.params['nVertices']
159+
vertices = inits['nVertices']
160160
elif self.params['shape'] == 'custom polygon...':
161-
vertices = self.params['vertices']
161+
vertices = inits['vertices']
162162
else:
163-
vertices = self.params['shape']
163+
vertices = inits['shape']
164164
if vertices in ['line', '2']:
165165
code = ("%s = visual.Line(\n" % inits['name'] +
166166
" win=win, name='%s',%s\n" % (inits['name'], unitsStr) +

0 commit comments

Comments
 (0)