AnyPortrait > Script > Control Parameter

Control Parameter


Control parameters can be referenced or controlled by a script.
Controlling the control parameters affects the modifiers associated with them.


public apControlParam GetControlParam ( string controlParamName )
Description

   Retrieves the control parameter.


Parameters

   string controlParamName : The name of the control parameter


Return

   apControlParam : The control parameter with the requested name (null if not exist)


public bool IsControlParamExist ( string controlParamName )
Description

   Check that the control parameter with that name exists.


Parameters

   string controlParamName : The name of the control parameter


Return

   bool : Whether a control parameter with the requested name exists


public bool SetControlParamInt ( string controlParamName, int intValue )
public bool SetControlParamInt ( apControlParam controlParam, int intValue )
Description

   Specifies the value of an Int type control parameter.
   If it is outside the range of the control parameters, it is limited to the minimum or maximum value.


Parameters

   string controlParamName : The name of the control parameter
   apControlParam controlParam : Target control parameter
   ​int intValue : Int value


Return

   bool : Whether the process succeeded


public bool SetControlParamFloat ( string controlParamName, float floatValue )
public bool SetControlParamFloat ( apControlParam controlParam, float floatValue )
Description

   Specifies the value of an Float type control parameter.
   If it is outside the range of the control parameters, it is limited to the minimum or maximum value.


Parameters

   string controlParamName : The name of the control parameter
   apControlParam controlParam : Target control parameter
   ​float floatValue : Float value


Return

   bool : Whether the process succeeded


public bool SetControlParamVector2 ( string controlParamName, Vector2 vec2Value )
public bool SetControlParamVector2 ( apControlParam controlParam, Vector2 vec2Value )
Description

   Specifies the value of a control parameter of Vector2 type.
   If it is out of the control parameter range for X, Y axis respectively, it is limited to minimum or maximum value.


Parameters

   string controlParamName : The name of the control parameter
   apControlParam controlParam : Target control parameter
   Vector2 vec2Value : Vector2 value


Return

   bool : Whether the process succeeded


public bool SetControlParamDefaultValue ( string controlParamName )
Description

   Initializes the value of the control parameter to the default value.


Parameters

   string controlParamName : The name of the control parameter


Return

   bool : Whether the process succeeded