Preferences

< Previous | Contents | Manuals Home | Boris FX | Next >

Preferences

Preferences are stored in a separate area. Changes to preferences must be enclosed in BeginPref()/AcceptPref(), though there is no undo for preferences changes. They do not show up in the main application Undo/Redo buttons.

SynthEyes organizes preferences in a big table that is displayed in the left-hand side of the preferences dialog. Python can access preferences according to that table. (There are some other preferences on the right hand side; they currently don't have a direct Python interface.)

You can access the preferences using the methods listed here, or via the Prefs() method, which returns an object that is both an enumerator and variable-property method, ie hlev.GetPrefFromName("UI font size") or hlev.Prefs().Get("fontsize") or hlev.Prefs().fontsize.

BeginPref() Begin making changes to the preferences

AcceptPref() Finish changing preferences.

Prefs() Returns a special preferences object that can serve as an iterator in for loops, and offers attributes for each preference, using its variable name.

NumPrefs() Number of accessible preferences

PrefVariable(idx) A programmer-style variable name for the preferences

object, used for Prefs()

PrefName(idx) User-visible preference name

PrefDescription(idx) Tooltip description text FindPrefFromVariable(prefnm) Get the index from the variable name FindPrefFromName(descr) Get the index from the user-readable name GetPrefFromIndex(idx) Get the preference's value from the index (int/float/string) GetPrefFromName(nm) Get the preference's value from the user name GetPrefFromVar(nm) Get the preference's value from the variable name. You

can also use the pithier hlev.Prefs().nm

SetPrefFromIndex(idx, val) Change the preference to the int/float/string value. Must be

within a BeginPref/AcceptPref pair.

SetPrefFromName(nm, val) Change the named preference to the int/float/string value.

Must be within a BeginPref/AcceptPref pair.

SetPrefFromVar(nm, val) Change the preference (specified by variable name) to the

int/float/string value. Must be within a BeginPref/AcceptPref pair. You can also use the pithier hlev.Prefs().nm = val

FolderPref(pnm) Returns the full path name for the given folder preference:

"BATCHIN", "BATCHOUT", "IMAGE", "SCENE",

"IMPORT", "EXPORT", "PREVIEW", "SCRIPT", "PHASELIB"

SetFolderPref(pnm, fpath) Sets the given ( pnm) folder preference to the full path

name fpath. The valid pnm values are given above.


©2024 Boris FX, Inc. — UNOFFICIAL — Converted from original PDF.