def GetSettingsForOperation(self, operation): """GetSettingsForOperation(operation) -> list_of_FSettingEntry Implements FApplication.GetSettingsForOperation() """ if (operation == IMPORT): return [FSettingEntry(*entry) for entry in FMax.__IMPORT_OPTIONS] elif (operation == EXPORT): return [FSettingEntry(*entry) for entry in FMax.__EXPORT_OPTIONS] elif (operation == RENDER): return [FSettingEntry(*entry) for entry in FMax.__RENDER_OPTIONS] else: return []
def GetSettingsForOperation(self, operation): """GetSettingsForOperation(operation) -> list_of_FSettingEntry Implements FApplication.GetSettingsForOperation() """ if (operation == IMPORT): return [] elif (operation == EXPORT): options = [] for entry in FMaya.__EXPORT_OPTIONS: options.append(FSettingEntry(*entry)) return options elif (operation == RENDER): options = [] for entry in FMaya.__RENDER_OPTIONS: options.append(FSettingEntry(*entry)) return options else: return []
def GetSettingsForOperation(self, operation): """GetSettingsForOperation(operation) -> list_of_FSettingEntry Implements FApplication.GetSettingsForOperation() """ if (operation == VALIDATE): options = [] for entry in CoherencyTest.__VALIDATE_OPTIONS: options.append(FSettingEntry(*entry)) return options else: return []
def GetSettingsForOperation(self, operation): """GetSettingsForOperation(operation) -> list_of_FSettingEntry Implements FApplication.GetSettingsForOperation() """ options = [] # Retrieve the list of options for this operation. optionList = None if operation == IMPORT: optionList = FMaya_UIRender.__IMPORT_OPTIONS elif operation == EXPORT: optionList = FMaya_UIRender.__EXPORT_OPTIONS elif operation == RENDER: optionList = FMaya_UIRender.__RENDER_OPTIONS # Return a correctly-processed list of FSettingEntry's. if optionList != None: for entry in optionList: options.append(FSettingEntry(*entry)) return options
def __init__(self, name, op, app): self.__shortName = name self.__name = "<" + op + "><" + app + ">" + name self.__settings = [] filename = (name + "." + SETTING_EXT) filename = os.path.join(SETTINGS_DIR, op, app, filename) filename = os.path.normpath(filename) if (not os.path.isfile(filename)): print filename raise ValueError, "No such setting found for " + self.__name + "." file = open(filename) line = file.readline() while (line != ""): # remove the new line char and split as prettyName, command, value self.__settings.append(FSettingEntry(*((line[:-1]).split("\t")))) line = file.readline() file.close()