After trying again and again various tests to see what exactly goes on. I found this quirky behavior.
-
Blender’s python distro as invoked from local path
./python.exe
is able to get the update fromos.environ
. -
In Blender, in the command window, perhaps it would update or not, not 100% about when this occurs.
>>> import os
>>> os.environ['BLENDER_EXTRA_SCRIPTS']
So generally:
-
System restart is definitely needed when blender.exe runs from the Explorer (double click). Is a bit terrible in terms of user experience, but at least if all the paths are set once they won’t need to get updated often.
-
No system restart is needed if blender.exe runs from terminal (eg: Powershell)
PS D:\programs\graphics\blender> ./blender.exe
It will immediately retrieve the updatedos.environ
, provided that Blender is closed and Powershell is closed as well. Then invoking blender.exe again in the same way. Perhaps not much of a problem, as many developers might start blender.exe from .bat files with prefixed arguments.