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)
def saveHandler(self, human, file): if self.selectedFile: poseFile = getpath.getRelativePath(self.selectedFile, self.paths) file.write('expression %s\n' % poseFile)
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 human.getSkeleton(): rigFile = getpath.getRelativePath(self.selectedRig, self.paths) file.write('skeleton %s\n' % rigFile)