Module cPreferences
Maintain multiple preferences for a tool and switch between them.
##
Each profile is basically a copy of the preferences.xml stored in the special 'profiles' folder.
Note: cPreferences stores it's own settings in the root of the this folder
Functions
get_selected_profile () | Getter/Setters |
scan_profiles () | Class Methods |
remove_profile (idx) | save preferences for the selected profile |
add_profile (str_name) | save preferences for the selected profile |
rename_profile (idx, str_name) | save preferences for the selected profile |
update_profile () | save preferences for the selected profile |
Tables
self.profiles | table |
Fields
self.tool_name | string, supply to make the launch dialog feel more familiar |
self.doc_class_name | string, provide name if preferences is based on a class |
self.active_instances | number of active instances (read-only) |
self.selected_profile_index | number, the profile we're running |
self.selected_profile | table |
self.launch_callback | function, deliver a custom profile to the tool |
self.default_callback | function, ask the tool to load standard prefs |
self.abort_callback | function, ask the tool not to start |
self.profiles_enabled | boolean, if true: detect active instances and choose a profile (an active instance is a profile launched within the cutoff time) if false: use the preferences.xml in the bundle path (in other words, act as a normal tool) |
self.always_choose | boolean, if true we always show the chooser |
self.recall_profile | string, the profile to recall on startup |
self.dialog | renoise.Dialog |
self.dialog_contents | renoise.Views.View |
self.suppress_saving | boolean |
Functions
- get_selected_profile ()
- Getter/Setters
- scan_profiles ()
- Class Methods determine which profiles are active/available + create folders when missing
- remove_profile (idx)
-
save preferences for the selected profile
Parameters:
- idx
Returns:
-
boolean,string
- add_profile (str_name)
-
save preferences for the selected profile
Parameters:
- str_name
Returns:
-
boolean,string
- rename_profile (idx, str_name)
-
save preferences for the selected profile
Parameters:
- idx
- str_name
Returns:
-
boolean,string
- update_profile ()
-
save preferences for the selected profile
Returns:
-
boolean,string
Tables
Fields
- self.tool_name
- string, supply to make the launch dialog feel more familiar
- self.doc_class_name
- string, provide name if preferences is based on a class
- self.active_instances
- number of active instances (read-only)
- self.selected_profile_index
- number, the profile we're running
- self.selected_profile
- table
- self.launch_callback
-
function, deliver a custom profile to the tool
- doc , renoise.DocumentNode
- self.default_callback
- function, ask the tool to load standard prefs
- self.abort_callback
- function, ask the tool not to start
- self.profiles_enabled
- boolean, if true: detect active instances and choose a profile (an active instance is a profile launched within the cutoff time) if false: use the preferences.xml in the bundle path (in other words, act as a normal tool)
- self.always_choose
- boolean, if true we always show the chooser
- self.recall_profile
- string, the profile to recall on startup
- self.dialog
- renoise.Dialog
- self.dialog_contents
- renoise.Views.View
- self.suppress_saving
- boolean