本文整理汇总了Python中rapi.getInputName函数的典型用法代码示例。如果您正苦于以下问题:Python getInputName函数的具体用法?Python getInputName怎么用?Python getInputName使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getInputName函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: load_single_model
def load_single_model(data, mdlList):
'''Loads a single model. For testing purposes'''
if rapi.checkFileExt(rapi.getInputName(), ".mbn"):
bs = NoeBitStream(data)
idstring = bs.readUInt()
numFiles = bs.readUInt()
bs.read('2L')
filesizes = []
for i in range(numFiles):
unk, size, crc, null = bs.read('4L')
filesizes.append(size)
for i in range(numFiles):
size = filesizes[i]
mdl = bs.readBytes(size)
parser = mdl_parser(mdl)
parser.parse_file()
mdl = rapi.rpgConstructModel()
mdl.setModelMaterials(NoeModelMaterials(parser.texList, parser.matList))
mdlList.append(mdl)
elif rapi.checkFileExt(rapi.getInputName(), ".mdl"):
parser = mdl_parser(data)
parser.parse_file()
mdl = rapi.rpgConstructModel()
mdl.setModelMaterials(NoeModelMaterials(parser.texList, parser.matList))
mdlList.append(mdl)
开发者ID:Danilodum,项目名称:noesis-plugins-official,代码行数:28,代码来源:fmt_bladeChronicles_mdl.py
示例2: findMODL
def findMODL(self):
fName=rapi.getInputName().split('\\')[-1]
dirPath = rapi.getDirForFilePath(rapi.getInputName())
f = open(dirPath + "/" + fName,'rb')
file = f.read()
f.close()
offset = file.find(b"MODL")
self.data.seek(offset)
开发者ID:Danilodum,项目名称:noesis-plugins-official,代码行数:8,代码来源:fmt_GW2_pf.py
示例3: __init__
def __init__(self, data):
self.inFile = NoeBitStream(data)
self.animList = []
self.texList = []
self.matList = []
self.boneList = []
self.dirpath = rapi.getDirForFilePath(rapi.getInputName())
self.basename = rapi.getExtensionlessName(rapi.getInputName())
开发者ID:mstevenson,项目名称:noesis-plugins-official,代码行数:9,代码来源:fmt_LeagueOfLegends_skn.py
示例4: noepyCheckType
def noepyCheckType(data):
fName=rapi.getInputName().split('\\')[-1]
dirPath = rapi.getDirForFilePath(rapi.getInputName())
bs = open(dirPath + "/" + fName)
idstring = line = bs.readline()
idstring =''.join(idstring.split('\x00'))
bs.close()
if not "version" in idstring.lower() : return 0
return 1
开发者ID:Danilodum,项目名称:noesis-plugins-official,代码行数:9,代码来源:fmt_PoE_sm.py
示例5: noepyLoadModel
def noepyLoadModel(data, mdlList):
ctx = rapi.rpgCreateContext()
global dirPath
global fileName
dirPath = rapi.getDirForFilePath(rapi.getInputName())
fileName = rapi.getLocalFileName(rapi.getInputName())
file = GOBJ(data)
mdlList.append(file.mdl)
rapi.rpgClearBufferBinds()
return 1
开发者ID:Danilodum,项目名称:noesis-plugins-official,代码行数:11,代码来源:fmt_homm6_gobj.py
示例6: __init__
def __init__(self):
self.filename = rapi.getInputName().split('\\')[-1]
self.dirPath = rapi.getDirForFilePath(rapi.getInputName())
self.matList = []
self.texList = []
self.bones = []
self.anims = []
self.GetMaterials()
self.LoadModel()
try:self.LoadArmature()
except:print('Armature failed to init');pass
开发者ID:Danilodum,项目名称:noesis-plugins-official,代码行数:11,代码来源:fmt_PoE_sm.py
示例7: __init__
def __init__(self, data):
'''Initialize some data. Refer to Sanae.py to see what is already
initialized'''
self.inFile = NoeBitStream(data)
self.meshes = []
self.boneID = 0
self.animList = []
self.texList = []
self.matList = []
self.boneList = []
self.abspath = rapi.getInputName()
self.dirpath = rapi.getDirForFilePath(rapi.getInputName())
开发者ID:Danilodum,项目名称:noesis-plugins-official,代码行数:13,代码来源:fmt_DKOnline_xac.py
示例8: GetMaterial
def GetMaterial(self):
fName=rapi.getInputName().split('\\')[-1][:-5]
self.name = fName
dirPath = rapi.getDirForFilePath(rapi.getInputName())
self.path = dirPath
try:
matFile = open(dirPath+"/"+fName+".material","r")
while True:
line = matFile.readline()
#print(line)
if "texture " in line: line=line.split(' ')[-1][:-5];print(line);return line
except:print("[*] Material not found.", );return 0
print(fName)
开发者ID:Danilodum,项目名称:noesis-plugins-official,代码行数:13,代码来源:fmt_TL_mesh.py
示例9: parse_materials
def parse_materials(self, filename):
dirpath = rapi.getDirForFilePath(rapi.getInputName())
for i in range(self.numMat):
name = self.read_name(128)
matName = self.read_name(128)
if not matName:
matName = "material[%d]" % i
self.inFile.seek(44, 1)
numTex = self.inFile.readUInt()
for i in range(numTex):
if i == 1:
self.inFile.read("2L")
texName = self.read_name(256)
texName = os.path.basename(texName)
elif i == 2:
self.inFile.read("2L")
self.read_name(256)
os.path.basename(texName)
else:
self.inFile.read("2L")
self.read_name(256)
self.matNames.append(matName)
self.texNames.append(dirpath + "tex\\" + texName)
开发者ID:mstevenson,项目名称:noesis-plugins-official,代码行数:25,代码来源:fmt_QueensBlade_map.py
示例10: parse_textures
def parse_textures(self, filename):
try:
dirpath = rapi.getDirForFilePath(rapi.getInputName())
f = open(dirpath + filename + ".tex", 'rb')
data = f.read()
bs = NoeBitStream(data)
header = bs.readBytes(4)
size, numTex, null = bs.read('3L')
for i in range(numTex):
texSize = bs.readUInt()
texFmt = noeStrFromBytes(bs.readBytes(4))
if texFmt == "tex":
texFmt = "dds"
bs.read('2L')
texName = noeStrFromBytes(bs.readBytes(32))
texData = bs.readBytes(texSize)
tex = rapi.loadTexByHandler(texData, "." + texFmt)
if tex is not None:
tex.name = texName
self.texList.append(tex)
except:
pass
开发者ID:Danilodum,项目名称:noesis-plugins-official,代码行数:25,代码来源:fmt_FantasyEarthZero_mdl.py
示例11: noepyLoadModel
def noepyLoadModel(data, mdlList):
'''Build the model, set materials, bones, and animations. You do not
need all of them as long as they are empty lists (they are by default)'''
ctx = rapi.rpgCreateContext()
filename = rapi.getLocalFileName(rapi.getInputName())
fileID = ''.join(c for c in filename if c.isdigit())
bs = NoeBitStream(data)
idstring = bs.readUInt()
idstring2 = bs.readUInt()
if idstring == 1213416781: #MESH
if idstring2 == 1:
parser = StaticParser1(data)
elif idstring2 == 2:
parser = StaticParser2(data)
else:
parser = SanaeParser(data)
print(idstring)
parser.parse_file()
mdl = rapi.rpgConstructModel()
mdl.setModelMaterials(NoeModelMaterials(parser.texList, parser.matList))
mdl.setBones(parser.boneList)
mdl.setAnims(parser.animList)
mdlList.append(mdl)
return 1
开发者ID:Danilodum,项目名称:noesis-plugins-official,代码行数:26,代码来源:fmt_SevenSouls_msh.py
示例12: load_all_models
def load_all_models(mdlList):
'''Load all models'''
#carry over from previous models
matList = []
texList = []
##load face
#facePath = "E:\\My Documents\\Workspace\\sample\\Age of Wushu\\g_face.xmod"
#f = open(facePath, 'rb')
#data2 = f.read()
#parser = AgeOfWushu_XMOD(data2)
#parser.parse_file()
#material = NoeMaterial("g_face", "E:\\My Documents\\Workspace\\sample\\Age of Wushu\\g_face_1.dds")
#matList.append(material)
#load the outfit
dirPath = rapi.getDirForFilePath(rapi.getInputName())
fileList = [file for file in os.listdir(dirPath) if file.lower().endswith(".xmod")]
for file in fileList:
f = open(dirPath + file, 'rb')
data2 = f.read()
parser = AgeOfWushu_XMOD(data2)
parser.parse_file()
matList.extend(parser.matList)
texList.extend(parser.texList)
mdl = rapi.rpgConstructModel()
mdl.setModelMaterials(NoeModelMaterials(texList, matList))
mdlList.append(mdl)
开发者ID:tianye910208,项目名称:restool_jiuyintool,代码行数:30,代码来源:fmt_AgeOfWulin_xmod.py
示例13: parse_material
def parse_material(self):
dirpath = rapi.getDirForFilePath(rapi.getInputName())
matName = self.read_name()
self.inFile.readByte() #?
self.inFile.read('17f')
hasDiff = self.inFile.readUInt()
if hasDiff:
texPath = self.read_name()
hasSpec = self.inFile.readUInt()
if hasSpec:
specPath = self.read_name()
hasNorm = self.inFile.readUInt()
if hasNorm:
normPath = self.read_name()
self.inFile.seek(7, 1)
blend = self.read_name()
texName = os.path.basename(texPath)
tempPath = dirpath + "texture\\" + texName
material = NoeMaterial(matName, tempPath)
material.setDefaultBlend(0)
self.matList.append(material)
return matName
开发者ID:Danilodum,项目名称:noesis-plugins-official,代码行数:28,代码来源:fmt_CloudNine_xskin.py
示例14: LoadTexture
def LoadTexture(texName, file):
if MODPATH != None:
name = MODPATH +'\\'+ texName
else:
name = rapi.getDirForFilePath(rapi.getInputName()) + texName.split('\\')[-1]
print(rapi.getDirForFilePath(rapi.getInputName()))
if not rapi.checkFileExists(name):
print("Texture not found: %s" %name)
else:
tex = open(name,'rb').read()
noepyLoadRGBA(tex,file.texList)
file.texList[-1].name = name
return file.texList[-1]
开发者ID:Danilodum,项目名称:noesis-plugins-official,代码行数:17,代码来源:fmt_TQ_msh.py
示例15: __init__
def __init__(self, data):
self.inFile = NoeBitStream(data)
self.animList = []
self.texList = []
self.matList = []
self.boneList = []
self.dirpath = rapi.getDirForFilePath(rapi.getInputName())
self.texpath = self.dirpath + "texture\\"
开发者ID:Danilodum,项目名称:noesis-plugins-official,代码行数:8,代码来源:fmt_LithTech_ltb.py
示例16: load_single_model
def load_single_model(data, mdlList):
'''Loads a single model. For testing purposes'''
filename = rapi.getExtensionlessName(rapi.getInputName())
parser = SanaeParser(data, filename)
parser.parse_file()
mdl = rapi.rpgConstructModel()
mdl.setModelMaterials(NoeModelMaterials(parser.texList, parser.matList))
mdlList.append(mdl)
开发者ID:Danilodum,项目名称:noesis-plugins-official,代码行数:9,代码来源:fmt_DarkBlood_prt.py
示例17: __init__
def __init__(self, data):
self.inFile = NoeBitStream(data)
self.animList = []
self.texList = []
self.matList = []
self.boneList = []
self.meshes = []
self.materials = []
self.dirpath = rapi.getDirForFilePath(rapi.getInputName())
开发者ID:Danilodum,项目名称:noesis-plugins-official,代码行数:9,代码来源:fmt_DirectX_xbin.py
示例18: load_single_model
def load_single_model(data, mdlList):
'''Loads a single model. For testing purposes'''
filename, ext = os.path.splitext(rapi.getLocalFileName(rapi.getInputName()))
parser = SanaeParser(data)
parser.parse_file(filename)
mdl = rapi.rpgConstructModel()
mdl.setModelMaterials(NoeModelMaterials(parser.texList, parser.matList))
mdlList.append(mdl)
开发者ID:Danilodum,项目名称:noesis-plugins-official,代码行数:9,代码来源:fmt_C9_r3cm.py
示例19: get_type
def get_type(data):
filename = rapi.getLocalFileName(rapi.getInputName())
if rapi.checkFileExt(filename, '.3DO'):
return Shaiya3DO(data)
elif rapi.checkFileExt(filename, '.3DC'):
return Shaiya3DC(data)
elif rapi.checkFileExt(filename, '.SMOD'):
return ShaiyaSMOD(data)
开发者ID:Danilodum,项目名称:noesis-plugins-official,代码行数:9,代码来源:fmt_ShaiyaOnline.py
示例20: LoadTexture
def LoadTexture(texName):
if ARTPATH == None:
name = rapi.getDirForFilePath(rapi.getInputName())+texName
else:
name = texName.split('\\')[-1]
tex = open(name,'rb').read()
tex = rapi.loadTexByHandler(tex,'.dds')
tex.name = texName
return tex
开发者ID:Danilodum,项目名称:noesis-plugins-official,代码行数:9,代码来源:fmt_DOW2_model.py
注:本文中的rapi.getInputName函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论