diff options
author | Willian Padovani Germano <wpgermano@gmail.com> | 2004-01-23 22:24:45 +0300 |
---|---|---|
committer | Willian Padovani Germano <wpgermano@gmail.com> | 2004-01-23 22:24:45 +0300 |
commit | 23a3a51e16c72d347f15790ed9e4d7bdc2d4f44a (patch) | |
tree | dd3279b095031344d2bc4bb19eee263d5b1ef6bc /source/blender/python/api2_2x/Sys.h | |
parent | 5aad4bfceb454974e0800bfab08271c8b3baaff3 (diff) |
Blender's debug mode only worked on startup:
- G.f's G_DEBUG flag was being erased in blenkernel/intern/blender.c's
setup_app_data:
G.f= bfd->globalf
// added a line above it to fix this:
if (G.f & G_DEBUG) bfd->globalf |=G_DEBUG;
G.f= bfd->globalf;
BPython:
- debug info now only shown if Blender is started with '-d' option
- added ~/.blender/scripts to modules sys.path
- added two new functions to Blender.sys: basename and splitext
- added doc for Blender.sys, updated other docs
Diffstat (limited to 'source/blender/python/api2_2x/Sys.h')
-rw-r--r-- | source/blender/python/api2_2x/Sys.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/source/blender/python/api2_2x/Sys.h b/source/blender/python/api2_2x/Sys.h index 8ecb9046f33..f3967268129 100644 --- a/source/blender/python/api2_2x/Sys.h +++ b/source/blender/python/api2_2x/Sys.h @@ -40,7 +40,9 @@ /*****************************************************************************/ /* Python API function prototypes for the sys module. */ /*****************************************************************************/ +static PyObject *M_sys_basename (PyObject *self, PyObject *args); static PyObject *M_sys_dirname (PyObject *self, PyObject *args); +static PyObject *M_sys_splitext (PyObject *self, PyObject *args); /*****************************************************************************/ /* The following string definitions are used for documentation strings. */ @@ -50,16 +52,26 @@ static PyObject *M_sys_dirname (PyObject *self, PyObject *args); static char M_sys_doc[] = "The Blender.sys submodule\n\ \n\ -This is a minimal sys module kept for compatibility. It may also still be\n\ -useful for users without full Python installations.\n"; +This is a minimal system module to supply simple functionality available\n\ +in the default Python module os."; -static char M_sys_dirname_doc[] = ""; +static char M_sys_basename_doc[]="(path) - Split 'path' in dir and filename.\n\ +Return the filename."; + +static char M_sys_dirname_doc[]="(path) - Split 'path' in dir and filename.\n\ +Return the dir."; + +static char M_sys_splitext_doc[]="(path) - Split 'path' in root and \ +extension:\n/this/that/file.ext -> ('/this/that/file','.ext').\n\ +Return the pair (root, extension)."; /*****************************************************************************/ /* Python method structure definition for Blender.sys module: */ /*****************************************************************************/ struct PyMethodDef M_sys_methods[] = { + {"basename", M_sys_basename, METH_VARARGS, M_sys_basename_doc}, {"dirname", M_sys_dirname, METH_VARARGS, M_sys_dirname_doc}, + {"splitext", M_sys_splitext, METH_VARARGS, M_sys_splitext_doc}, {NULL, NULL, 0, NULL} }; |