Renderer Class Reference



Your Ad Here

This object is provided as the source object available from the RendererContext for a Plugin-based Custom Renderer object. More...

#include <xsi_renderer.h>

Inheritance diagram for Renderer:

SIObject CBase List of all members.

Public Member Functions

  Renderer ()
  ~Renderer ()
  Renderer (const CRef &in_ref)
  Renderer (const Renderer &in_obj)
bool  IsA (siClassID in_ClassID) const
siClassID  GetClassID () const
Renderer operator= (const Renderer &in_obj)
Renderer operator= (const CRef &in_ref)
CStatus  PutProcessTypes (const CLongArray &in_types)
CStatus  PutArchiveFormat (const CString &in_strName, const CString &in_strExtension, bool in_bMultiFrame)
CStatus  AddProperty (siRenderPropertyType in_eType, const CString &in_strName)
CStatus  AddOutputImageFormat (const CString &in_strName, const CString &in_strExtension)
CStatus  AddOutputImageFormatSubType (siRenderChannelType in_eChannelType, const CString &in_strDataType, siImageBitDepth in_eBitDepth)
CStatus  LockSceneData ()
CStatus  UnlockSceneData ()

Detailed Description

This object is provided as the source object available from the RendererContext for a Plugin-based Custom Renderer object.

See also:
PluginRegistrar::RegisterRenderer
Since:
6.01


Constructor & Destructor Documentation

Renderer (  ) 

Default constructor.

~Renderer (  ) 

Default destructor.

Renderer ( const CRef in_ref  ) 

Constructor.

Parameters:
in_ref  constant reference object.

Renderer ( const Renderer in_obj  ) 

Copy constructor.

Parameters:
in_obj  constant class object.


Member Function Documentation

bool IsA ( siClassID  in_ClassID  )  const [virtual]

Returns true if a given class type is compatible with this API class.

Parameters:
in_ClassID  class type.
Returns:
true if the class is compatible, false otherwise.

Reimplemented from SIObject.

siClassID GetClassID (  )  const [virtual]

Returns the type of the API class.

Returns:
The class type.

Reimplemented from SIObject.

Renderer& operator= ( const Renderer in_obj  ) 

Creates an object from another object.

Parameters:
in_obj  constant class object.
Returns:
The new Renderer object.

Renderer& operator= ( const CRef in_ref  ) 

Creates an object from a reference object. The newly created object is set to empty if the input reference object is not compatible.

Parameters:
in_ref  constant class object.
Returns:
The new Renderer object.

Reimplemented from SIObject.

CStatus PutProcessTypes ( const CLongArray in_types  ) 

Sets the types of processes this rendering engine can handle as a list of enumeration values. This function should only be called from the renderer's Init callback. In any other callback it has no effect. in_types List of process types supported by this renderer. CStatus::OK Process types set successfully CStatus::Fail No valid process types given. CStatus::AccessDenied Not in initialization mode.

CStatus PutArchiveFormat ( const CString in_strName,
const CString in_strExtension,
bool  in_bMultiFrame  
)

Sets the name of the archive format and the default extension if the renderer supports render archives. The caller can also indicate whether the archive format supports multi-frame output to a single archive file.

Note:
This function should only be called from the renderer's Init callback. In any other callback it has no effect.
Parameters:
in_strName  The name of the format to use. This is used for display purposes, such as browsing.
in_strExtension  The standard file extension used for the format. This is appended automatically when creating archive output file paths from the archive filename template.
in_bMultiFrame  True if the archive format supports multiple frames in a single file. Otherwise XSI always writes out separate files for each frame.
Returns:
CStatus::OK Archive settings set successfully.

CStatus::AccessDenied Not in initialization mode.

CStatus AddProperty ( siRenderPropertyType  in_eType,
const CString in_strName  
)

Adds a new property that should be created for the specified type. The last property added for a specified type will be the one used.

Note:
This function should only be called from the renderer's Init callback. In any other callback it has no effect.
Parameters:
in_eType  The type of render property associated with the property given.
in_strName  The name of the property to create for the render property type.
Returns:
CStatus::OK Property type added successfully.

CStatus::AccessDenied Not in initialization mode.

CStatus AddOutputImageFormat ( const CString in_strName,
const CString in_strExtension  
)

Adds a new output image format that is supported by this renderer. The format will be available to the user to select for controlling which output format to write the rendered framebuffers out as. Used with Renderer::AddOutputImageFormatSubType to create a complete output image format description.

Note:
This function should only be called from the renderer's Init callback. In any other callback it has no effect.
Parameters:
in_strName  The name of the format as shown to the user.
in_strExtension  The format's extension.
Returns:
CStatus::OK Image format definition begin accepted.

CStatus::AccessDenied Not in initialization mode.

CStatus AddOutputImageFormatSubType ( siRenderChannelType  in_eChannelType,
const CString in_strDataType,
siImageBitDepth  in_eBitDepth  
)

Adds a new sub-type to the image format. The sub-type is based on a render channel type and controls which formats, and sub-types thereof, will be offered to the user based on the render channel type of the render channel on which a framebuffer is based.

Note:
This function should only be called from the renderer's Init callback. In any other callback it has no effect.
Parameters:
in_eChannelType  Render channel type to associate this image format sub-type with.
in_strDataType  The data type being output from the render channel.
in_eBitDepth  The resolution of each individual component of the data type.
Returns:
CStatus::OK Sub-type successfully added.

CStatus::AccessDenied Not in initialization mode or an output image format has not been added yet.

CStatus LockSceneData (  ) 

Locks the scene data from modification while the render data is being pushed. It is very important that this function be called before any other SDK access function is called, otherwise other running threads could potentially modify the data while the rendering thread is trying to access it.

If the function returns CStatus::Abort the render callback should return with CStatus::Abort to indicate to the render controller that an abort has been successfully received. In that case Renderer::UnlockSceneData should not be called, since the lock has been rejected anyway.

Note:
This function should only be called from the renderer's Init callback. In any other callback it has no effect.
Returns:
CStatus::OK The scene data is locked.

CStatus::Abort The rendering engine is being aborted and should return immediately.

CStatus UnlockSceneData (  ) 

Unlocks the scene data after locking. It is important that Renderer::LockSceneData be paired with this function, otherwise the scene database could be left locked after the render process is done, leaving XSI in a locked up state.

Note:
This function should only be called from the renderer's Init callback. In any other callback it has no effect.
Returns:
CStatus:OK The scene data is now unlocked.


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

Return to Softimage XSI Index


Your Ad Here