diff options
author | Bastien Montagne <bastien@blender.org> | 2022-05-06 12:08:10 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2022-05-06 12:11:33 +0300 |
commit | 84756b68e68c8a25b820a8c3dda01ec7f0a59353 (patch) | |
tree | e8cb9348f1cd0f61f3f56f16bd22a7b9934b91c4 /source/blender/python/generic | |
parent | 62450e8485ded339889e292e41453398dad5adcc (diff) |
Add documentation about Image/ImBuf to python/RNA API.
Related to T95616, the relationship between Image ID and ImBuf 'cached'
buffers can be fairly confusing when using the RNA API.
Reviewed By: campbellbarton, jbakker
Differential Revision: https://developer.blender.org/D14833
Diffstat (limited to 'source/blender/python/generic')
-rw-r--r-- | source/blender/python/generic/imbuf_py_api.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/source/blender/python/generic/imbuf_py_api.c b/source/blender/python/generic/imbuf_py_api.c index ef11d1ab32d..e6d90c46866 100644 --- a/source/blender/python/generic/imbuf_py_api.c +++ b/source/blender/python/generic/imbuf_py_api.c @@ -559,7 +559,11 @@ static PyMethodDef IMB_methods[] = { {NULL, NULL, 0, NULL}, }; -PyDoc_STRVAR(IMB_doc, "This module provides access to Blender's image manipulation API."); +PyDoc_STRVAR(IMB_doc, + "This module provides access to Blender's image manipulation API.\n" + "\n" + "It provides access to image buffers outside of Blender's\n" + ":class:`bpy.types.Image` data-block context.\n"); static struct PyModuleDef IMB_module_def = { PyModuleDef_HEAD_INIT, "imbuf", /* m_name */ @@ -596,7 +600,13 @@ PyObject *BPyInit_imbuf(void) * for docs and the ability to use with built-ins such as `isinstance`, `issubclass`. * \{ */ -PyDoc_STRVAR(IMB_types_doc, "This module provides access to image buffer types."); +PyDoc_STRVAR(IMB_types_doc, + "This module provides access to image buffer types.\n" + "\n" + ".. note::\n" + "\n" + " Image buffer is also the structure used by :class:`bpy.types.Image`\n" + " ID type to store and manipulate image data at runtime.\n"); static struct PyModuleDef IMB_types_module_def = { PyModuleDef_HEAD_INIT, |