An animatable enum property.
Inherits :
DAZ Script |
---|
DzEnumProperty () |
DzEnumProperty ( String name, Boolean canAnimate, Boolean isUserProperty ) |
DAZ Script | |
---|---|
Number | addItem ( String item, Number index=-1 ) |
Number | findItemString ( String str ) |
String | getDefaultStringValue () |
String | getItem ( Number i ) |
String | getKeyStringValue ( Number i ) |
Number | getNumItems () |
String | getRawStringValue () |
String | getRawStringValue ( DzTime tm ) |
String | getStringValue ( DzTime tm ) |
String | getStringValue () |
String | getUniqueItemString ( String item ) |
void | removeAllItems () |
Boolean | removeItem ( Number index ) |
Boolean | replaceItem ( Number index, String item ) |
void | setItems ( Array items ) |
Boolean | setValueFromString ( String str ) |
Boolean | setValueFromString ( DzTime tm, String str ) |
void | itemListChanged () |
This class provides an animatable enumerated property that is stored and can be accessed as an integer property. It maintains a list of strings that correspond to the integer value of the property.
Default Constructor. Creates a non-animatable, non-user property.
DzEnumProperty( String name, Boolean canAnimate, Boolean isUserProperty )
Parameter(s):
true
, creates an animatable property.true
, creates a user property; user properties are properties that can be added/deleted by users.Number : addItem( String item, Number index=-1 )
Adds a string to the available choices for this property. Duplicates are not allowed.
Parameter(s):
Return Value:
Number : findItemString( String str )
Searches the property for an item that matches the given string.
Parameter(s):
Return Value:
String : getDefaultStringValue()
Return Value:
Parameter(s):
Return Value:
String : getKeyStringValue( Number i )
Parameter(s):
Return Value:
Number : getNumItems()
Return Value:
Return Value:
String : getRawStringValue( DzTime tm )
Parameter(s):
Return Value:
String : getStringValue( DzTime tm )
Parameter(s):
Return Value:
String : getStringValue()
Return Value:
String : getUniqueItemString( String item )
Return Value:
item
is not already in the list, it is returned. Otherwise, a number will be appended to item
to make it unique.void : removeAllItems()
Removes all items and makes this property essentially invalid.
Boolean : removeItem( Number index )
Removes the item at the given index.
Parameter(s):
Return Value:
true
if the item was successfully removed, otherwise false
.Boolean : replaceItem( Number index, String item )
Replaces the item at the given index with the given string.
Parameter(s):
Return Value:
false
if the index is out of range or the string is invalid (empty), otherwise true
.void : setItems( Array items )
Sets the items for this property.
Parameter(s):
Since:
Boolean : setValueFromString( String str )
Sets the current value of the property to the index of the item that matches the given string.
Parameter(s):
Return Value:
true
on success, false
if the given string does not match an item in this property.Boolean : setValueFromString( DzTime tm, String str )
Sets the value of the property at the given time to the index of the item that matches the given string.
Parameter(s):
Return Value:
true
on success, false
if the given string does not match an item in this property.void : itemListChanged()
Signature:“itemListChanged()”
Emitted when the item list (list of legal values for this property) changes.