Plush

Collection#

plupy · Type index

Module: plupy

Iterate handles, look up stable IDs first, then exact unambiguous names. No integer indexing.

DataCollection, Uses, SceneCollections and Components support this lookup protocol:

ExpressionResult
collection[key]Handle matched by exact ID first, then exact name
collection.get(key, default=None)Matching handle; default only when absent
for item in collectionIterate current handles
len(collection)Current item count

Missing subscription raises KeyError; ambiguous names raise plupy.AmbiguousError even with .get(). Integer indexing is not supported. Datablocks iterate by ID; scene uses iterate in hierarchy order. A collection view is live, not a stored copy.

class Collection

Usage and examples

Derived types: Components · DataCollection · SceneCollections · Uses

Members: Iteration · Length · Indexing · get

Iteration#

for item in x

Iterate the current handles (a live view, not a stored copy).

Length#

len(x)

The current item count.

Indexing#

x[key]

The handle whose ID equals key, else the one whose name equals it exactly. KeyError when none matches (the message lists what exists), AmbiguousError when several share the name. No integer indexing.

get#

get(key, default=None)

self[key], or default when absent; an ambiguous name still raises AmbiguousError.

AmbiguousError · Components · DataCollection · Handle · SceneCollections · Uses

Source#