Setting MAYA_COLOR_MANAGEMENT_POLICY_FILE variable once will set it indefinitely

Setting MAYA_COLOR_MANAGEMENT_POLICY_FILE variable once will set it indefinitely

mhamid3d
Enthusiast Enthusiast
402 Views
4 Replies
Message 1 of 5

Setting MAYA_COLOR_MANAGEMENT_POLICY_FILE variable once will set it indefinitely

mhamid3d
Enthusiast
Enthusiast

I have a specialized environment for which is run sometimes that and in this environment I am setting MAYA_COLOR_MANAGEMENT_POLICY_FILE to a file and enabling MAYA_COLOR_MANAGEMENT_POLICY_LOCK. Problem is when I run Maya without any of these variables after, the policy file is still being read and it appears the color policy is locked.

 

Is there a way to prevent this from being saved in the defaults? 

0 Likes
403 Views
4 Replies
Replies (4)
Message 2 of 5

lee.dunham
Collaborator
Collaborator
From memory, setting an environment from a Maya instance should only be saved for that instance, but there would be differences in behaviour depending on how you set it - do you have a code example?
Also remember, if you spawn any additional Maya instances, it'll use a copy of the current environment (unless you provide otherwise).
Message 3 of 5

mhamid3d
Enthusiast
Enthusiast

Hi Lee,

Thats the behavior I was expecting but for this specific variable it’s being set in the prefs permanently.

 

Basically in a .bat file I do

 

set MAYA_COLOR_MANAGEMENT_POLICY_FILE=“my/policy/file.cfg”

 

I run the bat, works as expected. Close Maya, this time run it from the Taskbar or directly from maya.exe, go to color management prefs and see that that policy file is still loaded. Even in the maya prefs folder you can find references to that file.

 

0 Likes
Message 4 of 5

lee.dunham
Collaborator
Collaborator

Have you checked you haven't accidentally set system or user environment variables? Just to check the OS environment variable editor

Message 5 of 5

mhamid3d
Enthusiast
Enthusiast
I’m sure the variable is not set. I confirm by querying the variable in the
python interpreter in Maya. Also this reproducible.
0 Likes