Katana Plug-in APIs 0.1
Public Member Functions

CompanyName::Katana::TemplateRenderPlugin Class Reference

Template Render Plugin. More...

#include <TemplateRenderPlugin.h>

Inheritance diagram for CompanyName::Katana::TemplateRenderPlugin:
Foundry::Katana::Render::RenderBase

List of all members.

Public Member Functions

int start ()
int pause ()
int resume ()
int stop ()
int startLiveEditing ()
int stopLiveEditing ()
int processControlCommand (const std::string &command)
int queueDataUpdates (FnKat::GroupAttribute updateAttribute)
int applyPendingDataUpdates ()
bool hasPendingDataUpdates () const
void configureDiskRenderOutputProcess (FnKat::Render::DiskRenderOutputProcess &diskRenderOutputProcess, const std::string &outputName, const std::string &outputPath, const std::string &renderMethodName, const float &frameTime) const

Detailed Description

Template Render Plugin.


Member Function Documentation

int CompanyName::Katana::TemplateRenderPlugin::applyPendingDataUpdates ( ) [virtual]

Apply one or more live data updates which have been processed by queueDataUpdates. This provides an opportunity to process and queue live update attributes in the update thread and then flush them in the main thread.

This function is called if hasPendingDataUpdates returns true.

Returns:
A zero value if successful, a non-zero value otherwise.
See also:
Render::RenderBase::hasPendingDataUpdates
Render::RenderBase::queueDataUpdates

Reimplemented from Foundry::Katana::Render::RenderBase.

void CompanyName::Katana::TemplateRenderPlugin::configureDiskRenderOutputProcess ( FnKat::Render::DiskRenderOutputProcess diskRenderOutputProcess,
const std::string &  outputName,
const std::string &  outputPath,
const std::string &  renderMethodName,
const float &  frameTime 
) const [virtual]

Provide Katana with information on how to process a given render output which has been defined in a Katana scene using the RenderOutputDefine node. This is only applicable during disk render where the function is called for each render output (port) on the render node.

Note:
The list of available output types is provided by RendererInfo::RendererInfoBase::buildRendererObjectInfo when Katana calls the function using kFnRendererObjectTypeRenderOutput as an object type.
Parameters:
diskRenderOutputProcessDefines the render action for a given render output as well as pre- and post-commands used in the render process.
outputNameThe name of the render output (as defined in the corresponding RenderOutputDefine node).
outputPathThe target location for the render output.
renderMethodNameThe render method used to launch the render.
frameTimeThe current frame time.
See also:
Render::DiskRenderOutputProcess
Render::RenderAction
Render::CopyRenderAction
Render::CopyAndConvertRenderAction
Render::TemporaryRenderAction
Render::NoOutputRenderAction
Render::RenderSettings::RenderOutputs
Render::RenderSettings::getRenderOutputs
RendererInfo::RendererInfoBase::buildRendererObjectInfo

Reimplemented from Foundry::Katana::Render::RenderBase.

bool CompanyName::Katana::TemplateRenderPlugin::hasPendingDataUpdates ( ) const [virtual]

Inform the render process whether it has to flush and apply live updates.

Returns:
true if there are updates which have to be applied, false otherwise
See also:
Render::RenderBase::applyPendingDataUpdates
Render::RenderBase::queueDataUpdates

Reimplemented from Foundry::Katana::Render::RenderBase.

int CompanyName::Katana::TemplateRenderPlugin::pause ( ) [virtual]

Interrupt and pause the render process but does not terminate it.

Note:
This is only used during live render when updating regions of interest.
Returns:
A zero value if successful, a non-zero value otherwise.

Reimplemented from Foundry::Katana::Render::RenderBase.

int CompanyName::Katana::TemplateRenderPlugin::processControlCommand ( const std::string &  command) [virtual]

Process a custom live render control command which has been triggered by the user in the live update tab.

Parameters:
commandLive render control command
Returns:
A zero value if successful, a non-zero value otherwise.

Reimplemented from Foundry::Katana::Render::RenderBase.

int CompanyName::Katana::TemplateRenderPlugin::queueDataUpdates ( FnKat::GroupAttribute  updateAttribute) [virtual]

Process a data update during live render. The update is based on an attribute convention where an update for a single scene graph location is encapsulated by a GroupAttribute. Each attribute update contains the following:

  • type: root, globals, camera, light, geoMaterial, or a custom type declared as a LiveRenderAPI plugin.
  • location: The full scene graph location name
  • attributes: A GroupAttribute containing the update attributes which vary based on the type:
    • root: camera (StringAttribute containing the selected camera)
    • globals: [rendererName]GlobalStatements
    • camera: xform, geometry
    • light: xform, material, geometry, mute, info
    • geoMaterial: material, info
    • (custom): Depends on what attributes were declared for the custom type.
Note:
A useful trick while debugging is to print the XML string for the update attribute to see its contents: updateAttribute.getXML();
This function is called from a separate update thread whereas hasPendingDataUpdates and applyPendingDataUpdates are called in the main render process thread.
Parameters:
updateAttributeA group attribute containing one or more update attributes.
Returns:
A zero value if successful, a non-zero value otherwise.
See also:
Render::RenderBase::hasPendingDataUpdates
Render::RenderBase::applyPendingDataUpdates

Reimplemented from Foundry::Katana::Render::RenderBase.

int CompanyName::Katana::TemplateRenderPlugin::resume ( ) [virtual]

Resume a paused render.

Note:
This is currently never called.
Returns:
A zero value if successful, a non-zero value otherwise.

Reimplemented from Foundry::Katana::Render::RenderBase.

int CompanyName::Katana::TemplateRenderPlugin::start ( ) [virtual]

Start a render by traversing the scene graph using FnScenegraphIterator and interpret the locations and attributes into the renderer's language. This function is called at the start of each frame to be rendered. It is possible that this will be called multiple times during the lifetime of the plug-in.

Returns:
A zero value if successful, a non-zero value otherwise.

Implements Foundry::Katana::Render::RenderBase.

int CompanyName::Katana::TemplateRenderPlugin::startLiveEditing ( ) [virtual]

Start the live render process. Data updates and control commands will follow.

Returns:
A zero value if successful, a non-zero value otherwise.

Reimplemented from Foundry::Katana::Render::RenderBase.

int CompanyName::Katana::TemplateRenderPlugin::stop ( ) [virtual]

Called at the end of each frame that is rendered. It is possible that this will be called multiple times during the lifetime of the plug-in.

Returns:
A zero value if successful, a non-zero value otherwise.

Reimplemented from Foundry::Katana::Render::RenderBase.

int CompanyName::Katana::TemplateRenderPlugin::stopLiveEditing ( ) [virtual]

Stop the live render process. No further data updates or control commands should be expected.

Returns:
A zero value if successful, a non-zero value otherwise.

Reimplemented from Foundry::Katana::Render::RenderBase.


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