Query


Description

This optional callback is used by the Render Manager to query the rendering engine for information based on the siRenderQueryType enumeration value given in the QueryType attribute.


Applies To

Custom Renderers


Syntax

CStatus <renderer_name>_Query( CRef& in_context )
{
        ...
}

<renderer_name> is the name specified in the call to PluginRegistrar::RegisterRenderer, with any spaces converted to underscores.


Parameters

Parameter Language Type Description
in_context C++ CRef& A reference to the RendererContext object. Context::GetSource returns the Renderer.

Context Attributes

The context attributes for the query callback are different depending on the query type. However, in all cases the QueryType attribute is set.

Attribute Type Description
QueryType siRenderQueryType The type of information being queried for. See table below for context attributes specific for each query.
Query Type Attribute Type Description
siRenderQueryArchiveIsValid Filename CString A file path to an object archive.
Valid bool On return should be set to true indicating that the object archive given in Filename is a valid archive for this renderer, or false if it isn't.
MultiFrame bool On return should be set to true indicating whether the archive, if valid, is a multi-frame archive.
siRenderQueryArchiveProxies Filename CString A file path to an object archive.
Frame int The frame number within the archive that the proxies should be returned for. Only needed for multi-frame archives. For single-frame archives, the Filename attribute value is sufficient.
ProxyXY

ProxyXZ

ProxyYZ
CString If display proxies were generated for the object archive given in Filename, these attribute values should be set by the callback, as absolute paths to the display proxies for the XY, XZ and YZ planes. The display proxies are drawn to fit the bounding box of the archive. The display proxy images should be saved in a format that Softimage recognises.
siRenderQueryArchiveBBox Filename CString A file path to an object archive.
Frame int The frame number within the archive that the bounding box should be returned for. Only needed for multi-frame archives. For single-frame archives, the Filename attribute value is sufficient.
BBoxMin

BBoxMax
CVector3 These attribute values should be set by the callback as the full bounding box of the renderable geometry contained inside the object archive. The minimum and maximum extents should be set as CVector3 values for an axis-aligned bounding box.
siRenderQueryArchiveFrameRange Filename CString A file path to an object archive.
FrameStart

FrameEnd
int These attribute values should be set by the callback as the frame range for the multi-frame object archive given by the Filename attribute. This is only called if the callback has identified the object archive as a multi-frame archive. Both values are inclusive.
siRenderQueryDisplayBitDepths BitDepths CLongArray This attribute should be set by the callback as an array of siImageBitDepth values, indicating which bit depths Softimage can ask the renderer to returns image fragments for (see RendererImageFragment::GetScanlineRGBA).

Values currently understood by Softimage are:
siRenderQueryWantDirtyList WantDirtyList bool This attribute should be set, prior to return, to indicate whether the renderer requires a dirty list or not. If upon return this value is true, a dirty list will be supplied to the render upon each call to the Process callback. If set to false, no dirty list will be supplied.

By default a dirty list is supplied, whether this query code is handled or not. This is mainly an optimization hint for renderers that don't mirror the scene graph.
siRenderQueryVersionString Version CString This attribute should be set on return with the rendering engine's version identifier. This version identifier can be different from the plugin version, in case they carry different version numbers. There is no restriction on the formatting of the version identifier.

See Also