Difference between revisions of "NiSourceTextureSetExternalTexture"

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


'''Syntax'''
'''Syntax'''
  (bool:success) NifSetNthChildBaseTexture string:FilePath short:ChildID short:NifID
  (bool:success) NiSourceTextureSetExternalTexture string:filePath short:nifID ''short:blockID''
(bool:success) NiSrcTexSetExtTex string:filePath short:nifID ''short:blockID''


Sets the file path of the Base Texture of the specified Child of the root to the specified file path. File path must be relative to <tt>Oblivion\Data\</tt>, '''not <tt>Oblivion\Data\Textures\</tt>''' - this follows [[NifGetNthChildBaseTexture]]. If the Child has no Base Texture, or no NiTexturingProperty, or the process fails for any other reason, a 0 is returned; otherwise the return is 1.
Sets the texture used by the <tt>NiSourceTexture</tt>-derived block indicated by <tt>blockID</tt> to the texture file found at <tt>filePath</tt>. The <tt>filePath</tt> argument is relative to <tt>Oblivion\Textures\</tt>. The <tt>blockID</tt> argument defaults to 0, which is usually the NIF's root <tt>NiNode</tt>, not a <tt>NiSourceTexture</tt>, and therefore this function will almost always require an explicit <tt>blockID</tt>. Returns 1 if successful, 0 on failure.


== See Also ==
== See Also ==
* [[NifNthChildHasTexturingProp]]
* [[NiSourceTextureGetFile]]
* [[NifNthChildHasBaseTexture]]
* [[NifGetNthChildBaseTexture]]


[[Category:NifSE|SetNthChildBaseTexture]]
[[Category:NifSE|SourceTextureSetExternalTexture]]
[[Category:NifSE (Children)|SetNthChildBaseTexture]]
[[Category:NifSE (NiSourceTexture)|SetExternalTexture]]

Revision as of 14:02, 29 August 2010

This is a command from NifSE.

Syntax

(bool:success) NiSourceTextureSetExternalTexture string:filePath short:nifID short:blockID
(bool:success) NiSrcTexSetExtTex string:filePath short:nifID short:blockID

Sets the texture used by the NiSourceTexture-derived block indicated by blockID to the texture file found at filePath. The filePath argument is relative to Oblivion\Textures\. The blockID argument defaults to 0, which is usually the NIF's root NiNode, not a NiSourceTexture, and therefore this function will almost always require an explicit blockID. Returns 1 if successful, 0 on failure.

See Also