Hi everyone,
I would like to know how to read two files in Noesis, because I want to read the header and the model without needing to merge them.
My script is working well with merged files, but it will be better reading them separeted. It will help me in my texture script, because I also need to merge the header and raw texture.
Also, if I could do it, I could improve the script to read the main file I call every other file.
Thanks in advance.
The Forum is up for sale: XeNTaX Forum looking for new owner
Noesis script help
-
chrrox
- Moderator
- Posts: 2602
- Joined: Sun May 18, 2008 3:01 pm
- Has thanked: 57 times
- Been thanked: 1411 times
Re: Noesis script help
example
Code: Select all
baseName = rapi.getExtensionlessName(rapi.getLocalFileName(rapi.getLastCheckedName()))
if( rapi.checkFileExists( rapi.getDirForFilePath( rapi.getLastCheckedName() ) + baseName + ".txd" ) ):
texData = rapi.loadIntoByteArray( rapi.getDirForFilePath( rapi.getLastCheckedName() ) + baseName + ".txd" )
txdLoadRGBA(texData, self.texList)- DGIorio
- beginner
- Posts: 25
- Joined: Sun Jan 10, 2016 11:12 pm
- Has thanked: 4 times
- Been thanked: 18 times
Re: Noesis script help
chrrox wrote:example
Code: Select all
baseName = rapi.getExtensionlessName(rapi.getLocalFileName(rapi.getLastCheckedName())) if( rapi.checkFileExists( rapi.getDirForFilePath( rapi.getLastCheckedName() ) + baseName + ".txd" ) ): texData = rapi.loadIntoByteArray( rapi.getDirForFilePath( rapi.getLastCheckedName() ) + baseName + ".txd" ) txdLoadRGBA(texData, self.texList)
Thanks chrrox, it worked very well
