rend

rend method retrieves a renderer by its name or ID from the current active scene.

 r = cm.rend("simple1") # get renderer by its name
 r = cm.rend(15) # get renderer by its ID

By giving object name (or ID or object itself), you can get renderer attached to the specific object.

 r = cm.obj("simple1", o) # get renderer "simple1" attached to the object referenced by o
 r = cm.obj("simple1", "1CRN.pdb") # get renderer "simple1" attached to the object "1CRN.pdb"

Retrieving object by name

User can set non-unique (i.e. same) names to different renderers. In such cases, rend() method returns a renderer with the smallest ID.

back to index


Last-modified: Tue, 11 Jul 2017 15:52:39 JST (77d)