State:Closed|icon_bug|database:public|icon_mari|Resolution:Fixed|TargetRelease:4.7v1|BugID:275259|
Problem summary
Python API does not handle FileList correctly so we are unable to set the MARI_CACHE location via Python once Mari has already started. This also affects areas such as paths for Shaders and HDR in the Preferences Dialog.
Customer reported version
3.2v1
Customer reported platform
Centos6, Linux
Steps to reproduce
1) Run one of the following tests in Mari (both are similar but affect different areas for clarity)
p = mari.prefs.get("Data/Project/projectLocation")
print "!!!!!BEFORE!!!!!!!!!!",p.pickedFile(),"#########",p.at(0)
p.clear()
p.append("/tmp/mytestdir")
p.setPickedFile("/tmp/mytestdir")
print "!!!!!MIDDLE!!!!!!!!!!",p.pickedFile(),"#########",p.at(0)
mari.prefs.set("Data/Project/projectLocation",p)
p = mari.prefs.get("Data/Project/projectLocation")
print "!!!!!AFTER!!!!!!!!!!",p.pickedFile(),"#########",p.at(0),
or
current_paths = mari.prefs.get('/Paths/Shaders/shaderModuleDirectories')
path_to_add = 'C:/My/Path/To/My/Shaders/'
current_paths.append(path_to_add)
mari.prefs.set('/Paths/Shaders/shaderModuleDirectories', current_paths)
Workaround
On Linux, instead, we would suggest writing a wrapper script for running Mari that modifies the location of the Cache directory (or your chosen variable) for you, such as below:
=========================================
#! /bin/bash
export MARI_CACHE="/path/to/the/desired/directory"
/path/to/mari
=========================================
Reproduced by support
Confirmed by developers in house - 3.2v1.
Expected behaviour
This should change the project location for Mari. We should be able to modify all directory Paths (Shaders, HDRs etc) using this method and have the UI preferences dialog update correctly.
Actual behaviour
The project location or directory locations for Mari does not change
We're sorry to hear that
Please tell us why