[Bf-python] Python API proposals

Domino Marama domino at dominodesigns.info
Tue Nov 29 16:29:44 CET 2011


On Mon, 2011-11-28 at 21:44 +0200, Dima Glibitsky wrote:
> On Wed, Nov 23, 2011 at 3:27 PM, Owen Nelson <onelson at gmail.com> wrote:
> > I was about to say, from a python perspective you should be able to leverage
> > sqlite to store keys and values for tool preferences (written to a file in
> > the user's blender dir).
> 
> Yep, that may be a nice solution... And that raises the question what
> settings should be stored in user's folder, and what should be stored
> in .blend (for some preferences it may be hard to draw the line) ;)

There's a built in function to get an appropriate path for storing
config information..

    config_path = bpy.utils.user_resource('CONFIG', 'my_addon_name')
    if os.path.exists(config_path):
        print("do my config")


Best Wishes,
Domino




More information about the Bf-python mailing list