Cortex  10.0.0-a4
Public Member Functions | List of all members
IECoreMaya.ScopedSelection Class Reference

It's common to need to save the current maya selection, change it, and restore the old selection afterwards. More...

Public Member Functions

def __init__ (self)
 

Detailed Description

It's common to need to save the current maya selection, change it, and restore the old selection afterwards.

This is error prone, especially when taking exception handling into account. The ScopedSelection object saves the selection when it's created, and restores it when it dies.

Todo:

Cope with objects changing names, being deleted etc - can probably do this by storing DagNode and Node objects.

This should be reimplemented as a context object called SelectionSaved to follow the model set by UndoDisabled.


The documentation for this class was generated from the following file: