[Bf-committers] python api - bpy.utils change to return custom scripts first

Campbell Barton ideasman42 at gmail.com
Fri Dec 10 00:44:48 CET 2010

On Thu, Dec 9, 2010 at 6:08 PM, Micael <kam1kaz3 at gmail.com> wrote:
> Hi everyone.
> This is the first time I participate directly in an opensource project, as
> such I would like to hear feedback if I am doing something wrong and I will
> try my best to do everything right.
> I changed bpy.utils.script_paths() and bpy.utils.preset_paths() to return
> custom/user scripts before system scripts and automatically create a
> ~/.blender/2.55/scripts/presets folder if it doesn't yet exist.
> I am not sure if this is right to do without the user's consent, but since
> blender already creates a similar folder called "config" (instead of
> "scripts/presets") I suppose there is no problem, what I am not so sure is
> if this (bpy.utils.preset_paths) is the right place to check and create this
> folder.
> The reason I chose to create this folder is because some scripts want to
> write presets and if blender is installed system-wide, most users won't have
> write access to the scripts folder (which is located at
> /usr/share/blender/...).
> The uploaded patch has number #25069.
> link:
> http://projects.blender.org/tracker/index.php?func=detail&aid=25069&group_id=9&atid=127
> <http://projects.blender.org/tracker/index.php?func=detail&aid=25069&group_id=9&atid=127>Sorry
> for any english mistakes and thanks in advance :)
> --
> Micael Dias

Hi Micael, I agree this is needed but would do this for more then the
presets path, when blender starts it should create a blank user home
directory with presets, addons, scripts & config paths.

At the moment these paths are used but the user needs to know to
create them manually, except for config which is saved when writing
user defaults.

If its agreed on that blender creates empty paths on startup, then I
can add this.
Last I discussed it with Ton he didn't want to make this change so I
made the addon installer create the addon path when required, but
think this is still annoying if every script which installs presets or
config files needs to create common user paths.

- Campbell

More information about the Bf-committers mailing list