Cortex  10.0.0-a4
Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
IECoreMaya::ViewportPostProcessCallback Class Reference

#include <ViewportPostProcessCallback.h>

+ Inheritance diagram for IECoreMaya::ViewportPostProcessCallback:

Public Member Functions

 IE_CORE_DECLAREMEMBERPTR (ViewportPostProcessCallback)
 
- Public Member Functions inherited from IECore::RefCounted
 IE_CORE_DECLAREMEMBERPTR (RefCounted)
 
void addRef () const
 Add a reference to the current object.
 
void removeRef () const
 Remove a reference from the current object.
 
RefCount refCount () const
 Returns the current reference count.
 

Static Public Member Functions

static MStatus registerCallback (const MString &panelName, ViewportPostProcessPtr postProcess)
 
static MStatus deregisterCallback (const MString &panelName)
 

Protected Types

typedef std::map< std::string, ViewportPostProcessCallback::Ptr > Instances
 

Protected Member Functions

 ViewportPostProcessCallback (const MString &panelName, ViewportPostProcessPtr postProcess)
 

Static Protected Member Functions

static void viewPreRender (const MString &panelName, void *clientData)
 
static void viewPostRender (const MString &panelName, void *clientData)
 

Protected Attributes

MCallbackId m_viewPreRenderId
 
MCallbackId m_viewPostRenderId
 
MCallbackId m_idleId
 
ViewportPostProcessPtr m_postProcess
 
MString m_panelName
 

Static Protected Attributes

static Instances g_instances
 
static size_t g_numInstances
 

Additional Inherited Members

- Public Types inherited from IECore::RefCounted
typedef size_t RefCount
 

Detailed Description

A class which defines a mechanism for attaching ViewportPostProcess instances to a panel. Only one ViewportPostProcess can be associated with any given panel, so subsequent registrations will override earlier ones.

Example:

class MyPostProcess( ImageViewportPostProcess ) : def init( self ) : ImageViewportPostProcess.__init__( self )

def postRender( self, image ) :

for i in xrange( 0, len( image["R"].data ) ): image["R"].data[i] *= 0.5

ViewportPostProcessCallback.registerCallback( "modelPanel4", MyPostProcess() )


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