Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-12-18 10:22:52 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-12-18 10:22:52 +0300
commit77c17d332d5afd0d5df5e31af2e7d2c8c31a8fe7 (patch)
tree5b42ed9d09f1ce800ed5e33a71ae7546dbeab52f /source/blender/python
parent96dfaa215c87cbbb4676d19b1f278997a52d47a1 (diff)
fix [#25262] Keyboard shortcut presets can't be made because of wrong folder
New create option when getting a user resource for creating paths. bpy.utils.user_resource(type, path, create=False)
Diffstat (limited to 'source/blender/python')
-rw-r--r--source/blender/python/intern/bpy.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/source/blender/python/intern/bpy.c b/source/blender/python/intern/bpy.c
index 834d472d786..3dc9183f014 100644
--- a/source/blender/python/intern/bpy.c
+++ b/source/blender/python/intern/bpy.c
@@ -121,17 +121,7 @@ static PyObject *bpy_blend_paths(PyObject *UNUSED(self), PyObject *args, PyObjec
}
-static char bpy_user_resource_doc[] =
-".. function:: user_resource(type, subdir)\n"
-"\n"
-" Returns a list of paths to external files referenced by the loaded .blend file.\n"
-"\n"
-" :arg type: Resource type in ['DATAFILES', 'CONFIG', 'SCRIPTS', 'AUTOSAVE'].\n"
-" :type type: string\n"
-" :arg subdir: Optional subdirectory.\n"
-" :type subdir: string\n"
-" :return: a path.\n"
-" :rtype: string\n";
+// static char bpy_user_resource_doc[] = // now in bpy/utils.py
static PyObject *bpy_user_resource(PyObject *UNUSED(self), PyObject *args, PyObject *kw)
{
char *type;
@@ -165,7 +155,7 @@ static PyObject *bpy_user_resource(PyObject *UNUSED(self), PyObject *args, PyObj
static PyMethodDef meth_bpy_script_paths = {"script_paths", (PyCFunction)bpy_script_paths, METH_NOARGS, bpy_script_paths_doc};
static PyMethodDef meth_bpy_blend_paths = {"blend_paths", (PyCFunction)bpy_blend_paths, METH_VARARGS|METH_KEYWORDS, bpy_blend_paths_doc};
-static PyMethodDef meth_bpy_user_resource = {"user_resource", (PyCFunction)bpy_user_resource, METH_VARARGS|METH_KEYWORDS, bpy_user_resource_doc};
+static PyMethodDef meth_bpy_user_resource = {"user_resource", (PyCFunction)bpy_user_resource, METH_VARARGS|METH_KEYWORDS, NULL};
static void bpy_import_test(const char *modname)
{