[Bf-blender-cvs] [5df6b4004c9] master: Docs: improve imbuf.write docstring

Campbell Barton noreply at git.blender.org
Mon Jun 21 04:27:17 CEST 2021


Commit: 5df6b4004c9b03574dcb8056630d88ad5f1d1a0b
Author: Campbell Barton
Date:   Mon Jun 21 12:24:02 2021 +1000
Branches: master
https://developer.blender.org/rB5df6b4004c9b03574dcb8056630d88ad5f1d1a0b

Docs: improve imbuf.write docstring

The file path wasn't documented as being optional.

===================================================================

M	source/blender/python/generic/imbuf_py_api.c

===================================================================

diff --git a/source/blender/python/generic/imbuf_py_api.c b/source/blender/python/generic/imbuf_py_api.c
index 53e22314ec4..793b980295c 100644
--- a/source/blender/python/generic/imbuf_py_api.c
+++ b/source/blender/python/generic/imbuf_py_api.c
@@ -495,15 +495,16 @@ static PyObject *M_imbuf_load(PyObject *UNUSED(self), PyObject *args, PyObject *
   return Py_ImBuf_CreatePyObject(ibuf);
 }
 
-PyDoc_STRVAR(M_imbuf_write_doc,
-             ".. function:: write(image, filepath)\n"
-             "\n"
-             "   Write an image.\n"
-             "\n"
-             "   :arg image: the image to write.\n"
-             "   :type image: :class:`ImBuf`\n"
-             "   :arg filepath: the filepath of the image.\n"
-             "   :type filepath: string\n");
+PyDoc_STRVAR(
+    M_imbuf_write_doc,
+    ".. function:: write(image, filepath=image.filepath)\n"
+    "\n"
+    "   Write an image.\n"
+    "\n"
+    "   :arg image: the image to write.\n"
+    "   :type image: :class:`ImBuf`\n"
+    "   :arg filepath: Optional filepath of the image (fallback to the images file path).\n"
+    "   :type filepath: string\n");
 static PyObject *M_imbuf_write(PyObject *UNUSED(self), PyObject *args, PyObject *kw)
 {
   Py_ImBuf *py_imb;



More information about the Bf-blender-cvs mailing list