Script DAT setup parameters not working?

TD 2017.16620 windows 10

This is my script DAT callback:

[code]def onSetupParameters(scriptOp):

scriptOp.destroyCustomPars()

page = scriptOp.appendCustomPage('Custom')
p = page.appendFloat('Valuea', label='Value A')

p[0].val = 4
p[0].default = 5

scriptOp.par.Valuea.val = 6
scriptOp.par.Valuea.default = 7
return[/code]

After pulsing setup parameters, I expect Valuea to be 6, and if not 6, perhaps 4. For some reason it’s 22. Is this a bug?
script_dat_setup_parameters.1.toe (4.1 KB)

Hi David.
The values are automatically being preserved between setup calls for convenience.

In your case, you’re modifying the current value explicitly in that call, which we’re not accounting for.

We’ll work on a fix.
Cheers.