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

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

collection.foreach_set(attr, some_seq)

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