Python Script Engine  7.0
GL Studio Editor Python Script API
TexturePalette Class Reference

Public Member Functions

bool isNULL (void)
 
TexturePaletteEntry AddTexture (String filename)
 
void RemoveTexture (TexturePaletteEntry &texturePaletteEntry)
 
unsigned int GetCount (void)
 
TexturePaletteEntry GetTexturePaletteEntry (unsigned int texPalIdx)
 
int FindTextureByName (String filename)
 

Detailed Description

Class that encapsulates a TexturePalette.

Member Function Documentation

TexturePaletteEntry TexturePalette::AddTexture ( String  filename)

Add a texture to the palette.

Parameters
filenamefile path and name of texture to add (can be relative or absolute)
Returns
the texture palette entry for the added texture
Precondition
!isNULL(), file exists
int TexturePalette::FindTextureByName ( String  filename)

Find a texture by name.

Parameters
filenamefile path and name of texture to check (can be relative or absolute)
Returns
textureIndex, -1 if not found
unsigned int TexturePalette::GetCount ( void  )

Get the number of texture palette entries in the palette.

Returns
the number of texture palette entries in the palette
Precondition
!isNULL()
TexturePaletteEntry TexturePalette::GetTexturePaletteEntry ( unsigned int  texPalIdx)

Get a texture palette entry from the palette.

Parameters
texPalIdxzero based texture palette index
Returns
texture palette entry, NOTE the return entry may be an empty entry in which case TexturePaletteEntry.isNULL() will return true
Precondition
!isNULL(), texPalIdx < GetCount()
bool TexturePalette::isNULL ( void  )

Determine if wrapped texture palette does not exist.

Returns
True if this object represents a NULL texture palette
Deprecated:
Refer to the Truth Value Checking page
void TexturePalette::RemoveTexture ( TexturePaletteEntry texturePaletteEntry)

Remove a texture from the palette.

Parameters
texturePaletteEntrytexture to remove
Precondition
!isNULL(), !texturePaletteEntry.isNULL(), texture palette entry is in this palette

The documentation for this class was generated from the following file: