Problem situation was in Field Fitter Step; the timekeeper setTime wasn't getting through and all times returned the range for time 0:
with ChangeManager(scene):
# add data field and spectrum to some graphics
for time in reversed(times):
timekeeper.setTime(time)
result, vMin, vMax = scene.getSpectrumDataRange(Scenefilter(), defaultSpectrum, componentCount)
if componentCount > 1:
vMin = vMin[0]
vMax = vMax[0]
if minFieldValue is None:
minFieldValue = vMin
maxFieldValue = vMax
else:
if vMin < minFieldValue:
minFieldValue = vMin
if vMax > maxFieldValue:
maxFieldValue = vMax
spectrumcomponent = defaultSpectrum.getFirstSpectrumcomponent()
spectrumcomponent.setRangeMinimum(minFieldValue)
spectrumcomponent.setRangeMaximum(maxFieldValue)
Workaround is to put the for-time loop outside the ChangeManager.
Problem situation was in Field Fitter Step; the timekeeper setTime wasn't getting through and all times returned the range for time 0:
Workaround is to put the for-time loop outside the ChangeManager.