'
' This example demonstrates how to apply a lens shader to a
' camera and then iterate over the new shader's parameters
'
NewScene , false
CreateShaderFromPreset "$XSI_DSPRESETS\Shaders\Lens\Fisheye.Preset", "Camera.camera"
SIConnectShaderToCnxPoint "Camera.camera.Fisheye", "Camera.camera.lensshader", False
set oCam = ActiveSceneRoot.FindChild("Camera")
for each oShader in oCam.Shaders
LogMessage "name of shader: " & oShader.Name
LogMessage "shader parameters: "
for each oParam in oShader.Parameters
LogMessage vbTab & oParam.Name
next
next
' INFO : name of shader: Fisheye
' INFO : shader parameters:
' INFO : Name
' INFO : bypass
' INFO : distortion
' INFO : scale_x
' INFO : scale_y
' INFO : scale_uniform
|