color management global settings, or lack thereof

bmagner888
Enthusiast
Enthusiast

color management global settings, or lack thereof

bmagner888
Enthusiast
Enthusiast

I come from previs land, where we don't render anything and rely on viewport playblasts to generate our output.  As such, color management becomes problematic because Maya's default setting distorts the colors--desaturating and brightening everything that doesn't have a normal map, and making everything with a tangent space normal map look too dark. I'm looking for a global setting to override what's saved with each scene.

For starters, what is the proper mel, or better yet python, command to enable/disable color management?
Secondly, how can I set up a global override to enable/disable/force profiles across any scene file that gets opened?

thanks.

Reply
600 Views
6 Replies
Replies (6)

damaggio
Mentor
Mentor

have you tried saving the legacy settings as xml? ..see in yellow below.

 

https://knowledge.autodesk.com/support/maya/learn-explore/caas/simplecontent/content/using-studio-wi...

Legacy_Color.jpg

bmagner888
Enthusiast
Enthusiast

That's a good idea, but won't that get saved with the scene file?  When you load a scene, won't it load whatever was saved with the scene file?  I'd still have to manually reset it every time.

0 Likes

damaggio
Mentor
Mentor

check the link in my post for additional info. i believe that's what it does.

bmagner888
Enthusiast
Enthusiast

Thanks.  The link helped, and got me to this other link about the environment variables
(although it's specifically for maya 2018):

set the MAYA_COLOR_MANAGEMENT_POLICY_LOCK environment variable to 0
set the MAYA_COLOR_MANAGEMENT_POLICY_LOCK environment variable to 1

"Load and lock a policy using environment variables

You can set the MAYA_COLOR_MANAGEMENT_POLICY_FILE environment variable to the full path and file name of a policy to load it automatically when you launch Maya. When you do this, you can still modify color management preferences and update or export the settings. You can also load a different policy, or even clear the path to unload the policy. The new settings are used for the current session, but the policy specified by the environment variable will be applied again when you relaunch Maya.

If you also set the MAYA_COLOR_MANAGEMENT_POLICY_LOCK environment variable to 1, then you cannot modify the color management preferences, except to toggle the display of color-managed pots or to disable color management in the current scene. The original settings in the policy are reapplied when you start a new scene or open a saved scene."

https://help.autodesk.com/view/MAYAUL/2018/ENU/?guid=GUID-AE1F72ED-FA00-4E81-8027-785E3D6058F7

I'll test it next week and find out if it's the correct solution

damaggio
Mentor
Mentor

I'm not a programmer but maybe one of the guys here will chime in.Good luck.

0 Likes

bmagner888
Enthusiast
Enthusiast

I tried this, and it seems to have worked (re-launch maya and new scene had CM disabled)
First turned off CM in prefs UI and exported an xml file to [user docs path]/maya/2023/prefs/colorManagementOFF.xml;
Then I added these lines to [user]/maya/2023/maya.env

MAYA_COLOR_MANAGEMENT_POLICY_LOCK=1;
MAYA_COLOR_MANAGEMENT_POLICY_FILE=[user docs path]/maya/2023/prefs/colorManagementOFF.xml;

It does report an error that the colorManagementOFF.xml doesn't exist even though it does, which is an annoyance.  Anyway, maya launches without CM.  Open new scene also has CM off, and same for opening existing scene files where it was on in its saved state.

0 Likes