diff --git a/release/scripts/wizard_curve2tree.py b/release/scripts/wizard_curve2tree.py index f11d797636f..27ddab5a807 100644 --- a/release/scripts/wizard_curve2tree.py +++ b/release/scripts/wizard_curve2tree.py @@ -3537,7 +3537,7 @@ def do_pref_clear(e,v): return for ob in objects: - try: del idprop[ID_SLOT_NAME] + try: del ob.properties[ID_SLOT_NAME] except: pass def do_tex_check(e,v): @@ -3989,7 +3989,7 @@ def gui(): # ---------- ---------- ---------- ---------- Blender.Draw.BeginAlign() - Draw.PushButton('Exit', EVENT_EXIT, xtmp, y, but_width, but_height, '', do_active_image); xtmp += but_width; + Draw.PushButton('Exit', EVENT_EXIT, xtmp, y, but_width, but_height, ''); xtmp += but_width; Draw.PushButton('Generate from selection', EVENT_REDRAW, xtmp, y, but_width*3, but_height, 'Generate mesh', do_tree_generate); xtmp += but_width*3; Blender.Draw.EndAlign() y-=but_height+MARGIN diff --git a/source/blender/python/api2_2x/Draw.c b/source/blender/python/api2_2x/Draw.c index 76e33a1bcb7..8d66068d581 100644 --- a/source/blender/python/api2_2x/Draw.c +++ b/source/blender/python/api2_2x/Draw.c @@ -532,10 +532,8 @@ static int Button_setattr( PyObject * self, char *name, PyObject * v ) return 0; } else if( but->type == BSTRING_TYPE && PyString_Check(v) ) { - char *newstr; - unsigned int newlen; - - PyString_AsStringAndSize( v, &newstr, (int *)&newlen ); + char *newstr = PyString_AsString(v); + int newlen = strlen(newstr); if (newlen+1> UI_MAX_DRAW_STR) return EXPP_ReturnIntError( PyExc_ValueError, "Error: button string length exceeded max limit (399 chars).");