diff options
Diffstat (limited to 'source/blender/python')
-rw-r--r-- | source/blender/python/BPY_interface.c | 3 | ||||
-rw-r--r-- | source/blender/python/api2_2x/Font.c | 4 | ||||
-rw-r--r-- | source/blender/python/api2_2x/Text3d.c | 9 |
3 files changed, 11 insertions, 5 deletions
diff --git a/source/blender/python/BPY_interface.c b/source/blender/python/BPY_interface.c index 3306f68ccf8..912a479eef9 100644 --- a/source/blender/python/BPY_interface.c +++ b/source/blender/python/BPY_interface.c @@ -115,6 +115,9 @@ int BPY_txt_do_python_Text( struct Text *text ); void BPY_Err_Handle( char *script_name ); PyObject *traceback_getFilename( PyObject * tb ); +void BPY_free_screen_spacehandlers(struct bScreen *sc); + + /**************************************************************************** * Description: This function will initialise Python and all the implemented * api variations. diff --git a/source/blender/python/api2_2x/Font.c b/source/blender/python/api2_2x/Font.c index 865285f1e42..6122477a515 100644 --- a/source/blender/python/api2_2x/Font.c +++ b/source/blender/python/api2_2x/Font.c @@ -200,7 +200,7 @@ struct VFont *Font_FromPyObject( PyObject * py_obj ) PyObject *M_Font_New( PyObject * self, PyObject * args ) { char *name_str = "<builtin>"; - char *parent_str = ""; +// char *parent_str = ""; BPy_Font *py_font = NULL; /* for Font Data object wrapper in Python */ PyObject *tmp; @@ -211,7 +211,7 @@ PyObject *M_Font_New( PyObject * self, PyObject * args ) /*create python font*/ if( !S_ISDIR(BLI_exist(name_str)) ) { tmp= Py_BuildValue("(s)", name_str); - py_font= M_Text3d_LoadFont (self, Py_BuildValue("(s)", name_str)); + py_font= (BPy_Font *) M_Text3d_LoadFont (self, Py_BuildValue("(s)", name_str)); Py_DECREF (tmp); } else diff --git a/source/blender/python/api2_2x/Text3d.c b/source/blender/python/api2_2x/Text3d.c index 44e01e8279d..e9a957648fe 100644 --- a/source/blender/python/api2_2x/Text3d.c +++ b/source/blender/python/api2_2x/Text3d.c @@ -905,7 +905,7 @@ static PyObject *Text3d_getFont( BPy_Text3d * self ) static PyObject *Text3d_setFont( BPy_Text3d * self, PyObject * args ) { BPy_Font *pyobj= NULL; - VFont *vf, *vfont; + VFont *vf; //, *vfont; if( !PyArg_ParseTuple( args, "|O!",&Font_Type, &pyobj) ) return EXPP_ReturnPyObjError( PyExc_TypeError, "expected a string" ); @@ -941,11 +941,14 @@ PyObject *M_Text3d_LoadFont( PyObject * self, PyObject * args ) if( !PyArg_ParseTuple( args, "s", &fontfile ) ) return EXPP_ReturnPyObjError( PyExc_TypeError, "expected a string" ); - if( vf= exist_vfont(fontfile) ) + vf= exist_vfont(fontfile); + if( vf ) return Font_CreatePyObject( vf ); /* return EXPP_incr_ret( Py_None ); */ - else + /* No use for that -- lukep + else vf= NULL; + */ file= fopen( fontfile, "r"); if( file || !strcmp (fontfile, "<builtin>") ) { |