Difference between revisions of "NiTexturingPropertyGetTextureCount"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>DragoonWraith
(New page: This is a command from NifSE. '''Syntax''' (short:textureCount) NiTexturingPropertyGetTextureCount short:nifID ''short:blockID'' (short:textureCount) NiTexturingProp...)
 
imported>DragoonWraith
 
Line 3: Line 3:
'''Syntax'''
'''Syntax'''
  (short:textureCount) NiTexturingPropertyGetTextureCount short:nifID ''short:blockID''
  (short:textureCount) NiTexturingPropertyGetTextureCount short:nifID ''short:blockID''
  (short:textureCount) NiTexturingPropertyGetTextureCount short:nifID ''short:blockID''
  (short:textureCount) NiTexPropGetTexCount short:nifID ''short:blockID''


Returns the number of texture slots that the [[:Category:NifSE (NiTexturingProperty)|<tt>NiTexturingProperty</tt>]] specified by <tt>blockID</tt> has open. Each slot has a specific meaning to the NIF - slot 0 is always the base map, slot 4 is always the glow map, etc. If a given slot is open, all slots below it must be also, so knowing the number of slots open also indicates which slots are open. For example, a texture count of 5 will mean that the <tt>NiTexturingProperty</tt> uses the base, dark, detail, gloss, and glow maps. There are a maximum of 12 types of textures, so 12 is the maximum value that this should return.
Returns the number of texture slots that the [[:Category:NifSE (NiTexturingProperty)|<tt>NiTexturingProperty</tt>]] specified by <tt>blockID</tt> has open. Each slot has a specific meaning to the NIF - slot 0 is always the base map, slot 4 is always the glow map, etc. If a given slot is open, all slots below it must be also, so knowing the number of slots open also indicates which slots are open. For example, a texture count of 5 will mean that the <tt>NiTexturingProperty</tt> uses the base, dark, detail, gloss, and glow maps. There are a maximum of 12 types of textures, so 12 is the maximum value that this should return.

Latest revision as of 13:26, 31 August 2010

This is a command from NifSE.

Syntax

(short:textureCount) NiTexturingPropertyGetTextureCount short:nifID short:blockID
(short:textureCount) NiTexPropGetTexCount short:nifID short:blockID

Returns the number of texture slots that the NiTexturingProperty specified by blockID has open. Each slot has a specific meaning to the NIF - slot 0 is always the base map, slot 4 is always the glow map, etc. If a given slot is open, all slots below it must be also, so knowing the number of slots open also indicates which slots are open. For example, a texture count of 5 will mean that the NiTexturingProperty uses the base, dark, detail, gloss, and glow maps. There are a maximum of 12 types of textures, so 12 is the maximum value that this should return.

Having a slot open does not mean that there is necessarily a texture in it. Use NiTexturingPropertyHasTexture to determine if there is.

Returns -1 if the function fails for whatever reason.

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]