bpy_prop_collection

class bpy.types.bpy_prop_collection

built-in class used for all collections.

Note

Note that bpy.types.bpy_prop_collection is not actually available from within blender, it only exists for the purpose of documentation.

foreach_get(attr, seq)

This is a function to give fast access to attribites within a collection.

collection.foreach_get(someseq, attr)

# Python equivelent
for i in range(len(seq)): someseq[i]= getattr(collection, attr)
foreach_set(attr, seq)

This is a function to give fast access to attribites within a collection.

collection.foreach_set(seq, attr)

# Python equivelent
for i in range(len(seq)): setattr(collection[i], attr, seq[i])
get(key, default=None)

Returns the value of the item assigned to key or default when not found (matches pythons dictionary function of the same name).

Parameters:
  • key (string) – The identifier for the collection member.
  • default (Undefined) – Optional argument for the value to return if key is not found.
items()

Return the identifiers of collection members (matching pythons dict.items() functionality).

Returns:(key, value) pairs for each member of this collection.
Return type:list of tuples
keys()

Return the identifiers of collection members (matching pythons dict.keys() functionality).

Returns:the identifiers for each member of this collection.
Return type:list of stings
values()

Return the values of collection (matching pythons dict.values() functionality).

Returns:the members of this collection.
Return type:list

Previous topic

XorController(Controller)

Next topic

bpy_struct