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-11-11 09:35:45 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-11-11 09:35:45 +0300
commit80a650dfb1e73363ae6924dc5738b732bb89ded4 (patch)
tree7d8af50bde3e4c32474d899a7fd00558afe9befc /source/blender/python
parent59cfe81085b06243220cdb075a28a1352edebf7b (diff)
BLF_draw functions take an extra length argument, so the console drawing doenst need to swap in NULL chars to draw word wrapping.
Diffstat (limited to 'source/blender/python')
-rw-r--r--source/blender/python/generic/blf_api.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/python/generic/blf_api.c b/source/blender/python/generic/blf_api.c
index 80e140b7eac..e81b885f7bb 100644
--- a/source/blender/python/generic/blf_api.c
+++ b/source/blender/python/generic/blf_api.c
@@ -141,12 +141,13 @@ static char py_blf_draw_doc[] =
static PyObject *py_blf_draw(PyObject *UNUSED(self), PyObject *args)
{
char *text;
+ int text_length;
int fontid;
- if (!PyArg_ParseTuple(args, "is:blf.draw", &fontid, &text))
+ if (!PyArg_ParseTuple(args, "is#:blf.draw", &fontid, &text, &text_length))
return NULL;
- BLF_draw(fontid, text);
+ BLF_draw(fontid, text, (unsigned int)text_length);
Py_RETURN_NONE;
}