Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2013-09-17 18:02:13 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2013-09-17 18:02:13 +0400
commitdaa87ff0b4a0366e5e4bd4fa750ab0fbc455a61a (patch)
treeb7bf02f1d0c998dbed5d522c332027ce202f4255 /source/blender/python/intern
parentedde749850b4b660dec570fdb6367d1d51c3cb28 (diff)
Update foreach_get/_set doc.
Diffstat (limited to 'source/blender/python/intern')
-rw-r--r--source/blender/python/intern/bpy_rna.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c
index 808c07a35a8..754fd25d32b 100644
--- a/source/blender/python/intern/bpy_rna.c
+++ b/source/blender/python/intern/bpy_rna.c
@@ -4601,12 +4601,15 @@ PyDoc_STRVAR(pyrna_prop_collection_foreach_get_doc,
"\n"
" This is a function to give fast access to attributes within a collection.\n"
"\n"
+" Only works for 'basic type' properties (bool, int and float)!\n"
+" Multi-dimensional arrays (like array of vectors) will be flattened into seq.\n"
+"\n"
" .. code-block:: python\n"
"\n"
" collection.foreach_get(attr, someseq)\n"
"\n"
" # Python equivalent\n"
-" for i in range(len(seq)): someseq[i] = getattr(collection, attr)\n"
+" for i in range(len(seq)): someseq[i] = getattr(collection[i], attr)\n"
"\n"
);
static PyObject *pyrna_prop_collection_foreach_get(BPy_PropertyRNA *self, PyObject *args)
@@ -4621,6 +4624,9 @@ PyDoc_STRVAR(pyrna_prop_collection_foreach_set_doc,
"\n"
" This is a function to give fast access to attributes within a collection.\n"
"\n"
+" Only works for 'basic type' properties (bool, int and float)!\n"
+" seq must be uni-dimensional, multi-dimensional arrays (like array of vectors) will be re-created from it.\n"
+"\n"
" .. code-block:: python\n"
"\n"
" collection.foreach_set(attr, seq)\n"