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

bpy.types.bpy_prop_collection.foreach_get.py « examples « python_api « doc - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 05163b332a98f3247419f2226283fbf434b95aba (plain)
1
2
3
4
5
6
7
8
9
10
11
"""
Only works for 'basic type' properties (bool, int and float)!
Multi-dimensional arrays (like array of vectors) will be flattened into seq.
"""

collection.foreach_get(attr, some_seq)

# Python equivalent
for i in range(len(seq)):
    some_seq[i] = getattr(collection[i], attr)