Index: source/blender/python/api2_2x/Blender.c =================================================================== --- source/blender/python/api2_2x/Blender.c (revision 23059) +++ source/blender/python/api2_2x/Blender.c (working copy) @@ -605,25 +605,21 @@ static PyObject *Blender_Load( PyObject * self, PyObject * args ) { char *fname = NULL; - int keep_oldfname = 0; Script *script = NULL; - char str[32], name[FILE_MAXDIR]; + char str[32]; int file, is_blend_file = 0; - if( !PyArg_ParseTuple( args, "|si", &fname, &keep_oldfname ) ) + if( !PyArg_ParseTuple( args, "|s", &fname ) ) return EXPP_ReturnPyObjError( PyExc_TypeError, - "expected filename and optional int or nothing as arguments" ); + "expected filename or nothing as arguments" ); if( fname ) { - if( strlen( fname ) > FILE_MAXDIR ) /* G.main->name's max length */ + if( strlen( fname ) > FILE_MAXDIR + FILE_MAXFILE ) /* G.main->name's max length */ return EXPP_ReturnPyObjError( PyExc_AttributeError, "filename too long!" ); else if( !BLI_exists( fname ) ) return EXPP_ReturnPyObjError( PyExc_AttributeError, "requested file doesn't exist!" ); - - if( keep_oldfname ) - BLI_strncpy( name, G.sce, FILE_MAXDIR ); } /* We won't let a new .blend file be loaded if there are still other @@ -700,11 +696,6 @@ BIF_read_homefile(0); else BIF_read_file( fname ); - - if( fname && keep_oldfname ) { - /*BLI_strncpy(G.main->name, name, FILE_MAXDIR); */ - BLI_strncpy( G.sce, name, FILE_MAXDIR ); - } } Py_RETURN_NONE;