Skip to content

niTexturingProperty⚓︎

A rendering property that controls the methods used to filter texture pixels, and blend texture colors and vertex colors.

This type inherits the following: niProperty, niObjectNET, niObject

Properties⚓︎

applyMode⚓︎

The texture apply mode. The texture apply mode controls how the vertex colors are blended with the texture color. Maps to values in ni.texturingPropertyApplyMode table.

Returns:


baseMap⚓︎

Gets or set the base map. Can be set to nil to delete it. Note that doing so will free the memory of the map, causing all existing handles to it to become invalid.

Returns:


bumpMap⚓︎

Gets or set the bump map. Can be set to nil to delete it. Note that doing so will free the memory of the map, causing all existing handles to it to become invalid.

Returns:


canAddDecal⚓︎

Read-only. If true, the texturing property supports additional decal maps.

Returns:

  • result (boolean)

controller⚓︎

Read-only. The first controller available on the object.

Returns:


darkMap⚓︎

Gets or set the dark map. Can be set to nil to delete it. Note that doing so will free the memory of the map, causing all existing handles to it to become invalid.

Returns:


decalCount⚓︎

Read-only. The number of decals currently on the texturing property.

Returns:

  • result (integer)

detailMap⚓︎

Gets or set the detail map. Can be set to nil to delete it. Note that doing so will free the memory of the map, causing all existing handles to it to become invalid.

Returns:


extraData⚓︎

Read-only. The first extra data available on the object.

Returns:


glossMap⚓︎

Gets or set the gloss map. Can be set to nil to delete it. Note that doing so will free the memory of the map, causing all existing handles to it to become invalid.

Returns:


glowMap⚓︎

Gets or set the glow map. Can be set to nil to delete it. Note that doing so will free the memory of the map, causing all existing handles to it to become invalid.

Returns:


maps⚓︎

Read-only. The maps of texture property. Accessible as an array.

Returns:


name⚓︎

The human-facing name of the given object.

Returns:

  • result (string)

propertyFlags⚓︎

Returns:

  • result (integer)

refCount⚓︎

Read-only. The number of references that exist for this object. When this value reaches zero, the object will be deleted.

Returns:

  • result (number)

RTTI⚓︎

Read-only. The runtime type information for this object. This is an alias for the .runTimeTypeInformation property.

Returns:


runTimeTypeInformation⚓︎

Read-only. The runtime type information for this object.

Returns:


type⚓︎

Read-only. The unique class identifier number of the given rendering property. The types are available in ni.propertyType table.

Returns:


Methods⚓︎

addDecalMap⚓︎

Attempts to create a new decal map. If successful, it returns both the new map and the index it was created in.

local map, index = myObject:addDecalMap(texture)

Parameters:

  • texture (niTexture): Optional. The texture to assign to the new decal.

Returns:

  • map (niTexturingPropertyMap, nil): A newly created decal map.
  • index (integer, nil): The index of the newly added decal map.

addExtraData⚓︎

Appends an extra data to the object.

myObject:addExtraData(extraData)

Parameters:


clone⚓︎

Creates a copy of this object.

local result = myObject:clone()

Returns:


getGameReference⚓︎

Searches for an niExtraData on this object to see if it has one that holds a related reference.

local reference = myObject:getGameReference(searchParents)

Parameters:

  • searchParents (boolean): Default: false. If true, all parent objects (if applicable) are also searched.

Returns:


getStringDataStartingWith⚓︎

Searches for an niExtraData on this object to see if it has niStringExtraData that has its string start with the provided value argument.

local extra = myObject:getStringDataStartingWith(value)

Parameters:

  • value (string): The first niStringExtraData starting with this value will be returned.

Returns:


getStringDataWith⚓︎

Searches for an niExtraData on this object to see if it has niStringExtraData that has the provided value argument in its string field.

local extra = myObject:getStringDataWith(value)

Parameters:

  • value (string): The first niStringExtraData with this word will be returned.

Returns:


hasStringDataStartingWith⚓︎

Searches for an niExtraData on this object to see if it has niStringExtraData that has its string start with the provided value argument. Returns true if the value was found.

local result = myObject:hasStringDataStartingWith(value)

Parameters:

  • value (string): The value to search for.

Returns:

  • result (boolean)

hasStringDataWith⚓︎

Searches for an niExtraData on this object to see if it has niStringExtraData that contains the provided value argument in its string field. Returns true if the value was found.

local result = myObject:hasStringDataWith(value)

Parameters:

  • value (string): The value to search for.

Returns:

  • result (boolean)

isInstanceOfType⚓︎

Determines if the object is of a given type, or of a type derived from the given type.

local result = myObject:isInstanceOfType(type)

Parameters:

Returns:

  • result (boolean)

isOfType⚓︎

Determines if the object is of a given type.

local result = myObject:isOfType(type)

Parameters:

Returns:

  • result (boolean)

prependController⚓︎

Add a controller to the object as the first controller.

myObject:prependController(controller)

Parameters:


removeAllControllers⚓︎

Removes all controllers.

myObject:removeAllControllers()

removeAllExtraData⚓︎

Removes all extra data.

myObject:removeAllExtraData()

removeController⚓︎

Removes a controller from the object.

myObject:removeController(controller)

Parameters:


removeDecalMap⚓︎

Attempts to remove a decal at a given index.

local removed = myObject:removeDecalMap(index)

Parameters:

  • index (ni.texturingPropertyMapType): The index of the decal to remove. The available indices are between ni.texturingPropertyMapType.decalFirst and ni.texturingPropertyMapType.decalLast.

Returns:

  • removed (boolean): True if the decal was removed.

removeExtraData⚓︎

Removes a specific extra data from the object.

myObject:removeExtraData(extraData)

Parameters:


saveBinary⚓︎

Serializes the object, and writes it to the given file.

local success = myObject:saveBinary(path)

Parameters:

  • path (string): The path to write the file at, relative to the Morrowind installation folder.

Returns:

  • success (boolean): If true the object was successfully serialized.

setFlag⚓︎

Sets a given flag in the niObjectNET flag data. The specifics use of the flag is dependent on the real underlying type.

myObject:setFlag(state, index)

Parameters:

  • state (boolean)
  • index (number)