EditParameterDefini tion

Introduced

1.5

Description

Edits the definition of a custom parameter. Skipped arguments are left unchanged.

For proxy parameters it is possible to adjust the parameter name and suggested range using this command, which leaves the master parameter unaffected. However the Min and Max attributes of a proxy parameter should be left the same as the master parameter's Min and Max values.

Scripting Syntax

    EditParameterDefinition( [InputObj], [ParamName], [VarType], [MinValue], [MaxValue], [SuggMin], [SuggMax], [ScriptName], [Description] )

Parameters

Parameter | Type | Description
InputObj | String | List of custom parameters. Default Value: Marked parameters
ParamName [in/out] | String | Name of the custom parameter. This appears in the scene explorer (unless "Show script names" is enabled).
VarType [in/out] | siVariantType | (Obsolete) It is not necessary to specify this argument, it is ignored. Default Value: 0
MinValue [in/out] | Double | Minimum value of the parameter
MaxValue [in/out] | Double | Maximum value of the parameter
SuggMin [in/out] | Double | Suggested minimum value of the parameter (for UI controls)
SuggMax [in/out] | Double | Suggested maximum value of the parameter (for UI controls)
ScriptName [in/out] | String | Scripting version of the parameter name. There should not be any space characters in the string.
Description [in/out] | String | A longer, descriptive version of the parameter name. This appears on the property page when the object is inspected.

Examples

VBScript Example

    '
    ' This example creates a new custom property set and a new
    ' parameter on a dummy null and then changes its definition.
    ' The parameter information is logged to the Script Editor
    ' History Pane so you can see what has changed.
    '
    ' Create a null to hold the new custom property set
    set oDummy = GetPrim( "Null" )

    ' Add custom property set called Emotions to the dummy
    AddProp "Custom_parameter_list", , , "Emotions"

    ' Add custom parameter Happiness to the Emotions property set
    SIAddCustomParameter "null.Emotions", "Happiness", _
              siDouble, 0.000, 0.000, 1.000, , 5, 0.000, 1.000

    ' What does it look like before editing the definition?
    printParamInfo oDummy.Properties( "Emotions" ).Parameters(0)

    ' Update the minimum and maximum values of Happiness
    EditParameterDefinition oDummy & ".Emotions.Happiness", , , _
              -100, 100, -100, 100

    ' What does it look like afterwards?
    printParamInfo oDummy.Properties( "Emotions" ).Parameters(0)

    ' Convenience function--saves time and typing
    function printParamInfo( in_parameter )
       LogMessage in_parameter & " information:"
       LogMessage "-------------------------------------"
       LogMessage vbTab & "Default value: " & vbTab & vbTab & in_parameter.Default
       LogMessage vbTab & "Description: " & vbTab & vbTab & in_parameter.Description
       LogMessage vbTab & "Is " & in_parameter.ScriptName & " marked?: " & vbTab & in_parameter.Marked
       LogMessage vbTab & "SuggestedMin value: " & vbTab & in_parameter.SuggestedMin
       LogMessage vbTab & "SuggestedMax value: " & vbTab & in_parameter.SuggestedMax
       LogMessage vbTab & "Actual Min value: " & vbTab & in_parameter.Min
       LogMessage vbTab & "Actual Max value: " & vbTab & in_parameter.Max
       LogMessage vbTab & "ScriptName: " & vbTab & vbTab & in_parameter.ScriptName
       LogMessage vbTab & "Value Type: " & vbTab & vbTab & in_parameter.ValueType & " (" & TypeName( in_parameter ) & ")"
       LogMessage vbTab & "Actual Value: " & vbTab & vbTab & in_parameter.Value
    end function

    ' Output of above script:
    ' ...before editing the parameter definition:
    'INFO : "null.Emotions.Happiness information:"
    'INFO : "-------------------------------------"
    'INFO : " Default value:  0"
    'INFO : " Description:  Happiness"
    'INFO : " Is Happiness marked?:  False"
    'INFO : " SuggestedMin value:  0"
    'INFO : " SuggestedMax value:  1"
    'INFO : " Actual Min value:  0"
    'INFO : " Actual Max value:  1"
    'INFO : " ScriptName:  Happiness"
    'INFO : " Value Type:  5 (Parameter)"
    'INFO : " Actual Value:  0"
    '
    ' ...afterwards:
    'INFO : "null.Emotions.Happiness information:"
    'INFO : "-------------------------------------"
    'INFO : " Default value:  0"
    'INFO : " Description:  Happiness"
    'INFO : " Is Happiness marked?:  False"
    'INFO : " SuggestedMin value:  -100"
    'INFO : " SuggestedMax value:  100"
    'INFO : " Actual Min value:  -100"
    'INFO : " Actual Max value:  100"
    'INFO : " ScriptName:  Happiness"
    'INFO : " Value Type:  5 (Parameter)"
    'INFO : " Actual Value:  0"

See Also

SIAddCustomParameter | RemoveCustomParam | Parameter | CustomProperty

Autodesk Softimage v7.5