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:
authorWillian Padovani Germano <wpgermano@gmail.com>2003-06-29 18:35:49 +0400
committerWillian Padovani Germano <wpgermano@gmail.com>2003-06-29 18:35:49 +0400
commit389c7e101e9172b27ee52809a89e76d1086df61c (patch)
treef684986144d8cb0db6f85fc1da822b521efc0204 /source/blender/bpython
parent0ff572954ed867989892b4b37778c4d32370d9a2 (diff)
- Trying to fix something I caused:
Added a function call to creator.c that is needed by exppython, but forgot to add the function also to the old bpython implementation. Thanks, Hos! - Addition in Draw.Text and Draw.GetStringWidth (Python Draw methods): Now script writers can select the font size: normal, small or tiny.
Diffstat (limited to 'source/blender/bpython')
-rw-r--r--source/blender/bpython/include/BPY_extern.h1
-rw-r--r--source/blender/bpython/intern/BPY_main.c11
2 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/bpython/include/BPY_extern.h b/source/blender/bpython/include/BPY_extern.h
index 6e92d82e655..a2e55a0b8db 100644
--- a/source/blender/bpython/include/BPY_extern.h
+++ b/source/blender/bpython/include/BPY_extern.h
@@ -40,6 +40,7 @@ struct _object; // forward declaration for PyObject !
void BPY_start_python(void);
void BPY_end_python(void);
+void BPY_syspath_append_pythondir(void);
int BPY_Err_getLinenumber(void);
const char *BPY_Err_getFilename(void);
void BPY_Err_Handle(struct Text *text);
diff --git a/source/blender/bpython/intern/BPY_main.c b/source/blender/bpython/intern/BPY_main.c
index f65bcce693a..aa306dcee38 100644
--- a/source/blender/bpython/intern/BPY_main.c
+++ b/source/blender/bpython/intern/BPY_main.c
@@ -231,6 +231,17 @@ void init_syspath(void)
BPY_debug(("append done\n"));
}
+/*****************************************************************************/
+/* Description: This function adds the user defined folder for Python */
+/* scripts to sys.path. This is done in init_syspath, too, but */
+/* when Blender's main() runs BPY_start_python(), U.pythondir */
+/* isn't set yet, so we provide this function to be executed */
+/* after U.pythondir is defined. */
+/*****************************************************************************/
+void BPY_syspath_append_pythondir(void)
+{
+ syspath_append(Py_BuildValue("s", U.pythondir));
+}
#define FILENAME_LENGTH 24
typedef struct _ScriptError {