VS:vsoAddParamWidget: Difference between revisions
Jump to navigation
Jump to search
m (1 revision) |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 24: | Line 24: | ||
widgetID | widgetID | ||
LONGINT | LONGINT | ||
A unique number specified by the user to identify this widget. | |||
</line> | </line> | ||
<line> | <line> | ||
paramName | paramName | ||
STRING | STRING | ||
The universal name of the parameter. | |||
</line> | </line> | ||
<line> | <line> | ||
locName | locName | ||
STRING | STRING | ||
Localized text that will appear next to the widget. <b>Note!</b> If you specify an empty string, the alternate name of the parameter will be used. | |||
</line> | </line> | ||
</lineList> | </lineList> | ||
Line 43: | Line 43: | ||
----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ||
<sample></sample> | <sample> | ||
<code lang="py"> | |||
# add the widgets the way we like | |||
ok = vs.vsoAddParamWidget( kWidgetID_TotalHeight, 'height', '' ) | |||
ok = vs.vsoAddParamWidget( kWidgetID_HeadShape, 'Head Shape', '' ) | |||
ok = vs.vsoAddParamWidget( kWidgetID_Sex, 'Sex', '' ) | |||
ok = vs.vsoAddParamWidget( kWidgetID_Hair, 'Hair', '' ) | |||
ok = vs.vsoAddParamWidget( kWidgetID_HairLen, 'Hair Length', '' ) | |||
vs.vsoWidgetSetIndLvl( kWidgetID_HairLen, 1 ) | |||
ok = vs.vsoAddWidget( kWidgetID_DefaultHairLen, 12, 'Reset Default' ) | |||
vs.vsoWidgetSetIndLvl( kWidgetID_DefaultHairLen, 1 ) | |||
</code> | |||
</sample> | |||
----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
Latest revision as of 18:43, 20 March 2014
.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix
Description
Add a widget for parameter to appear in the Object Info Palette.
FUNCTION vsoAddParamWidget(
widgetID :LONGINT;
paramName :STRING;
locName :STRING) : BOOLEAN;
def vs.vsoAddParamWidget(widgetID, paramName, locName): return BOOLEAN
Parameters
widgetID LONGINT A unique number specified by the user to identify this widget. paramName STRING The universal name of the parameter. locName STRING Localized text that will appear next to the widget. Note! If you specify an empty string, the alternate name of the parameter will be used.
Example
# add the widgets the way we like ok = vs.vsoAddParamWidget( kWidgetID_TotalHeight, 'height', '' ) ok = vs.vsoAddParamWidget( kWidgetID_HeadShape, 'Head Shape', '' ) ok = vs.vsoAddParamWidget( kWidgetID_Sex, 'Sex', '' ) ok = vs.vsoAddParamWidget( kWidgetID_Hair, 'Hair', '' ) ok = vs.vsoAddParamWidget( kWidgetID_HairLen, 'Hair Length', '' ) vs.vsoWidgetSetIndLvl( kWidgetID_HairLen, 1 ) ok = vs.vsoAddWidget( kWidgetID_DefaultHairLen, 12, 'Reset Default' ) vs.vsoWidgetSetIndLvl( kWidgetID_DefaultHairLen, 1 )
Version
Availability: from Vectorworks 2011