svn merge -r 30323:30417 https://svn.blender.org/svnroot/bf-blender/trunk/blender
authorJoerg Mueller <nexyon@gmail.com>
Fri, 16 Jul 2010 17:43:08 +0000 (17:43 +0000)
committerJoerg Mueller <nexyon@gmail.com>
Fri, 16 Jul 2010 17:43:08 +0000 (17:43 +0000)
1  2 
source/blender/python/intern/bpy.c
source/blender/windowmanager/intern/wm_init_exit.c
source/creator/creator.c

  #include "../generic/blf_api.h"
  #include "../generic/IDProp.h"
  
- static char bpy_home_paths_doc[] =
- ".. function:: home_paths(subfolder)\n"
 +#ifndef DISABLE_PYTHON
 +#define WITH_PYTHON
 +#endif
 +#include "AUD_C-API.h"
 +
+ static char bpy_script_paths_doc[] =
+ ".. function:: script_paths()\n"
  "\n"
- "   Return 3 paths to blender home directories.\n"
+ "   Return 2 paths to blender scripts directories.\n"
  "\n"
- "   :arg subfolder: The name of a subfolder to find within the blenders home directory.\n"
- "   :type subfolder: string\n"
- "   :return: (system, local, user) strings will be empty when not found.\n"
+ "   :return: (system, user) strings will be empty when not found.\n"
  "   :rtype: tuple of strigs\n";
  
- PyObject *bpy_home_paths(PyObject *self, PyObject *args)
+ PyObject *bpy_script_paths(PyObject *self)
  {
-       PyObject *ret= PyTuple_New(3);
+       PyObject *ret= PyTuple_New(2);
        char *path;
-       char *subfolder= "";
      
-       if (!PyArg_ParseTuple(args, "|s:blender_homes", &subfolder))
-               return NULL;
-       path= BLI_gethome_folder(subfolder, BLI_GETHOME_SYSTEM);
+       path= BLI_get_folder(BLENDER_USER_SCRIPTS, NULL);
        PyTuple_SET_ITEM(ret, 0, PyUnicode_FromString(path?path:""));
-       path= BLI_gethome_folder(subfolder, BLI_GETHOME_LOCAL);
+       path= BLI_get_folder(BLENDER_SYSTEM_SCRIPTS, NULL);
        PyTuple_SET_ITEM(ret, 1, PyUnicode_FromString(path?path:""));
-       path= BLI_gethome_folder(subfolder, BLI_GETHOME_USER);
-       PyTuple_SET_ITEM(ret, 2, PyUnicode_FromString(path?path:""));
      
        return ret;
  }
Simple merge