Difference between revisions of "NiSourceTextureGetFile"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>DragoonWraith
(New page: This is a command from NifSE. '''Syntax''' (string:FilePath) NifGetNthChildBaseTexture short:ChildID short:NifID Returns the file path (relative to the Oblivion\Data...)
 
imported>DragoonWraith
 
(5 intermediate revisions by the same user not shown)
Line 2: Line 2:


'''Syntax'''
'''Syntax'''
  (string:FilePath) NifGetNthChildBaseTexture short:ChildID short:NifID
  (string:filePath) NiSourceTextureGetFile short:nifID ''short:blockID''
(string:filePath) NiSrcTexGetFile short:nifID ''short:blockID''


Returns the file path (relative to the Oblivion\Data\ folder, '''not Oblivion\Data\Textures\''') of the Base Texture of the specified Child of the root. If the Child does not have a Base Texture, or NiTexturingProperty, or the process fails for any other reason, an empty string is returned and an appropriate message is printed to the Console and NifSE.log.
Returns the path relative to <tt>Oblivion\Textures\</tt> to the texture file used by the indicated <tt>NiSourceTexture</tt>-derived block. The <tt>blockID</tt> argument, as usual, defaults to 0, indicating the root which is a <tt>NiNode</tt> block. <tt>NiNode</tt> blocks are not derived from <tt>NiSourceTexture</tt>, so this function will almost never be used without specifying the <tt>blockID</tt> desired.
 
Typically, one determines <tt>blockID</tt> by using [[NiAVObjectGetPropertyByType]] to get the <tt>NiTexturingProperty</tt> associated with a <tt>NiAVObject</tt>, and then using [[NiTexturingPropertyGetTextureSource]] to get the <tt>blockID</tt> of the <tt>NiSourceTexture</tt>.


== See Also ==
== See Also ==
* [[NifNthChildHasTexturingProp]]
* [[NiTexturingPropertyGetTextureSource]]
* [[NifNthChildHasBaseTexture]]
* [[NiSourceTextureIsExternal]]
* [[NifSetNthChildBaseTexture]]
* [[NiSourceTextureSetExternalTexture]]


[[Category:NifSE|GetNthChildBaseTexture]]
[[Category:NifSE|SourceTextureGetFile]]
[[Category:NifSE (Children)|GetNthChildBaseTexture]]
[[Category:NifSE (NiSourceTexture)|GetFile]]

Latest revision as of 13:42, 31 August 2010

This is a command from NifSE.

Syntax

(string:filePath) NiSourceTextureGetFile short:nifID short:blockID
(string:filePath) NiSrcTexGetFile short:nifID short:blockID

Returns the path relative to Oblivion\Textures\ to the texture file used by the indicated NiSourceTexture-derived block. The blockID argument, as usual, defaults to 0, indicating the root which is a NiNode block. NiNode blocks are not derived from NiSourceTexture, so this function will almost never be used without specifying the blockID desired.

Typically, one determines blockID by using NiAVObjectGetPropertyByType to get the NiTexturingProperty associated with a NiAVObject, and then using NiTexturingPropertyGetTextureSource to get the blockID of the NiSourceTexture.

See Also[edit | edit source]