ID 349496 - Custom Metadata fields are hidden in the UI on project reopen after running Force Update Shaders

Follow

Problem summary
Custom Metadata fields are hidden in the UI once a project is reopened after using the Force Update Shaders action

Customer reported version
n/a
Customer reported platform
n/a

Steps to reproduce

1) Open Example Head

2) Run the following script in the Python Console which triggers the creation of a new node with custom metadata

my_layer = mari.current.geo().currentChannel().createPaintableLayer("my_layer")
my_layer.layerNode().setMetadata("my_metadata", "hello")
my_layer.setMetadataFlags("my_metadata", my_layer.METADATA_VISIBLE | my_layer.METADATA_SAVED)
3) You should see that a new Layer exists as a merge node in the NodeGraph called 'my_layer'

4) Double click this node to view the Node Properties. There should be a custom metadata attribute called 'my_metadata'

5) Run the following in the Python Console
act=mari.actions.find("/Mari/Layers/Shaders/Force Update Shaders")
act.trigger()
print my_layer.hasMetadata("my_metadata")
6) Note that the custom metadata still exists in the Node Properties UI

7) Save, close and reopen the project

8) The custom metadata attribute no longer displays in the Node's Properties


Workaround
Unknown. 

Reproduced by support
4.0v4 - Windows 7, CentOS 7
4.0v1
3.3v1 - Windows 7, CentOS 7, OSX 10.12.6
3.2v1 - Metadata is hidden as soon as the Force Update Shaders action is run

Earliest version tested

3.1v3 - unable to reproduce due to change in API

Expected behaviour
Metadata should not be removed by the force update shader action

Actual behaviour
Custom Metadata appears to be removed when updating the shader

    We're sorry to hear that

    Please tell us why