Vizard 7 » Command Index » Vizard modules » viz » <viz:cluster>.MaskedContext
7.6

<viz:cluster>.MaskedContext

Applies a cluster mask for a context

<viz:cluster>.MaskedContext(  
mask  
)  
mask
The cluster mask to apply

Remarks

Creates an object that can be used with the Python with statement to apply a cluster mask for a given context.

The mask will be be pushed when the context is entered and popped when the context is exited either cleanly or from an exception.

Return Value

MaskedContext object

Example

# Apply view offsets to clients

with viz.cluster.MaskedContext(viz.CLIENT1):
    viz.MainWindow.setViewOffset( viz.Matrix.euler(-45,0,0) )
   
with viz.cluster.MaskedContext(viz.CLIENT2):
    viz.MainWindow.setViewOffset( viz.Matrix.euler(45,0,0) )

See also

<viz:cluster>.getMask
<viz:cluster>.popMask
<viz:cluster>.pushMask
<viz:cluster>.setMask