ID 269312 - Nuke only serialises a knob if it's not at its default value

Follow

Problem summary
Nuke only serialises a knob if it's not at its default value

Customer reported version
nuke.10.5v1

Customer reported platform
windows7

Steps to reproduce

1) Compile and run the "LayerExtractor" sample, available from: https://www.thefoundry.co.uk/products/nuke/developers/105/ndkreference/examples/LayerExtractor.cpp

2) Install the plugin and open Nuke

3) Create a Checkerboard node and attach a LayerExtractor node

4) Select the first layer in the list and save -> "selected_layer" doesn't appear in the serialization of "LayerExtractor".

5) Select any other layer in the list and save -> something like "selected_layer {{1} rgba.red rgba.green rgba.blue}" will appear in the serialization of "LayerExtractor"

Reproduced by support
This was reproduced by developers when testing the Enumeration Knobs

Expected behaviour
The menu items should always be saved to the script if the "Knob::SAVE_MENU" flag is set.

Actual behaviour
If the selected item is the index "0", the menu items are not saved to the script.

    We're sorry to hear that

    Please tell us why