It's probably a stretch, but maybe someone knows the answer. I'm using Environmental variables in Blender to sync some paths between several machines. It worked fine between several Windows machines + a Mac with High Sierra but on a Mac with Catalina Blender sees my variables only if I run it from Terminal.

I suspect this has something to do with the fact that Catalina uses zsh instead on bash as a default shell but I'm not sure how to fix this. Anyway, when I open Terminal and echo my var I see:

sergeykritskiy@Sergeys-MacBook-Pro ~ % echo $BLENDER_SCRIPTS

my variable is set in ~/.zprofile

If I run Blender normally by clicking the Blender.app icon and try to get this variable from Python Console:

>>> import os
>>> os.environ["BLENDER_SCRIPTS"]
Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
  File "/Applications/Blender.app/Contents/Resources/2.83/python/lib/python3.7/os.py", line 678, in __getitem__
    raise KeyError(key) from None

However if I run blender using a Terminal from /Applications/Blender.app/Contents/MacOS/Blender it sees the variable:

>>> import os
>>> os.environ["BLENDER_SCRIPTS"]

Is there a way for Blender to see the variable when I run it normally?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.