Presets manager: track presets used in Presets menu and preset command

class PresetsManager(session, name)

Manager for presets

add_presets(category, preset_info)

Experimental API . ‘preset_info’ should be a dictionary of preset-name -> callback-function/command-string

execute(preset)

Experimental API . Presets should call this method to execute their preset so that appropriate information about the preset can be logged. The ‘preset’ argument is either a command string or a callable Python function that takes no arguments.

A command string can have embedded ‘;’ characters to separate commands. It can also have embedded newlines to separate commands, in which case the newline-separated commands will be executed with separate calls to chimera.core.commands.run(), whereas ‘;’ separated commands will use a single run() call. It can be important in some scenarios to use saparate run() calls so that the preset manager can run chimerax.atomic.check_for_changes() in between calls.