v4.0
Adds a control to the PPGLayout. Normally this new item will
represents a parameter on the object that is inspected, and will
allow a user to view and change its value. For example this method
can be used to add a Slider control which shows the value of a
numeric parameter on a CustomProperty.
It is possible to add any kind of control using this method.
However convenience methods such as PPGLayout.AddColor have been added
for some of the most common controls.
Often a call to this method is followed by one or more calls to
PPGItem.SetAttribute to
provide additional information about the appearance of the
item.
oReturn = PPGLayout.AddItem( ParamName, [Label], [UIType] ); |
Parameter | Type | Description |
---|---|---|
ParamName | String | Scripting name of the Parameter. The call does not fail even if no parameter by this name exists. However in that case the control is not drawn as part of the layout. (See PPGItem.Name). |
Label | String | Most controls have a label, for example the text that appears to the left of a numeric slider. If not specified here, the name of the parameter (see SIObject.Name) or Parameter.ScriptName is shown instead. (See PPGItem.Label). |
UIType | siPPGControlType | Specify the control to draw. For example this argument can be
used to specify that a parameter should be displayed as a combo
box. (See PPGItem.Type). If not specified, Softimage uses a simple heuristic for determining what control to use, based on the Parameter.ValueType. For example strings have an edit control, numeric types like float and integer use a slider, and boolean parameters use a checkbox. |