示例#1
0
def getDefaultPath( filepath, dmeMesh=None ):
	if filepath is None:
		if dmeMesh is None:
			raise SkinWeightException

		fileId = dmeMesh.GetFileId()
		fileRoot = vs.dm.GetElement( vs.dm.GetFileRoot( fileId ) )
		fileName = Path( vs.dm.GetFileName( fileId ) )
		srcFile = Path( fileRoot.makefile.sources[ 0 ].name )

		filepath = fileName.up() / srcFile
		#filepath = vs.dm.GetFileName( dmeMesh.GetFileId() )

	filepath = Path( filepath )
	if not filepath.exists:
		raise SkinWeightException

	filepath = filepath.setExtension( EXTENSION )

	return filepath
示例#2
0
		def getFile( cls ):
			clsFile = Path( inspect.getfile( cls ) )
			if clsFile.setExtension( 'py' ).exists():
				return clsFile.setExtension( 'py' )

			return clsFile