ID 523865 - Session Scripts can stop working when Bake Points are present

Follow

Problem summary
Session Scripts can stop working when Bake Points are present
 
This issue seems to occur when Bake Points are connected to Over inputs of a Merge in a Channel. Errors are returned in the Python Console after attempting to open File > Session > Export Session or File > Session > Import <Component> dialogs. Errors are also returned if you try to instance a GeoEntity using the Session Scripts API.
 
Customer reported version
Mari 5.0v4
 
Customer reported platform
Linux
 
Steps to reproduce
 
1) Open any project

2) Create a Bake Point node

3) Connect it to the Over input of a Merge node, then connect that to a Channel node like below:
 


 
4) Click File > Session > Export Session, notice that no dialog appears
 
5) Check the Python Console
 
6) Run the following in the Console: sessionGeo = mari.session.types.GeoEntity.fromSelected()
 
Expected behaviour
The Session Export UI should appear in step 4, no errors should be returned in the Python Console.
 
Actual behaviour
The Session Export UI does not appear, and ValueErrors are returned in the Console for both steps 4 and 6:
 

>>> sessionGeo = mari.session.types.GeoEntity.fromSelected() Traceback (most recent call last):   File "<string>", line 1, in <module>   File "C:/Program Files/Mari5.0v4/Bundle/Media/Scripts\Mari\session\types\geo_entity.py", line 716, in fromSelected     return cls.fromMariObject(mari.geo.current(), parent=None)   File "C:/Program Files/Mari5.0v4/Bundle/Media/Scripts\Mari\session\types\geo_entity.py", line 669, in fromMariObject     channel.instantiateChildren()   File "C:/Program Files/Mari5.0v4/Bundle/Media/Scripts\Mari\session\types\channel.py", line 408, in instantiateChildren     LayerStack.instantiateChildren(self)   File "C:/Program Files/Mari5.0v4/Bundle/Media/Scripts\Mari\session\types\layer_stack.py", line 152, in instantiateChildren     Layer.fromMariObject(mariLayer, parent=self)   File "C:/Program Files/Mari5.0v4/Bundle/Media/Scripts\Mari\session\types\layer.py", line 400, in fromMariObject     return ProceduralLayer.fromMariObject(mariObject, parent)   File "C:/Program Files/Mari5.0v4/Bundle/Media/Scripts\Mari\session\types\procedural_layer.py", line 186, in fromMariObject     layer.getParameter(mariObject.getProceduralParameter(proceduralParameter)) ValueError: Cannot find parameter 'FilteredImageSet'
 
Workaround
Enabling and then disabling the Filter Baked Patches checkbox in each Bake Point's Filters properties seems to prevent the error and Session dialogs will then appear. 
 
Reproduced by support
This bug has been reproduced in:
Mari 5.0v4 - Windows 10 - CentOS 7.9
Mari 4.8v2 - Windows 10 - CentOS 7.9 - regression
 
Unable to reproduce bug in:
Mari 4.8v1 - Windows 10 - CentOS 7.9
 
Earliest version tested
Mari 4.8v1 - This issue doesn't appear in this version and has regressed
 

    We're sorry to hear that

    Please tell us why