AddParameter3 (CustomProperty)

Description

Adds a new custom parameter to the custom property. This version is a simplified version of CustomProperty.AddParameter2.

The most commonly-used siCapabilities flags, siAnimatable and siReadOnly, are exposed directly as optional arguments.

Most parameters can be specified with this method. However you should consider using CustomProperty.AddParameter or CustomProperty.AddParameter2 if the parameter needs a UI range, specific classification flags, or a user name.

Scripting Syntax

CustomProperty.AddParameter3( ScriptName, ValueType, [DefaultValue], [Min], [Max], [Animatable], [ReadOnly] )

C# Syntax

Parameter CustomProperty.AddParameter3( String in_ScriptName, siVariantType in_ValueType, Object in_DefaultValue, Object in_Min, Object in_Max, Boolean in_bAnimatable, Boolean in_bReadOnly );

Parameters

Parameter

Type

Description

ScriptName

String

Name of the custom parameter. This argument specifies both the Parameter.ScriptName and SIObject.Name. It should not contain spaces.

ValueType

siVariantType

Type of the custom parameter. The recommended types are siString, siBool, siInt4, siUByte, and siFloat. (See Parameter.ValueType)

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)

Animatable

Boolean

Specify that the parameter should support animation. This argument is ignored for string parameters, which do not support animation. It is possible to override this setting on a particular instance of a parameter via Parameter.Animatable.

Default Value: true

ReadOnly

Boolean

Specify that the user cannot change the value of this Parameter. A read-only parameter can still be changed via scripting (see Parameter.Value) It is possible to override this setting on a particular instance of a parameter via Parameter.ReadOnly.

Default Value: false

Return Value

The newly created Parameter object.

See Also

CustomProperty

CustomProperty.AddParameter2

Parameter

siCapabilities



Autodesk Softimage v7.5