Difference between revisions of "NifOpen"
no edit summary
imported>DragoonWraith (→Notes) |
imported>DragoonWraith |
||
Line 2: | Line 2: | ||
'''Syntax''' | '''Syntax''' | ||
(short:NifID) NifOpen string: | (short:NifID) NifOpen string:filePath ''bool:writable'' | ||
Opens a | Opens a NIF file for reading, and if the optional bool is true, for editing. Returns a unique identifier which may be passed to other NifSE functions in order to refer to the mesh. If opening the mesh fails for whatever reason, the return value is -1. | ||
{{NifSE Example}} | {{NifSE Example}} | ||
Line 12: | Line 12: | ||
** This bug has been fixed as of NifSE v1.0 α1.3. | ** This bug has been fixed as of NifSE v1.0 α1.3. | ||
* The file path must be relative to the <tt>Oblivion\Data\Meshes\</tt> folder. This is the same scheme as used by similar [[:Category:Oblivion Script Extender|OBSE]] functions. | * The file path must be relative to the <tt>Oblivion\Data\Meshes\</tt> folder. This is the same scheme as used by similar [[:Category:Oblivion Script Extender|OBSE]] functions. | ||
* NifSE creates a copy of the indicated | * NifSE creates a copy of the indicated NIF file when you request a writable nif, and the nif you are actually editing is that nif. The original nif is not altered in any way. You can get the file path of the copy with [[NifGetPath]]. | ||
== See Also == | == See Also == | ||
* [[NifClose]] | * [[NifClose]] | ||
[[Category:NifSE | [[Category:NifSE]] |