示例#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'}
示例#2
0
文件: io.py 项目: 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'}
示例#3
0
文件: io.py 项目: Amudtogal/phobos
    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'}