def loadPreset(presetName): p = Preset(LOCAL, TOOL_NAME, presetName, XTN) if not p.exists(): p = Preset(GLOBAL, TOOL_NAME, presetName, XTN) assert p.exists(), "Cannot find a %s preset called %s" % (XTN, presetName) return loadPresetFile(p)
def writePreset(presetName): preset = Preset(LOCAL, TOOL_NAME, presetName, XTN) writePresetToFile(preset.path())