I can't seem to get this working after logout/restart and the documentation points somewhere else which then points somewhere else, and so on.
I'm on macOS 11.1 with C4D r23.008 and C4DtoA 3.2.0.1
Tried EnvPane which modifies ~/.MacOSX/environment.plist and is recognised by using $OCIO in the Config path. Uninstalling EnvPane leaves the modified .plist in place. C4DtoA recognizes $OCIO for the config and gives options in the color space drop downs before logout but not after. Since EnvPane is only modifying that file it seems strange that C4DtoA won't recognize the config file after logout. Reinstalling EnvPane brings this all back to life without having the reenter the environment variable. There has to be a way to set this without the need for EnvPane to be installed.
Google recommends modifying .bash_profile, .zshenv or .zshprofile ( as of Catalina ), which returns a value when using echo $OCIO, but C4DtoA never recognized the config file.
It would be helpful for us Mac users to have a simple, straight forward, end-to-end guide in the documentation ( or even a response in this thread for future users ) of how to set this up, similar to what's already there for Windows users.
Edit : After some research it seems like most methods of setting an environment variable aren't persistent and don't survive a reboot. Methods using launchctl or anything similar require them to be manually reinitiated every launch. Other methods using .zsh only work for terminal apps and not gui apps. The reason EnvPane works beyond reboot is it runs a separate launchd agent at login to load the settings stored in ~/.MacOSX/environment.plist using launchctl calls, and again if the preference pane is updated. Don't know why Apple makes this so difficult, but moral of the story is just use EnvPane. UI is almost identical to Windows. Install for user only on Big Sur, not all users.
Solved! Go to Solution.
Solved by Stephen.Blair. Go to Solution.
Part of EnvPane is a launch daemon that processes environment.plist.
If you remove EnvPane, you remove support for setting those environment variables when you log out or restart.
There is no simple way to set environment variables on macOS.
Using a launch daemon is the only way.
You answer appeared right after submitting the edit. Can confirm EnvPane is the only real solution to the nightmare that is environment variables in macOS.
You can install a LaunchDaemon to set OCIO for all users.
You can use the attached plist file (remove the .txt)
sudo cp ~/Downloads/setenv.OCIO.plist /Library/LaunchDaemons
# you may want to check the permissions and ownership on the file
# make sure this plist has the same permissions as other plist files in /Library/LaunchAgents
sudo launchctl load /Library/LaunchDaemonAgents/setenv.OCIO.plist