コード例 #1
0
    def pickFile(self):
        picked = None
        if self.pickerType == PathWidget.pickerTypes.Node:
            if Core.environment == Core.EnvironmentTypes.Maya:
                picked = Core.getMayaSelection()[0]
            if picked is None:
                return
        else:  #Begin Testing for path types
            if self.pickerType == PathWidget.pickerTypes.File:
                picked = guiUtils.getFileFromUser(ext=self.ext)
            if self.pickerType == PathWidget.pickerTypes.Folder:
                picked = guiUtils.getDirFromUser()
            if not picked:
                return

        self.ui_Field.setText(str(picked))
コード例 #2
0
ファイル: pathwidget.py プロジェクト: rocktavious/DevToolsLib
 def pickFile(self):
     picked = None       
     if self.pickerType == PathWidget.pickerTypes.Node :
         if Core.environment == Core.EnvironmentTypes.Maya :
             picked = Core.getMayaSelection()[0]
         if picked is None:
             return
     else: #Begin Testing for path types
         if self.pickerType == PathWidget.pickerTypes.File :
             picked = guiUtils.getFileFromUser(ext=self.ext)
         if self.pickerType == PathWidget.pickerTypes.Folder :
             picked = guiUtils.getDirFromUser()
         if not picked :
             return
     
     self.ui_Field.setText(str(picked))