Difference between revisions of "NiTexturingPropertyAddTextureSource"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>DragoonWraith
imported>DragoonWraith
(typo)
 
Line 5: Line 5:
  (bool:success) NiTexPropAddTexSrc string:filename short:texSlot short:nifID ''short:blockID''
  (bool:success) NiTexPropAddTexSrc string:filename short:texSlot short:nifID ''short:blockID''


Adds a [[:Category:NifSE (NiSourceTexture)|<tt>NiSourceTexture</tt>]] block using the given filename, and sets it to be used in the given <tt>texSlot</tt>. The file should be specified relative to the <tt>Oblivion\Data\Textures\</tt> folder (so "<tt>weapons\SteelClaymore02.dds</tt>" should be passed if you wish to add the <tt>Oblivion\Data\Textures\weapons\SteelClaymore02.dds</tt> file to the nif). This matches the format used by [[NiSourceTextureGetFile]]. The texture slots range from 0 to [[NiTexturingPropertyAddTextureCount]], and the possible choices are given below. See [[NiTexturingPropertyAddTextureCount]] for more details.
Adds a [[:Category:NifSE (NiSourceTexture)|<tt>NiSourceTexture</tt>]] block using the given filename, and sets it to be used in the given <tt>texSlot</tt>. The file should be specified relative to the <tt>Oblivion\Data\Textures\</tt> folder (so "<tt>weapons\SteelClaymore02.dds</tt>" should be passed if you wish to add the <tt>Oblivion\Data\Textures\weapons\SteelClaymore02.dds</tt> file to the nif). This matches the format used by [[NiSourceTextureGetFile]]. The texture slots range from 0 to [[NiTexturingPropertyGetTextureCount]], and the possible choices are given below. See [[NiTexturingPropertyGetTextureCount]] for more details.


Returns 0 if the function fails for whatever reason, 1 otherwise.
Returns 0 if the function fails for whatever reason, 1 otherwise.

Latest revision as of 10:49, 8 October 2011

This is a command from NifSE.

Syntax

(bool:success) NiTexturingPropertyAddTextureSource string:filename short:texSlot short:nifID short:blockID
(bool:success) NiTexPropAddTexSrc string:filename short:texSlot short:nifID short:blockID

Adds a NiSourceTexture block using the given filename, and sets it to be used in the given texSlot. The file should be specified relative to the Oblivion\Data\Textures\ folder (so "weapons\SteelClaymore02.dds" should be passed if you wish to add the Oblivion\Data\Textures\weapons\SteelClaymore02.dds file to the nif). This matches the format used by NiSourceTextureGetFile. The texture slots range from 0 to NiTexturingPropertyGetTextureCount, and the possible choices are given below. See NiTexturingPropertyGetTextureCount for more details.

Returns 0 if the function fails for whatever reason, 1 otherwise.

The default value of blockID, 0, indicates the NIF's root, a NiNode. NiNode blocks are not derived from NiTexturingProperty, so this function will always require an explicit blockID.

Texture Slots

  • BASE_MAP = 0 - a.k.a. the color map
  • DARK_MAP = 1
  • DETAIL_MAP = 2
  • GLOSS_MAP = 3
  • GLOW_MAP = 4
  • BUMP_MAP = 5
  • NORMAL_MAP = 6
  • UNKNOWN2_MAP = 7
  • DECAL_0_MAP = 8
  • DECAL_1_MAP = 9
  • DECAL_2_MAP = 10
  • DECAL_3_MAP = 11

See Also[edit | edit source]