Esempio n. 1
0
 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'}
Esempio n. 2
0
File: io.py Progetto: snrkiwi/phobos
 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'}
Esempio n. 3
0
    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'}