[Bf-committers] Setting a default system scripts directory
kwizart at gmail.com
Sat Sep 19 09:23:38 CEST 2009
2009/9/13 Campbell Barton <ideasman42 at gmail.com>:
> Hi, this is an old problem for linux/unix packages and Id like to
> solve this too... some things to think about.
> Should this be limited to scripts? - Might it be better to have the
> whole ~/.blender path scanned elsewhere (would include icons, language
> files, .bfont.ttf), otherwise packages still have to have some way to
> have blender find language files in a place other then the home
> I'd propose one of 4 solutions, some of which have been suggested
> above, and on other occasions.
> 1) Do nothing
> - People packaging blender can have the ".blender" directory installed
> in some directory such as "/usr/share/blender", and use a shell
> wrapper script that copies these files into the home directory on
> startup if it doesn't exist.
That the "interim solution" we have choosen as the Fedora package
maintainer. you can see it implemented here:
(this was sent to the mailing list some time ago).
> - One of the problems with this is when blender is upgraded, the users
> home holder wont be, unless the startup shell script detects versions.
That's indeed a problem, but the version update doesn't matter since
we are using symlinks, nevertheless there is a problem when scritps
disappears from the blender package. (but not in the .blender/scripts
> - If this becomes the recommended method we must have some way to
> support updates. maybe copy to ~/.blender-2.5 (gimp has versions like
> 2) System wide data files (as well as ~/.blender)
> - This boils down to having blender look in a fixed path for data
> files (including scripts)
This is really the way to go IMHO, but you are missing that some
plugin may request write access to save their configuration in
bpydata/config. (LuxRender 0.5 expect that for an example). If the
directory is located in /usr/share/blender, this will not be possible.
Now it is probably easier to always write scripts configuration in
> - PROBLEM, both /usr/share/blender AND /home/User/.blender cant both
> be used at the same time (wont go into details but think this is a
> recipe for disaster).
Probably not at the same time, but user directory can have a higher
priority than system wide setup. If different scripts are named the
same, then the script from ~/.blender/script is chosen at a better
Anyhow, the script given as blender-wrapper is only a workaround for
now. The solution would need to be implemented in the blender binary
More information about the Bf-committers