Katana Plug-in APIs 0.1
Public Member Functions

Foundry::Katana::ViewerAPI::ViewportLayerWrapper Class Reference

The ViewportLayer class accessed by other plugins. More...

#include <FnViewportLayer.h>

Inheritance diagram for Foundry::Katana::ViewerAPI::ViewportLayerWrapper:
Foundry::Katana::ViewerAPI::ViewportLayerPluginBase

List of all members.

Public Member Functions

template<class T >
T * getPluginInstance ()
 Gets a pointer to the real plugin instance.
void draw ()
 Draws the Viewport Layer.
bool event (FnEventWrapper eventData)
 Processes the UI events on this ViewportLayer.
void setOption (OptionIdGenerator::value_type optionId, FnAttribute::Attribute attr)
 Sets a generic option.
FnAttribute::Attribute getOption (OptionIdGenerator::value_type optionId)
 Gets a generic option.
void setOption (const std::string &name, FnAttribute::Attribute attr)
 Sets a generic option.
FnAttribute::Attribute getOption (const std::string &name)
 Gets a generic option.

Detailed Description

The ViewportLayer class accessed by other plugins.


Member Function Documentation

void Foundry::Katana::ViewerAPI::ViewportLayerWrapper::draw ( )

Draws the Viewport Layer.

This function is exposed in the Viewport Python class.

bool Foundry::Katana::ViewerAPI::ViewportLayerWrapper::event ( FnEventWrapper  eventData)

Processes the UI events on this ViewportLayer.

This function is exposed in the Viewport Python class.

Parameters:
eventDataThe event data (see FnEventWrapper).
Returns:
True if the event has been handled, in which case it will not be passed to the following layers. Otherwise false and the event will be passed to the following layers.
template<class T >
T* Foundry::Katana::ViewerAPI::ViewportLayerWrapper::getPluginInstance ( ) [inline]

Gets a pointer to the real plugin instance.

WARNING: This function purposely breaks the compiler agnostic pattern of the Katana plugin API, so it needs to be used with care. This performs a dynamic cast to the real type so the implications of what that means in different circumstances should be understood. If the caller and plugin instance are not contained in the same shared library the RTTI check may fail.

This function allows a plugin wrapper to return the actual plugin class. The plugin is returned as a pointer to a child class of ViewportLayer that is a registerd plugin. The type of that child class needs to be specified in the template, so that it can be properly cast. If the specified type doesn't match the plugin type then NULL is returned.


The documentation for this class was generated from the following file:
 All Classes Functions Variables Typedefs Enumerations Enumerator