コード例 #1
0
    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)
コード例 #2
0
    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)
コード例 #3
0
 def saveHandler(self, human, file):
     if self.selectedFile:
         poseFile = getpath.getRelativePath(self.selectedFile, self.paths)
         file.write('expression %s\n' % poseFile)
コード例 #4
0
 def saveHandler(self, human, file):
     if self.currentPose:
         poseFile = getpath.getRelativePath(self.currentPose, self.paths)
         file.write('pose %s\n' % poseFile)
コード例 #5
0
 def saveHandler(self, human, file):
     if human.getSkeleton():
         rigFile = getpath.getRelativePath(self.selectedRig, self.paths)
         file.write('skeleton %s\n' % rigFile)
コード例 #6
0
ファイル: skeletonlibrary.py プロジェクト: nouei/makehuman
 def saveHandler(self, human, file):
     if human.getSkeleton():
         rigFile = getpath.getRelativePath(self.selectedRig, self.paths)
         file.write('skeleton %s\n' % rigFile)
コード例 #7
0
 def saveHandler(self, human, file):
     if self.currentPose:
         poseFile = getpath.getRelativePath(self.currentPose, self.paths)
         file.write('pose %s\n' % poseFile)
コード例 #8
0
 def saveHandler(self, human, file):
     if self.selectedFile:
         poseFile = getpath.getRelativePath(self.selectedFile, self.paths)
         file.write('expression %s\n' % poseFile)