ID 235129 - Parameter’s Value Mode can’t be switched to Constant from Curve that has no keyframes

Follow

Problem summary
When a parameter has its Value Mode set to Curve, but all keyframes have been deleted from the curve, the Value Mode can’t be set to Constant. It will remain in Curve mode and the parameter’s background colour stays green. The Value Mode can only be switched back to Constant after a keyframe has been added to the curve.
 
Steps to reproduce
  1. Add a CameraCreate node and set a key on the fov parameter.
  2. Look at the curve in the Curve Editor and delete the keyframe you just set. The parameter value changes to 0.
  3. Right-click on the fov parameter and under Value Mode choose Constant. The parameter’s visual appearance doesn’t change, and right-clicking on it again shows that the Value Mode is still set to Curve.
  4. Set a new keyframe on the parameter.
  5. Right-click and set Value Mode to Constant. This time the parameter’s background colour changes to grey and the right Value Mode is set.
Workaround
Set a key on the empty curve first, then switch Value Mode to Constant.
 
Reproduced by support
Reproduced 1.6v3, 2.0v1+5, 2.1v1+4, 2.5v1+3 RHEL 6.6
2.5v1+3 Windows 7
 
Expected behaviour
A parameter that has Value Mode set to Curve should be allowed to go back to Constant mode even when the curve has no keyframes.
 
Actual behaviour
The curve has to have at least one keyframe before the parameter Value Mode can be switched from Curve to Constant

    We're sorry to hear that

    Please tell us why