With the Preferences functions, you can retrieve information about the whole preference system. The user can set and retrieve the value of any preferences in the software.
More...
|
ColorRGBA | getColor (String name, ColorRGBA defaultValue) |
| get the color from the given preference name More...
|
|
void | setColor (String name, ColorRGBA color) |
| set the color for the given preference name More...
|
|
double | getDouble (String name, double defaultValue) |
| get the double value from the given preference name More...
|
|
void | setDouble (String name, double value) |
| set the double value for the given preference name More...
|
|
double | getInt (String name, int defaultValue) |
| get the integer value from the given preference name More...
|
|
void | setInt (String name, int value) |
| set the integer value for the given preference name More...
|
|
bool | getBool (String name, bool defaultValue) |
| get the boolean value from the given preference name More...
|
|
void | setBool (String name, bool value) |
| get the boolean value for the given preference name More...
|
|
String | getString (String name, String defaultValue) |
| get the string value from the given preference name More...
|
|
void | setString (String name, String value) |
| set the string value for the given preference name More...
|
|
double | getEnumValue (String name, int defaultValue) |
|
void | setEnumValue (String name, int value) |
|
With the Preferences functions, you can retrieve information about the whole preference system. The user can set and retrieve the value of any preferences in the software.
The actual name and current value of a preference are in stored in the user configuration file.
The file prefs.xml contains a description of all preferences recognized by the application. The keyword to access each predefined preference is also found in that file.
Scripts can change or retrieve any existing preference, and may create new preferences.
You can use it in Script Editor only.
function toggleAutoSaveLayout()
{
var b;
print( "preference to automatically save the layout was " + b );
print( "preference for auto save layout is now " + b );
}