Difference between revisions of "NiExtraDataGetArray"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>DragoonWraith
(New page: This is a command from NifSE. '''Syntax''' (array:value) NiExtraDataGetArray short:nifID ''short:blockID'' (array:value) NiEDGetArr short:nifID ''short:blockID'' If...)
 
imported>DragoonWraith
m (categorizing)
Line 25: Line 25:
* 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.
* 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|ExtraDataGetNumber]]
[[Category:NifSE|ExtraDataGetArray]]
[[Category:NifSE (NiExtraData)|GetNumber]]
[[Category:NifSE (NiExtraData)|GetArray]]

Revision as of 11:10, 30 August 2010

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.

Note

  • Because 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.