ID 523616 - Using entityNodeGraphs=None in mari.session.utils.ExportSession() returns an error

Follow

Problem summary
Using entityNodeGraphs=None in mari.session.utils.ExportSession() returns an error
 
Customer reported version
Mari 5.0v4
 
Customer reported platform
Linux
 
Steps to reproduce
 
1) Open an Example Project
 
2) Run the following snippet in the Python Console (replace the exportDir path with a valid path):

project = mari.session.types.Project.fromSession()exportDir = "C:/tmp"mari.session.utils.ExportSession(project, exportDir, geoEntities=None, geoPatches=None, entityNodeGraphs=None).start()
 
Expected behaviour
Either
The mari.session.utils.ExportSession() Python documentation should list this as a valid argument without typos, and the project should be exported as a session with all Node Graphs included in the export.
Or
The mari.session.utils.ExportSession() Python documentation should not list this as a valid argument.
 
Actual behaviour
An error is returned:
>>> project = mari.session.types.Project.fromSession() ... exportDir = "C:/tmp" ... mari.session.utils.ExportSession(project, exportDir, geoEntities=None, geoPatches=None, entityNodeGraphs=None).start() Traceback (most recent call last):   File "<string>", line 3, in <module>   File "C:/Program Files/Mari4.8v1/Bundle/Media/Scripts\Mari\session\utils\export_session.py", line 427, in start     if entity in self.entityNodeGraphs: TypeError: argument of type 'NoneType' is not iterable
 
The mari.session.utils.ExportSession() Python documentation lists this as a valid argument, but contains a typo - projectors instead of entityNodeGraphs - unless this should not be listed as a valid argument at all:

  • entityNodeGraphs - ([mari.EntityNodeGraph|mari.session.types.EntityNodeGraph]) A list of EntityNodeGraph objects to include in the dict. By default no entityNodeGraphs are included. If None is used all projectors are included. Defaults to []
 
Workaround
Unknown.
 
Reproduced by support
This bug has been reproduced in:
Mari 5.0v4 - Windows 10 - CentOS 7.9
Mari 4.8v1 - Windows 10
Mari 4.7v1 - Windows 10
Mari 4.5v1 - Windows 10
Mari 3.2v1 - Windows 10 - CentOS 7.9
 
Earliest version tested
Mari 3.2v1 - This feature did not exist before this version
 
 

    We're sorry to hear that

    Please tell us why