diff options
author | Willian Padovani Germano <wpgermano@gmail.com> | 2005-06-12 09:54:15 +0400 |
---|---|---|
committer | Willian Padovani Germano <wpgermano@gmail.com> | 2005-06-12 09:54:15 +0400 |
commit | 3d4438dcd76d74b47daba6c8a1ab2683ba6db123 (patch) | |
tree | 48b663807ce3f0db0260f9b3d4dbccb59e9ddfb3 /source/blender/python/api2_2x/Draw.c | |
parent | 70c9f9b319bc3b510cf7c1654835ab166e821ecb (diff) |
Scripts:
- Campbell Barton updated his Wavefront obj importer;
- Jean-Michel Soler updated his paths import (eps part).
BPython bug fixes:
- oldie found by Ken Hughes: reference count of two pyobjects not being decremented in slider callback (Draw.c):
http://projects.blender.org/tracker/index.php?func=detail&aid=2727&group_id=9&atid=127
- Gergely Erdelyi found that setText() in Text3d module was not updating str length var, leading to mem corruption and provided a patch:
http://projects.blender.org/tracker/?func=detail&aid=2713&group_id=9&atid=127
- doc updates (suggested by Campbell)
Thanks guys.
Diffstat (limited to 'source/blender/python/api2_2x/Draw.c')
-rw-r--r-- | source/blender/python/api2_2x/Draw.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/python/api2_2x/Draw.c b/source/blender/python/api2_2x/Draw.c index f6c5aff0db8..ec72394efc2 100644 --- a/source/blender/python/api2_2x/Draw.c +++ b/source/blender/python/api2_2x/Draw.c @@ -850,6 +850,8 @@ static PyObject *Method_Toggle( PyObject * self, PyObject * args ) static void py_slider_update( void *butv, void *data2_unused ) { uiBut *but = butv; + PyObject *ref = Py_BuildValue( "(i)", SPACE_VIEW3D ); + PyObject *ret = NULL; EXPP_disable_force_draw = 1; /*@ Disable forced drawing, otherwise the button object which @@ -862,8 +864,12 @@ static void py_slider_update( void *butv, void *data2_unused ) spacescript_do_pywin_buttons( curarea->spacedata.first, uiButGetRetVal( but ) ); - /* XXX useless right now: */ - M_Window_Redraw( 0, Py_BuildValue( "(i)", SPACE_VIEW3D ) ); + + /* XXX useless right now, investigate better before a bcon 5 */ + ret = M_Window_Redraw( 0, ref ); + + Py_DECREF(ref); + if (ret) { Py_DECREF(ret); } disable_where_script( 0 ); |