diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-10-09 12:49:27 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-10-09 12:49:27 +0300 |
commit | a5b4b0f21c1ae8c96e4fea9abdcfac2fab1cf300 (patch) | |
tree | 0658d8bdfb8ec03652aa04f82ee8a4d243ec6370 /source/blender/python/intern/bpy_library_write.c | |
parent | d68f698cf0321477c0734474150eb4bc43c4e85f (diff) | |
parent | abcda06934aba054de8540b66b13c2bbc5f8f515 (diff) |
Merge branch '28' into custom-manipulatorscustom-manipulators
Diffstat (limited to 'source/blender/python/intern/bpy_library_write.c')
-rw-r--r-- | source/blender/python/intern/bpy_library_write.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/source/blender/python/intern/bpy_library_write.c b/source/blender/python/intern/bpy_library_write.c index bf91253141a..c054183034a 100644 --- a/source/blender/python/intern/bpy_library_write.c +++ b/source/blender/python/intern/bpy_library_write.c @@ -69,24 +69,23 @@ PyDoc_STRVAR(bpy_lib_write_doc, " :arg compress: When True, write a compressed blend file.\n" " :type compress: bool\n" ); -static PyObject *bpy_lib_write(PyObject *UNUSED(self), PyObject *args, PyObject *kwds) +static PyObject *bpy_lib_write(PyObject *UNUSED(self), PyObject *args, PyObject *kw) { - static const char *kwlist[] = { - "filepath", "datablocks", - /* optional */ - "relative_remap", "fake_user", "compress", - NULL, - }; - /* args */ const char *filepath; char filepath_abs[FILE_MAX]; PyObject *datablocks = NULL; bool use_relative_remap = false, use_fake_user = false, use_compress = false; - if (!PyArg_ParseTupleAndKeywords( - args, kwds, - "sO!|$O&O&O&:write", (char **)kwlist, + static const char *_keywords[] = { + "filepath", "datablocks", + /* optional */ + "relative_remap", "fake_user", "compress", + NULL, + }; + static _PyArg_Parser _parser = {"sO!|$O&O&O&:write", _keywords, 0}; + if (!_PyArg_ParseTupleAndKeywordsFast( + args, kw, &_parser, &filepath, &PySet_Type, &datablocks, PyC_ParseBool, &use_relative_remap, |