ID 525625 - Export Manager can fail to open if a project contains a custom Shader Model that has not been registered

Follow

Problem summary
Export Manager can fail to open if a project contains a custom Shader Model that has not been registered
 
Customer reported version
Mari 5.0v4
 
Customer reported platform
Linux
 
Steps to reproduce
 
1) Open any project

2) Download the attached Shader XML and register it e.g.

mari.gl_render.registerCustomStandaloneShaderFromXMLFile("test shader", "/path/to/CustomStandaloneShader.xml"

3) Create a Multi-Channel Bake Point using the Custom Shader Model ("test shader" if the command above was used to register it)
 
4) Create a Shader node using the Custom Shader Model (e.g. "test shader (Shader Network)" and connect the MCBP
 
5) Open the Export Manager and switch to USD Export tab
 
6) Select the Custom Shader as the USD Export Shader for the Object (e.g. "test shader")
 
7) Save the project and restart Mari
 
8) Load the project
 
9) Try to open the Export Manager
 
Expected behaviour
The Export Manager should open.
 
Actual behaviour
The Export Manager does not open, and an error is returned in the Python Console:
 

Traceback (most recent call last):   File "<string>", line 1, in <module>   File "C:/Program Files/Mari5.0v4/Bundle/Media/Scripts\Mari\system\batch_export_dialog.py", line 1700, in showExportDialog     dialog = ExportDialog()   File "C:/Program Files/Mari5.0v4/Bundle/Media/Scripts\Mari\system\batch_export_dialog.py", line 1019, in __init__     self.addTabWidgets()   File "C:/Program Files/Mari5.0v4/Bundle/Media/Scripts\Mari\system\batch_export_dialog.py", line 1042, in addTabWidgets     tab_widget = tab_widget_callback()   File "C:/Program Files/Mari5.0v4/Bundle/Usd\lib\python\mariUsd\usdExportManagerTab.py", line 1298, in generate_usd_export_widget     return USDExportWidget()   File "C:/Program Files/Mari5.0v4/Bundle/Usd\lib\python\mariUsd\usdExportManagerTab.py", line 982, in __init__     self.on_shader_assignment_changed(None)   File "C:/Program Files/Mari5.0v4/Bundle/Usd\lib\python\mariUsd\usdExportManagerTab.py", line 1112, in on_shader_assignment_changed     new_rows = self.export_item_model.update_shader_items(selected_shaders)   File "C:/Program Files/Mari5.0v4/Bundle/Usd\lib\python\mariUsd\usdExportManagerTab.py", line 537, in update_shader_items     self.updateShaderInputs(shader_item)   File "C:/Program Files/Mari5.0v4/Bundle/Usd\lib\python\mariUsd\usdExportManagerTab.py", line 575, in updateShaderInputs     new_shader_input_infos = self._advancedInputList(shader)   File "C:/Program Files/Mari5.0v4/Bundle/Usd\lib\python\mariUsd\usdExportManagerTab.py", line 548, in _advancedInputList     shader_model_input = shader_model.input(input_name) AttributeError: 'NoneType' object has no attribute 'input'
 
Workaround
Unknown.
 
Reproduced by support
This bug has been reproduced in:
Mari 5.0v4 - Windows 10 - CentOS 7.9
Mari 5.0v1 - Windows 10
 
Earliest version tested
Mari 5.0v1 - This feature did not exist before this version
 
 

    We're sorry to hear that

    Please tell us why