def invoke(self, context, event): modellist = ioUtils.getModelListForEnumProp(self, context) if len(modellist) > 1: return context.window_manager.invoke_props_dialog(self) else: try: self.modelname = modellist[0][0] return self.execute(context) except IndexError: log("No propely defined models to export.", "ERROR") return {'CANCELLED'}
def invoke(self, context, event): modellist = ioUtils.getModelListForEnumProp(self, context) # show selection dialog for models if len(modellist) > 1: return context.window_manager.invoke_props_dialog(self) # unless only one model is available elif modellist: self.modelname = modellist[0][0] return self.execute(context) log("No propely defined models to export.", 'ERROR') return {'CANCELLED'}
def invoke(self, context, event): """ Args: context: event: Returns: """ modellist = ioUtils.getModelListForEnumProp(self, context) # show selection dialog for models if len(modellist) > 1: return context.window_manager.invoke_props_dialog(self) # unless only one model is available elif modellist: self.modelname = modellist[0][0] return self.execute(context) log("No propely defined models to export.", 'ERROR') return {'CANCELLED'}