Difference between revisions of "NiExtraDataGetArray"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>DragoonWraith
m (categorizing)
imported>DragoonWraith
 
Line 9: Line 9:
Returns 0 if the function fails for whatever reason.
Returns 0 if the function fails for whatever reason.


== Array NiExtraData Types ==
{{NifSE NiExtraData Array Type List}}
The following <tt>NiExtraData</tt> have array data.
<ul><li><tt>NiBinaryExtraData</tt> - an array of shorts
<li><tt>NiColorExtraData</tt> - a StringMap with the following format:
<pre>map["r"]:float - Red intensity
map["g"]:float - Green intensity
map["b"]:float - Blue intensity
map["a"]:float - Alpha value</pre>
<li><tt>NiFloatsExtraData</tt> - an array of floats
<li><tt>NiIntegersExtraData</tt> - an array of integers
<li><tt>NiStringsExtraData</tt> - an array of strings
<li><tt>NiVectorExtraData</tt> - a vector of floats with length 3, corresponding to x, y, and z.</ul>

== Note ==
* Because [[:Category:OBSE|OBSE]]'s plugin API does not currently support accepting arrays as arguments, NifSE does not currently provide the ability to set array data, so for now this data is read-only.


[[Category:NifSE|ExtraDataGetArray]]
[[Category:NifSE|ExtraDataGetArray]]

Latest revision as of 23:59, 20 January 2011

This is a command from NifSE.

Syntax

(array:value) NiExtraDataGetArray short:nifID short:blockID
(array:value) NiEDGetArr short:nifID short:blockID

If the block indicated by blockID is of a NiExtraData-derived class which holds an array of data, returns the block's value. Because blockID defaults to 0, which is usually the NIF's root, a NiNode, blockID must almost always be specified when using this function.

Returns 0 if the function fails for whatever reason.

Array NiExtraData Types

The following NiExtraData have array data.

  • NiBinaryExtraData - an array of shorts
  • NiColorExtraData - a StringMap with the following format:
    map["r"]:float - Red intensity
    map["g"]:float - Green intensity
    map["b"]:float - Blue intensity
    map["a"]:float - Alpha value
  • NiFloatsExtraData - an array of floats
  • NiIntegersExtraData - an array of integers
  • NiStringsExtraData - an array of strings
  • NiVectorExtraData - a vector of floats with length 3, corresponding to x, y, and z.