def ImportFile(self):
     index = self.folderView.currentIndex()
     path = pmp(self.dirModel.filePath(index)).normpath()
     if self.CheckFileExt(path):
         if self.explorerType == 'pmd':
             self.mainWindow.SetPmxFile(path)
         elif self.explorerType == 'vmd':
             self.mainWindow.AddVmdFile(path)
         self.close()
 def ImportFile(self):
     index = self.folderView.currentIndex()
     path = pmp(self.dirModel.filePath(index)).normpath()
     if self.CheckFileExt(path):
         if self.explorerType == 'pmd':
             self.mainWindow.SetPmxFile(path)
         elif self.explorerType == 'vmd':
             self.mainWindow.AddVmdFile(path)
         self.close()
Exemple #3
0
def fixTexturePath(path):
    listedNodes = cmds.ls(type="file")

    if len(listedNodes) > 0:
        for currNode in listedNodes:
            if not pmp(cmds.getAttr(currNode + '.fileTextureName')).exists():

                if cmds.referenceQuery(currNode, isNodeReferenced=True) == 1:
                    dir_path = cmds.referenceQuery(
                        currNode,
                        filename=True).split("scenes")[0] + "sourceimages/"
                else:
                    dir_path = path.split("scenes")[0] + "sourceimages/"
                path_old = cmds.getAttr(currNode +
                                        '.fileTextureName').split("/")
                tex_name = path_old[len(path_old) - 1]

                path_new = pmp(dir_path + tex_name)

                if path_new.exists():
                    cmds.setAttr(currNode + '.fileTextureName',
                                 path_new,
                                 type="string")
 def UpdatePathViewer(self):
     index = self.folderView.currentIndex()
     path = pmp(self.dirModel.filePath(index)).normpath()
     self.pathViewer.setText(path)
 def UpdatePathViewer(self):
     index = self.folderView.currentIndex()
     path = pmp(self.dirModel.filePath(index)).normpath()
     self.pathViewer.setText(path)