def getRelativeMaterialPath(self, filepath, objFile=None):
        """
        Produce a portable path for writing to file.
        """
        # TODO move as helper func to material module
        if objFile:
            objFile = os.path.abspath(objFile)
            if os.path.isdir(objFile):
                objFile = os.path.dirname(objFile)[0]
            searchPaths = [objFile] + self.searchPaths
        else:
            searchPaths = self.searchPaths

        return getpath.getRelativePath(filepath, searchPaths)
    def getRelativeMaterialPath(self, filepath, objFile = None):
        """
        Produce a portable path for writing to file.
        """
        # TODO move as helper func to material module
        if objFile:
            objFile = os.path.abspath(objFile)
            if os.path.isdir(objFile):
                objFile = os.path.dirname(objFile)[0]
            searchPaths = [ objFile ] + self.searchPaths
        else:
            searchPaths = self.searchPaths

        return getpath.getRelativePath(filepath, searchPaths)
Ejemplo n.º 3
0
 def saveHandler(self, human, file):
     if self.selectedFile:
         poseFile = getpath.getRelativePath(self.selectedFile, self.paths)
         file.write('expression %s\n' % poseFile)
Ejemplo n.º 4
0
 def saveHandler(self, human, file):
     if self.currentPose:
         poseFile = getpath.getRelativePath(self.currentPose, self.paths)
         file.write('pose %s\n' % poseFile)
Ejemplo n.º 5
0
 def saveHandler(self, human, file):
     if human.getSkeleton():
         rigFile = getpath.getRelativePath(self.selectedRig, self.paths)
         file.write('skeleton %s\n' % rigFile)
Ejemplo n.º 6
0
 def saveHandler(self, human, file):
     if human.getSkeleton():
         rigFile = getpath.getRelativePath(self.selectedRig, self.paths)
         file.write('skeleton %s\n' % rigFile)
 def saveHandler(self, human, file):
     if self.currentPose:
         poseFile = getpath.getRelativePath(self.currentPose, self.paths)
         file.write('pose %s\n' % poseFile)
 def saveHandler(self, human, file):
     if self.selectedFile:
         poseFile = getpath.getRelativePath(self.selectedFile, self.paths)
         file.write('expression %s\n' % poseFile)