Custom scriptable class for cameras using RenderMan Shader Language (RSL) Shaders.
Inherits :
DAZ Script |
---|
DzShaderCamera () |
DzShaderCamera ( String definitionFile, String renderTimeFile ) |
DzShaderCamera ( String definitionFile ) |
DAZ Script | |
---|---|
Boolean | addShader ( DzRSLShader shader ) |
String | getCameraName () |
String | getDefinitionFile () |
Number | getNumShaders () |
String | getRenderTimeFile () |
DzRSLShader | getShader ( Number index ) |
Boolean | removeShader ( DzRSLShader shader ) |
void | setCameraName ( String name ) |
void | setDefinitionFile ( String definitionFile, Boolean doOverride=false, Boolean runScript=true ) |
Boolean | setRenderTimeFile ( String renderTimeFile ) |
Methods (render-time) | |
These methods affect the camera at render-time, and are provided for the render-time script only. Calling these functions from outside the render-time script will have no effect. A global transient variable named Camera - referring to the current DzShaderCamera - exists for the duration of the render-time script. Referencing this variable from outside a render-time script will result in an error. |
|
void | declare ( Array tokens, Array types ) |
void | setDisplay ( String name, String type, String mode, Array tokens, Array params ) |
void | setHider ( String type, Array tokens, Array params ) |
void | setOption ( String option, Array tokens, Array params ) |
This class provides a DzBasicCamera derived object with creator-defined properties that will be passed to the RSL Shader at render-time. Properties intended to be used to pass values as arguments to a shader attached to the camera must be added using DzRSLShader. Properties for the camera that will be used by the render-time scripts to set attributes must be added via DzElement::addProperty().
Default Constructor.
DzShaderCamera( String definitionFile, String renderTimeFile )
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Parameter(s):
See Also:
DzShaderCamera( String definitionFile )
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Parameter(s):
See Also:
Boolean : addShader( DzRSLShader shader )
Adds shader to this camera's internal list of shaders and sets shader 's owner to this camera.
Return Value:
true
if shader is successfully added to the list (e.g. does not already exist), otherwise false
.String : getCameraName()
Return Value:
Return Value:
Number : getNumShaders()
Return Value:
Return Value:
DzRSLShader : getShader( Number index )
Return Value:
Boolean : removeShader( DzRSLShader shader )
Removes shader from this camera's internal list of shaders.
Return Value:
true
if shader is successfully removed from the list, otherwise false
.void : setCameraName( String name )
Sets the internal name of the camera; this is not the same as the QObject::name property. By default, this is “Custom”.
void : setDefinitionFile( String definitionFile, Boolean doOverride=false, Boolean runScript=true )
Sets the relative path of the [DAZ Script] file that builds this camera's property list.
Parameter(s):
Attention:
Camera
- referring to the current DzShaderCamera, exists for the duration of definitionFile. Referencing this variable from outside definitionFile will result in an error.Boolean : setRenderTimeFile( String renderTimeFile )
Sets the relative path of the [DAZ Script] file that will be executed at render-time. This script can declare variables, set displays, hiders, and/or options as well as shader parameters for the element, and implement custom logic for special effects.
Parameter(s):
Return Value:
true
if renderTimeFile is valid, otherwise false
.Attention:
Camera
- referring to the current DzShaderCamera - exists for the duration of renderTimeFile. Referencing this variable from outside filename will result in an error. See the Render Time Functions for a list of special functions only available to this script.void : declare( Array tokens, Array types )
Sets the global graphic state by adding a series of RiDeclare calls before RiWorldBegin.
Parameter(s):
Example:
var aTokens = [ "Nn", "Pp", "Cc", "Ff" ]; var aParams = [ "varying normal", "varying point", "varying color", "varying float" ]; Camera.declare( aTokens, aParams );
void : setDisplay( String name, String type, String mode, Array tokens, Array params )
Sets the global graphic state by adding a RiDisplayV call before RiWorldBegin.
Parameter(s):
Example:
NEED EXAMPLE
void : setHider( String type, Array tokens, Array params )
Sets the global graphic state by adding a RiHiderV call before RiWorldBegin.
Parameter(s):
Example:
NEED EXAMPLE
void : setOption( String option, Array tokens, Array params )
Sets the global graphic state by adding a RiOptionV call before RiWorldBegin.
Parameter(s):
Example:
NEED EXAMPLE