AddParameter (CustomProperty)

Description

Adds a new custom parameter to the custom property.

Note: For a JScript-compliant version, see CustomProperty.AddParameter2, and for a simplified version see CustomProperty.AddParameter3.

Scripting Syntax

CustomProperty.AddParameter( ScriptName, ValueType, [Classification], [Capabilities], [Name], [Description], [ObsoleteArg], [DefaultValue], [Min], [Max], [SuggestedMin], [SuggestedMax] )

C# Syntax

Parameter CustomProperty.AddParameter( String in_ScriptName, siVariantType in_ValueType, siParamClassification in_Classif, Int32 in_Caps, String in_name, String in_LongName, String in_Guid, Object in_DefaultValue, Object in_Min, Object in_Max, Object in_SuggestedMin, Object in_SuggestedMax );

Parameters

Parameter

Type

Description

ScriptName

String

Name of the custom parameter. This argument specifies the ScriptName of a parameter and should not contain any spaces. (See Parameter.ScriptName) If the short name or long name parameters are not specified then this name is also used as the short name and description.

ValueType

siVariantType

Type of the custom parameter. The recommended types are: siString, siBool, siInt4, siUByte, and siDouble. The supported types are: siString, siBool, siDouble, siFloat, siInt4, siInt2, siUInt4, siUInt2, siByte, siUByte (See Parameter.ValueType).

Classification

siParamClassification

Classification of the custom parameter.

Default Value: siClassifUnknown

Capabilities

(see Integer) bitfield based on siCapabilities

Capabilities of the custom parameter. If you create a custom property parameter that is not inspectable, it will not appear in the interface, but is still available from scripting. If the parameter is read-only, it is greyed out in the interface, but is also available from scripting. The siPersistable flag optional and assumed to be enabled for all custom parameters. This establishes a the default capability flags for all instances of the parameter, but these flags can be overridden on a per-instance basis via Parameter.Capabilities.

Default Value: siPersistable

Name

String

User friendly version of the custom parameter's name. This is the parameter name that appears in in the Scene Explorer (unless Show Script Names is enabled). If this argument is not specified then the ScriptName argument will be visible to users as the parameter's name. (See SIObject.Name and Parameter.ScriptName). This string will appear as the parameter label when the custom property is inspected, unless a specific label is specified in the PPGLayout, see PPGItem.Label.

Default Value: ScriptName is used

Description

String

A longer description of the custom parameter. Currently this string is not displayed in the user interface.

Default Value: ScriptName is used

ObsoleteArg

String

It is not necessary to specify this argument, it is ignored.

Default Value: ""

DefaultValue

Variant

Default value of the custom parameter. A default value for a numerical values including boolean is 0, the string default is "". (See Parameter.Default)

Min

Variant

Minimum value of the custom parameter. siString and siBool types do not require a Min value. For all other numerical type the default will be minimum value possible for the type for example all unsigned values will have a min=0. (See Parameter.Min)

Max

Variant

Maximum value of the custom parameter. siString and siBool types do not require a Max value. For all other numerical type the default will be minimum value possible for the type for example the maximum value for siUByte is 255. (See Parameter.Max)

SuggestedMin

Variant

Suggested minimum value of the custom parameter. siString and siBool types do not require a SuggestedMin value. The default suggested minimum value for numerical values will be 0. The suggested minimum should be equal or larger than the minimum. This value is used to configure the range of UI controls. (See Parameter.SuggestedMin)

SuggestedMax

Variant

Suggested maximum value of the custom parameter. siString and siBool types do not require a SuggestedMax value. The default suggested maximum value for numerical values will be 100. The suggested maximum should be equal or smaller than the Maximum. This value is used to configure the range of UI controls. (See Parameter.SuggestedMax)

Return Value

The newly created Parameter object.

See Also

CustomProperty

CustomProperty.AddParameter2

CustomProperty.AddParameter3

Parameter

Examples

• See CustomProperty.AddParameter.1.vbs



Autodesk Softimage 2011