Code: Select all
class NoeTexture:
def setFlags(flags):
self.flags = flagsCode: Select all
class NoeTexture:
def setFlags(self, flags):
self.flags = flags
Code: Select all
class NoeTexture:
def setFlags(flags):
self.flags = flagsCode: Select all
class NoeTexture:
def setFlags(self, flags):
self.flags = flagsCode: Select all
#define NTEXFLAG_ISNORMALMAP (1<<0)
#define NTEXFLAG_SEGMENTED (1<<1)
#define NTEXFLAG_STEREO (1<<2) //indicates this is a stereo (side by side) image
#define NTEXFLAG_STEREO_SWAP (1<<3) //should only be used in conjunction with NTEXFLAG_STEREO. Indicates left and right eyes are switched.
#define NTEXFLAG_FILTER_NEAREST (1<<4) //nearest neighbor filtering is preferred
#define NTEXFLAG_WRAP_CLAMP (1<<5) //clamp at edges

Code: Select all
class NoeBitStream(NoeUnpacker):
def getBuffer(self, startOfs = None, endOfs = None):
if startOfs is not None and endOfs is not none: ### Should be None instead of none
Code: Select all
bs = NoeBitStream(data, 1) # big endian
bs.read('3f')
Code: Select all
bs.readUInt()
bs.readFloat()
Code: Select all
rapi.rpgSetOption(noesis.RPGOPT_BIGENDIAN, 1)
Code: Select all
bs = NoeBitStream(data, NOE_BIGENDIAN)

Code: Select all
bs.readUInt()
bs.readUInt()
bs.readUInt()
bs.readUInt()
bs.readUInt()
The Stainless stuff was done for iOS Carmageddon primarily. I've been playing it a lot and decided to dig around in it. It also happens to work on Magic: The Gathering – Duels of the Planeswalkers and probably some other Stainless Games stuff, though. Although they have conflicts between games for texture formats (the same format identifier means different pixel modes even though the headers between games are identical, kind of a pain in the ass), so Carmageddon is the only one I guarantee to work without issues.-3.994 - Added import support for Stainless MDL/CNT files.
-3.994 - Added import support for Stainless TDX files.
-3.994 - Added extraction support for Stainless WAD files.
-3.994 - Added rapi.createBoneMap. See example_bonemaps.py in the Noesis scripts repository for usage. Also keep in mind that you can use -maxbones # when exporting models to have Noesis automatically split meshes to keep bone reference counts under #.
-3.994 - Added noesis.setTypeExportOptions, to specify default export options for a type. Also see example_bonemaps.py for usage.
-3.994 - Static chrome UV's are now used for HL1 MDL chrome surfaces.
-3.994 - Corrected a bug with HL1 MDL normals. Also added -hlmdlnonrm to discard HL1 MDL normals.
-3.994 - Fixed a typo that was making setFlags unusable in the NoeTexture class. Thanks to demonsangel for spotting it.
-3.994 - Now recognizing 0 and NaN cases in the half-float decode function. Thanks to demonsangel for pointing out that this was not happening.
-3.994 - Fixed another typo in the NoeBitStream class. Thanks to demonsangel for spotting this one too.
-3.994 - Added Noesis_InputReadFile/Noesis_InputReadFileW, which read files into memory relative to the path of the input file.
-3.994 - Added RPGOPT_SWAPHANDEDNESS.
-3.994 - Added swapHandedness methods to NoeMat43 and NoeMat44.
There are 2 example visualizer plugins with source up on the plugins repository. One of them demonstrates hijacking the model rendering to perform a simple effect (which I dubbed the Magical Pony Fire effect):-3.996 - Added "Visualizers". Plugins can now register visualizers to hook into preview rendering. See example_visualizer01 (effect rendering) and example_visualizer02 (allows you to select and export triangles) in my folder on the plugins repository.
-3.996 - New shared Noesis GL interface for native plugins to perform API-agnostic rendering.
-3.996 - Tool menu items can now be checked/unchecked, using noesis.checkToolMenuItem.
-3.996 - New optional parameter at the end of registerTool allows tools to specify their help text. (which is displayed in the Noesis status bar when the user mouseovers the tool menu item)
-3.996 - New math functions: Math_WorldToScreenSpace, Math_ScreenToWorldSpace, Math_PointRelativeToPlane, Math_LineIntersectTri.
-3.996 - Added Noesis_RegisterUserButton, which allows native plugins to register new model control buttons.
-3.996 - Fixed a Python print-related crash. Thanks to demonsangel for reporting the crash.
-3.996 - More interface cleanup. Anim slider moves above buttons if window is too small for it to fit next to buttons.





Code: Select all
"""
Script:
import requires all art assets to be extracted from the archive
How to use:
needs: .sm file (link to materials and model file) This is the file loaded in Noesis
.smd file (mesh file)
.ast file (armature) if rig.ast is not present a file dialog will open for you to select an .ast
textures @ TEXPATH (see below)
"""
################################
### Only change this line ####
################################
TEXPATH = r"c:\users\Andrew\Desktop\XentaxScript\PoE\Art"
################################
### Do not change below here ###
################################