diff options
author | Willian Padovani Germano <wpgermano@gmail.com> | 2005-05-25 08:52:52 +0400 |
---|---|---|
committer | Willian Padovani Germano <wpgermano@gmail.com> | 2005-05-25 08:52:52 +0400 |
commit | 2a1fe1b0cbbb45cbec7d9864ad79b1b321880da0 (patch) | |
tree | 098787ab375a550fd606ff7965a13d3e5b0960e7 /source/blender/python/api2_2x/vector.c | |
parent | 524e411dbfce7702c270a590c78aba4012f66666 (diff) |
BPython bug fixes:
- Patch #2491: Mathutils.AngleBetweenVecs BUGFIX
http://projects.blender.org/tracker/?func=detail&aid=2491&group_id=9&atid=127
- #2607: Python String button can segfault if the allowable length is greater than 400
http://projects.blender.org/tracker/?func=detail&atid=125&aid=2607&group_id=9
- #2490: Vector == None gives warning
http://projects.blender.org/tracker/?func=detail&aid=2490&group_id=9&atid=125
- #2476: Image.Draw()
http://projects.blender.org/tracker/?func=detail&aid=2476&group_id=9&atid=125
All reported by Campbell, who also wrote the #2491 patch. Ken Hughes provided patches for #2490 and #2476. Thanks guys.
Diffstat (limited to 'source/blender/python/api2_2x/vector.c')
-rw-r--r-- | source/blender/python/api2_2x/vector.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/python/api2_2x/vector.c b/source/blender/python/api2_2x/vector.c index 9e65de3c46d..049ed793de6 100644 --- a/source/blender/python/api2_2x/vector.c +++ b/source/blender/python/api2_2x/vector.c @@ -23,7 +23,7 @@ * All rights reserved. * * - * Contributor(s): Willian P. Germano & Joseph Gilbert + * Contributor(s): Willian P. Germano, Joseph Gilbert, Ken Hughes * * ***** END GPL/BL DUAL LICENSE BLOCK ***** */ @@ -550,6 +550,10 @@ int Vector_coerce( PyObject ** v1, PyObject ** v2 ) printf( "vector/matrix numeric protocols unsupported...\n" ); Py_INCREF( *v1 ); return 0; //operation will type check + } else if( *v2 == Py_None ) { + Py_INCREF(*v1); + Py_INCREF(Py_None); + return 0; } else if( PyNumber_Check( *v2 ) ) { if( PyInt_Check( *v2 ) ) { //cast scalar to vector tempI = PyMem_Malloc( 1 * @@ -596,6 +600,7 @@ int Vector_coerce( PyObject ** v1, PyObject ** v2 ) //unknown type or numeric cast failure printf( "attempting vector operation with unsupported type...\n" ); Py_INCREF( *v1 ); + Py_INCREF( *v2 ); return 0; //operation will type check } } else { |