ID 535496 - Setting Mari Preference Paths via Python on Startup creates empty or 0 values in the ShaderNetworkManager section of the Mari config

Follow

Problem summary
Setting Mari Preference Paths via Python on Startup creates empty or 0 values in the ShaderNetworkManager section of the Mari config
 
When the Grid High and Width are set to 0, this then causes Mari to crash when you enable the Grid in the Node Graph
 
This happens when setting different preferences like, 'Data/Autosave/autosaveInterval', 'Node Graph/Grid/gridHeight' and 'Paths/Environments/environmentDirectories'
 
Customer reported version
mari.6.0v1
 
Customer reported platform
 
Steps to reproduce
 
1) Remove your Mari<version>.ini/.conf file from your Mari directory

2) In your Mari/Scripts directory, make a new file called test.py

3) In the test.py file, add the following code and save the file:
 
import marimari.prefs.set('Data/Autosave/autosaveInterval',15)
 
4) Open Mari
 
5) Open Edit>Preferences>Node Graph and check the Grid Height and Grid Width, they will be set to 0.
 
6) Open your new Mari<version>.ini/.conf file and check the [ShaderNetworkManager] group, many values will be empty and gridHeight and gridWidth will be 0:
 
 
*This also happens when setting other preferences, for example using either of these two set of Python code: 
 
import mari
fileList = mari.prefs.get('Paths/Environments/environmentDirectories')mari.prefs.set('Paths/Environments/environmentDirectories',fileList)

 or
 
import marimari.prefs.set('Node Graph/Grid/gridHeight',15)
Expected behaviour
For the default values to be set correctly:
 

 
Actual behaviour
Incorrect values are set, which in the case of gridHeight and gridWidth, can cause a crash when enabling the Grid in the Node Graph
 
Workaround
Unknown. 
 
Reproduced by support
This bug has been reproduced in:
Mari 6.0v1 - Windows 10, CentOS 7.9
Mari 5.0v2 - Windows 10, CentOS 7.9 - regression in 5.0 line
Mari 4.8v2 - Windows 10, CentOS 7.9 - regression in 4.8 line
 
Unable to reproduce bug in:
Mari 5.0v1 - Windows 10, CentOS 7.9
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