| Python Script Engine 8.3 GL Studio Editor Python Script API

Public Member Functions | List of all members
TexturePalette Class Reference

## Public Member Functions
bool | isNULL ()
TexturePaletteEntry | AddTexture (String filename)
void | RemoveTexture (TexturePaletteEntry &texturePaletteEntry)
unsigned int | GetCount ()
TexturePaletteEntry | GetTexturePaletteEntry (unsigned int texPalIdx)
int | FindTextureByName (String filename)

## Detailed Description

Class that encapsulates a TexturePalette.

## Member Function Documentation

## ◆ AddTexture()

TexturePaletteEntry TexturePalette::AddTexture | ( | String | filename | ) |

Add a texture to the palette.

Parameters

  filename | file 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

## ◆ FindTextureByName()

int TexturePalette::FindTextureByName | ( | String | filename | ) |

Find a texture by name.

Parameters

  filename | file path and name of texture to check (can be relative or absolute)

Returns
  textureIndex, -1 if not found

## ◆ GetCount()

unsigned int TexturePalette::GetCount | ( |  | ) |

Get the number of texture palette entries in the palette.

Returns
  the number of texture palette entries in the palette

Precondition
  !isNULL()

## ◆ GetTexturePaletteEntry()

TexturePaletteEntry TexturePalette::GetTexturePaletteEntry | ( | unsigned int | texPalIdx | ) |

Get a texture palette entry from the palette.

Parameters

  texPalIdx | zero 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()

## ◆ isNULL()

bool TexturePalette::isNULL | ( |  | ) |

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

## ◆ RemoveTexture()

void TexturePalette::RemoveTexture | ( | TexturePaletteEntry & | texturePaletteEntry | ) |

Remove a texture from the palette.

Parameters

  texturePaletteEntry | texture to remove

Precondition
  !isNULL(), !texturePaletteEntry.isNULL(), texture palette entry is in this palette

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

- TexturePalette.i