tornavis/doc/python_api/examples/bpy.types.bpy_prop_collecti...

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
281 B
Python
Raw Normal View History

"""
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)