- New Blender.Draw method by Campbell Barton (Cam / ideasman):

PupStrInput, a wrapper for the Blender String popup (thanks!)
- Fixed bug #1374 reported by Gabriel Beloin (gabio, thanks too):
    http://projects.blender.org/tracker/?func=detail&atid=125&aid=1374&group_id=9
    There was a minor mistake in the import menu: vrml called dxf and vice-versa and shortcuts were wrong (removed them).
- Doc updates, minor updates elsewhere.
This commit is contained in:
2004-06-16 01:18:57 +00:00
parent 23165676b7
commit ddec3db89d
7 changed files with 111 additions and 37 deletions

View File

@@ -158,7 +158,7 @@ static PyObject *M_sys_basename (PyObject *self, PyObject *args)
if (n > FILE_MAXFILE)
return EXPP_ReturnPyObjError(PyExc_RuntimeError, "path too long");
strncpy(basename, p+1, n); /* + 1 to skip the sep */
BLI_strncpy(basename, p+1, n); /* + 1 to skip the sep */
basename[n] = '\0';
return Py_BuildValue("s", basename);
}
@@ -190,7 +190,7 @@ static PyObject *M_sys_dirname (PyObject *self, PyObject *args)
if (n > FILE_MAXDIR)
return EXPP_ReturnPyObjError (PyExc_RuntimeError, "path too long");
strncpy(dirname, name, n);
BLI_strncpy(dirname, name, n);
dirname[n] = '\0';
return Py_BuildValue("s", dirname);
}
@@ -233,9 +233,9 @@ static PyObject *M_sys_splitext (PyObject *self, PyObject *args)
if (n > FILE_MAXFILE || (len - n ) > FILE_MAXFILE)
EXPP_ReturnPyObjError(PyExc_RuntimeError, "path too long");
strncpy(ext, dot, n);
BLI_strncpy(ext, dot, n);
ext[n] = '\0';
strncpy(path, name, dot - name);
BLI_strncpy(path, name, dot - name);
path[dot - name] = '\0';
return Py_BuildValue("ss", path, ext);
@@ -271,11 +271,11 @@ static PyObject *M_sys_makename(PyObject *self, PyObject *args, PyObject *kw)
if (p && strip) {
n = path + len - p - 1; /* - 1 because we don't want the sep */
strncpy(basename, p+1, n); /* + 1 to skip the sep */
BLI_strncpy(basename, p+1, n); /* + 1 to skip the sep */
basename[n] = 0;
}
else {
strncpy(basename, path, len);
BLI_strncpy(basename, path, len);
n = len;
basename[n] = '\0';
}
@@ -291,7 +291,7 @@ static PyObject *M_sys_makename(PyObject *self, PyObject *args, PyObject *kw)
if (dot) n = dot - basename;
else n = strlen(basename);
strncpy(basename + n, ext, lenext);
BLI_strncpy(basename + n, ext, lenext);
basename[n+lenext] = '\0';
}
}