Difference between revisions of "NiTexturingPropertyHasTexture"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>DragoonWraith
m (NifNthChildHasBaseTexture moved to NiTexturingPropertyHasTexture: new name for function as of alpha 5.)
imported>DragoonWraith
Line 2: Line 2:


'''Syntax'''
'''Syntax'''
  (bool:HasBaseTexture) NifNthChildHasBaseTexture short:ChildID short:NifID
  (bool:hasTexture) NiTexturingPropertyHasTexture short:textureSlot short:nifID ''short:blockID''
(bool:hasTexture) NiTexPropHasTex short:textureSlot short:nifID ''short:blockID''


Returns 1 if the specified Child of the root's NiTexturingProperty has a Base Texture specified, and 0 otherwise (or if the Child has no NiTexturingProperty).
Returns 1 if the <tt>NiTexturingProperty</tt>-derived block indicated by <tt>blockID</tt> is using that type of texture. The <tt>textureSlot</tt> argument refers to the type of texture in question. The <tt>blockID</tt> argument defaults to 0, which is usually the NIF's root and therefore not a <tt>NiTexturingProperty</tt>, so this function will almost always require an explicit <tt>blockID</tt>.
 
The related function [[NiTexturingPropertyGetTextureCount]] indicates how many of the below slots are open, but does not guarantee that any or all of those slots actually have textures in them. This is the function to use to actually check that, but this function will automatically fail when checking any slot greater than the texture count.
 
== Texture Slots ==
* <tt>BASE_MAP = 0</tt> - a.k.a. the color map
* <tt>DARK_MAP = 1</tt>
* <tt>DETAIL_MAP = 2</tt>
* <tt>GLOSS_MAP = 3</tt>
* <tt>GLOW_MAP = 4</tt>
* <tt>BUMP_MAP = 5</tt>
* <tt>NORMAL_MAP = 6</tt>
* <tt>UNKNOWN2_MAP = 7</tt>
* <tt>DECAL_0_MAP = 8</tt>
* <tt>DECAL_1_MAP = 9</tt>
* <tt>DECAL_2_MAP = 10</tt>
* <tt>DECAL_3_MAP = 11</tt>


== See Also ==
== See Also ==
* [[NifNthChildHasTexturingProp]]
* [[NiTexturingPropertyGetTextureCount]]
* [[NifGetNthChildBaseTexture]]
* [[NiTexturingPropertySetTextureCount]]
* [[NifSetNthChildBaseTexture]]


[[Category:NifSE|NthChildHasBaseTexture]]
[[Category:NifSE|TexturingPropertyHasTexture]]
[[Category:NifSE (Children)|NthChildHasBaseTexture]]
[[Category:NifSE (NiTexturingProperty)|HasTexture]]

Revision as of 13:46, 29 August 2010

This is a command from NifSE.

Syntax

(bool:hasTexture) NiTexturingPropertyHasTexture short:textureSlot short:nifID short:blockID
(bool:hasTexture) NiTexPropHasTex short:textureSlot short:nifID short:blockID

Returns 1 if the NiTexturingProperty-derived block indicated by blockID is using that type of texture. The textureSlot argument refers to the type of texture in question. The blockID argument defaults to 0, which is usually the NIF's root and therefore not a NiTexturingProperty, so this function will almost always require an explicit blockID.

The related function NiTexturingPropertyGetTextureCount indicates how many of the below slots are open, but does not guarantee that any or all of those slots actually have textures in them. This is the function to use to actually check that, but this function will automatically fail when checking any slot greater than the texture count.

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