Cortex
10.0.0-a4
|
#include <ViewportPostProcessCallback.h>
Public Member Functions | |
IE_CORE_DECLAREMEMBERPTR (ViewportPostProcessCallback) | |
![]() | |
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 | |
![]() | |
typedef size_t | RefCount |
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() )