ShaderParamDefOptions Class Reference
 
 
 
ShaderParamDefOptions Class Reference

#include <xsi_shaderparamdefoptions.h>


Class Description

Represents the advanced options for a shader parameter definition (ShaderParamDef) object.

This object provides a convenient way to specify certain characteristics for each shader parameter definition (for example, display name, default values, capabilities, etc.). You can use the same ShaderParamDefOptions object for multiple parameters, changing only the display name (and any other characteristics you need to).

The Factory::CreateShaderParamDefOptions function creates a new ShaderParamDefOptions object which you need to pass to the ShaderParamDefContainer::AddParamDef or ShaderParamDefContainer::AddArrayParamDef when adding parameter definitions.

See also:
Factory::CreateShaderParamDefOptions, ShaderParamDefContainer::AddParamDef, ShaderParamDefContainer::AddArrayParamDef, ShaderParamDef, Adding Parameter Definitions, Color Sampler example
Since:
9.0 (2011)
Inheritance diagram for ShaderParamDefOptions:
SIObject CBase

List of all members.

Public Member Functions

  ShaderParamDefOptions ()
  ~ShaderParamDefOptions ()
  ShaderParamDefOptions (const CRef &in_ref)
  ShaderParamDefOptions (const ShaderParamDefOptions &in_obj)
bool  IsA (siClassID in_ClassID) const
siClassID  GetClassID () const
ShaderParamDefOptions operator= (const ShaderParamDefOptions &in_obj)
ShaderParamDefOptions operator= (const CRef &in_ref)
CStatus  SetAnimatable (bool in_v)
CStatus  SetDefaultValue (const CValue &in_v)
CStatus  SetHardLimit (const CValue &in_vMin, const CValue &in_vMax)
CStatus  SetInspectable (bool in_v)
CStatus  SetLongName (const CString &in_str)
CStatus  SetShortName (const CString &in_str)
CStatus  SetSoftLimit (const CValue &in_vMin, const CValue &in_vMax)
CStatus  SetTexturable (bool in_v)
CStatus  SetAttribute (const CString &in_name, const CValue &in_value)
CStatus  SetReadOnly (bool in_v)

Constructor & Destructor Documentation

Default constructor.

Default destructor.

ShaderParamDefOptions ( const CRef in_ref )

Constructor.

Parameters:
in_ref constant reference object.

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.

ShaderParamDefOptions& operator= ( const ShaderParamDefOptions in_obj )

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

Parameters:
in_obj constant class object.
Returns:
The new ShaderParamDefOptions object.
Since:
9.0 (2011)
ShaderParamDefOptions& 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 ShaderParamDefOptions object.
Since:
9.0 (2011)

Reimplemented from SIObject.

CStatus SetAnimatable ( bool  in_v )

Sets whether or not this shader parameter can be animated.

Parameters:
in_v true if animatable
Returns:
Success/failure
See also:
ShaderParamDefOptions::SetTexturable, ShaderParamDefOptions::SetInspectable, ShaderParamDef::GetCapabilities, siCapabilities, Parameter::PutCapabilityFlag, Parameter::GetCapabilities
Since:
9.0 (2011)
CStatus SetDefaultValue ( const CValue in_v )

Sets the default value for this parameter definition. This defines the value that will be set on the instantiated ShaderParameter (Parameter::GetDefault).

Parameters:
in_v Default value to use.
Returns:
Success/failure
See also:
ShaderParamDef::HasDefaultValue, ShaderParamDef::GetDefaultValue, ShaderParamDef::SetDefaultValue, Parameter::GetDefault, Parameter::PutValue
Since:
9.0 (2011)
CStatus SetHardLimit ( const CValue in_vMin,
const CValue in_vMax 
)

Sets the minimum and maximum values for this parameter definition. This defines the valid value range when instantiated (Parameter::GetMin and Parameter::GetMax).

Parameters:
in_vMin Minimum allowable value.
in_vMax Maximum allowable value.
Returns:
Success/failure
See also:
ShaderParamDefOptions::SetSoftLimit, Parameter::GetMin, Parameter::GetMax
Since:
9.0 (2011)
CStatus SetInspectable ( bool  in_v )

Sets whether or not this parameter definition will appear on the property page associated with the instantiated Shader.

Parameters:
in_v true if inspectable (will appear on the property page).
Returns:
Success/failure
See also:
ShaderParamDefOptions::SetAnimatable, ShaderParamDefOptions::SetTexturable, siCapabilities, Parameter::PutCapabilityFlag, Parameter::GetCapabilities
Since:
9.0 (2011)
CStatus SetLongName ( const CString in_str )

Sets the a user-friendly version of the parameter name that will appear in the UI. This is the value that the Parameter::GetScriptName function returns on the instance (ShaderParameter).

Note:
If you don't set this option, the name you pass to the ShaderParamDefContainer::AddParamDef or ShaderParamDefContainer::AddArrayParamDef function when adding the ShaderParamDef will appear in the UI instead. Alternatively, you could also specify the UI name when you add this parameter as a PPGItem on the property page or render tree layout via the PPGLayout::AddItem function.
Parameters:
in_str parameter name to be displayed in the UI (either on the shader node or on the associated property page).
Returns:
Success/failure
See also:
ShaderParamDefOptions::SetShortName, PPGLayout::AddItem, Refining UI Controls for Parameter Definitions
Since:
9.0 (2011)
CStatus SetShortName ( const CString in_str )

Sets the short version of the parameter name (the ShaderParamDef::GetDisplayName). This is the name that appears in the Scene Explorer (with the View > Use Script Names option turned OFF). It is also the same value that SIObject::GetName returns on the instance (ShaderParameter).

Note:
If you don't set this option, the name you pass to the ShaderParamDefContainer::AddParamDef or ShaderParamDefContainer::AddArrayParamDef function when adding the ShaderParamDef will be used instead.
Parameters:
in_str The DisplayName as it will appear in the Scene Explorer
Returns:
Success/failure
See also:
ShaderParamDef::GetDisplayName, SIObject::GetName, ShaderParamDefOptions::SetLongName
Since:
9.0 (2011)
CStatus SetSoftLimit ( const CValue in_vMin,
const CValue in_vMax 
)

Sets the suggested minimum and maximum values for this parameter definition. This defines the value range that is displayed in the property page when instantiated (Parameter::GetSuggestedMin and Parameter::GetSuggestedMax).

Parameters:
in_vMin Minimum suggested value.
in_vMax Maximum suggested value.
Returns:
Success/failure
See also:
ShaderParamDefOptions::SetHardLimit, Parameter::GetSuggestedMin, Parameter::GetSuggestedMax
Since:
9.0 (2011)
CStatus SetTexturable ( bool  in_v )

Sets whether or not this parameter definition will be a shader node port when instantiated (supports being connected to a rendering node).

Parameters:
in_v true if texturable.
Returns:
Success/failure
See also:
ShaderParamDef::SetTexturable, ShaderParamDefOptions::SetAnimatable, ShaderParamDefOptions::SetInspectable, siCapabilities, Parameter::PutCapabilityFlag, Parameter::GetCapabilities
Since:
9.0 (2011)
CStatus SetAttribute ( const CString in_name,
const CValue in_value 
)

Sets an attribute by name. The attribute can be named anything and can contain any value. A list of attributes that Softimage understands can be found in siShaderParameterAttribute.

Parameters:
in_name Name of the attribute to set. Can be one of the siShaderParameterAttribute string constants or a string that you define, such as "version".
in_value Value to set. This could be one of the Softimage shader string constants (siShaderReferenceFilterType, siShaderPropertyFilterType, siShaderCustomDataType), or a custom value.
Returns:
CStatus::OK
See also:
siShaderReferenceFilterType, siShaderPropertyFilterType, siShaderCustomDataType, Shader Parameter Definitions
Since:
9.0 (2011)
CStatus SetReadOnly ( bool  in_v )

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