A Maya plug-in for importing and exporting NetImmerse / Gamebryo NIF files used by Bethesda games — Skyrim LE / SE / AE, Fallout 3 / NV / 4.
| This Fork | DCCStudios/Maya_NifTools_Plugin |
| Upstream | Alecu100/maya_nif_plugin |
| Target | Maya 2025 — Windows x64 |
The upstream repo (by Alecu100) was last updated in May 2017 and targets
Maya 2012 – 2017. It relies solely on niflib for NIF I/O — a library that
does not understand Skyrim SE/AE's BSTriShape geometry. Importing any
SE-era NIF with the upstream code would crash or produce empty meshes.
This fork (by TheShinyHaxorus / DCCStudios) modernizes the plugin for Maya 2025 and adds a second NIF backend — nifly — for full modern NIF support.
| Change | Detail |
|---|---|
| Build config | New Release - 2025 | x64 configuration targeting the Maya 2025 devkit |
| C++ standard | C++17 enabled (/std:c++17) |
| Defines | WIN32_LEAN_AND_MEAN, NOMINMAX to prevent Windows header conflicts |
| Deployment | Post-build step auto-copies .mll, DLL, and MEL scripts to Maya 2025 user dirs |
| Options UI | Import scale option wired through to the importer |
nifly (the same library behind
Outfit Studio / BodySlide) is added as a submodule at extern/nifly.
A new NiflyImporter class auto-detects modern NIFs
(user-version ≥ 12, BSFadeNode root, etc.) and routes them through nifly
instead of niflib.
| Feature | What it does |
|---|---|
| Mesh geometry | Vertices, normals, UVs, vertex colors, triangles |
| Materials & textures | Creates Maya Phong shaders — diffuse, normal, glow maps |
| Texture path resolution | Uses the search paths configured in the import options dialog |
| Skeleton & skinning | Builds joint hierarchy, applies skinCluster with per-vertex bone weights |
| Weight normalization | Optional — controlled by the importNormalizedWeights setting |
| Reference skeleton | Loads bone transforms from an external skeleton NIF when the mesh NIF has names only |
| Dismember partitions | Reads BSDismemberSkinInstance → creates nifDismemberPartition Maya nodes |
NiflyExportingFixture— native nifly-based geometry export for Skyrim meshes.ResaveWithNifly()— bridge utility that re-saves a niflib-exported NIF through nifly for format consistency.
The niflib submodule was changed from Alecu100/niflib →
DCCStudios/Mayaniflib, which
adds BSTriShape stub support so the legacy code path no longer crashes on
SE NIFs.
The upstream's Fallout 4 classes (NifImportingFixtureFallout4,
NifMeshImporterFallout4, BSSegment, BSSubSegment, etc.) were incomplete
and non-functional. They have been removed — modern Fallout 4 NIFs are now
handled by the nifly path.
- Skyrim fixtures renamed to
NifSkyrimImportingFixture/NifSkyrimExportingFixture. NifMaterialImporterSkyrimFallout4→NifMaterialImporterSkyrim.- Removed
.vcxproj.userwith hardcoded user paths. - Added
.gitignorefor build artifacts. - PDB output redirected to
$(TEMP)to prevent file-locking.
Everything you need to compile the plugin is included in the repo — no external SDK downloads, no CMake, no extra tools beyond Visual Studio and Git.
All dependencies are either bundled or build automatically:
| Dependency | Location | How it's used |
|---|---|---|
| Maya 2025 SDK | extern/maya2025/ |
Headers + import libs — committed in repo |
| nifly | extern/prebuilt/nifly.lib |
Pre-built static lib committed in repo (source in extern/nifly/ submodule) |
| niflib | niflib/ |
Builds automatically as a solution dependency |
The build produces two runtime files:
| Output | Role |
|---|---|
nifTranslator.mll |
The Maya plug-in |
niflib_x64.dll |
Runtime library loaded alongside the plugin |
| Requirement | Details |
|---|---|
| OS | Windows 10 or 11 — x64 |
| Visual Studio 2022 | Community / Professional / Enterprise. Install the "Desktop development with C++" workload. Uses the v143 platform toolset. |
| Git | Any recent version — submodule support required. |
Note
That's it. No Maya DevKit download, no CMake, no vcpkg. The Maya 2025
headers, import libraries, and pre-built nifly.lib are all committed
directly in the repo.
git clone --recursive https://github.com/DCCStudios/Maya_NifTools_Plugin.git
cd Maya_NifTools_PluginImportant
--recursive is required. It pulls two submodules the build depends on:
| Submodule | Local path | Source |
|---|---|---|
| niflib | niflib/ |
DCCStudios/Mayaniflib |
| nifly | extern/nifly/ |
ousnius/nifly |
Already cloned without --recursive? Run:
git submodule update --init --recursive- Open
maya_nif_plugin.slnin Visual Studio 2022. - Set the Configuration dropdown to
Release - 2025and Platform tox64. - Build → Build Solution (or
Ctrl + Shift + B).
The solution compiles two projects in dependency order:
| Order | Project | Output |
|---|---|---|
| 1 | niflib | niflib\bin\niflib_x64.dll + niflib\lib\niflib_dll.lib |
| 2 | maya_nif_plugin | Release - 2025\nifTranslator.mll |
niflib builds automatically — no manual steps.
nifly.libis pre-built and already in the repo atextern/prebuilt/nifly.lib.
The post-build step automatically deploys everything to Maya:
| File | Purpose |
|---|---|
nifTranslator.mll |
The plugin itself |
niflib_x64.dll |
Runtime library (must be next to the .mll) |
| File | Purpose |
|---|---|
nifTranslatorOpts.mel |
Import / export options dialog |
nifTranslatorMenuCreate.mel |
Creates the NifTools menu in Maya |
nifTranslatorMenuRemove.mel |
Removes the menu on plug-in unload |
AEbsLightningShaderTemplate.mel |
Attribute Editor template for BS Lightning Shader |
AEnifDismemberPartitionTemplate.mel |
Attribute Editor template for dismember partitions |
Note
If the post-build step fails (different install paths, etc.), copy the files
manually. The two critical files are nifTranslator.mll and
niflib_x64.dll — both must be in Maya's plug-ins folder.
Tip
Targeting a different Maya version? Change the folder name from 2025 to
your version and compile against the matching devkit.
- Launch Maya 2025.
- Windows → Settings / Preferences → Plug-in Manager.
- Find
nifTranslator.mllin the list. - Check Loaded (and optionally Auto load for future sessions).
- A NifTools menu should appear in the menu bar.
- File → Import to open
.nif/.kffiles. File → Export Selection to export geometry to.nif.
"Cannot find niflib_x64.dll"
Make sure niflib_x64.dll is in the same folder as nifTranslator.mll
(the plug-ins directory), or in a directory on your system PATH.
"Cannot open include file: maya/MFnPlugin.h"
The Maya SDK headers should already be in extern/maya2025/include/maya/. If
the folder is missing or empty, make sure you have the latest version of the
repo. The headers are committed directly — no devkit download needed.
Plugin loads but no NifTools menu appears
The MEL scripts are missing from your Maya scripts directory.
Copy them manually from the repo root to
%USERPROFILE%\Documents\maya\2025\scripts\:
nifTranslatorOpts.melnifTranslatorMenuCreate.melnifTranslatorMenuRemove.mel
Import produces an empty scene
Check the debug log at:
%USERPROFILE%\Documents\maya\2025\scripts\nifTranslator_debug.log
Common causes:
- The NIF is pre-Skyrim LE and falls through to the legacy niflib path.
- The file is corrupt or uses an unsupported NIF version.
Rebuilding nifly from source
The pre-built nifly.lib should work out of the box. If you need to rebuild
it (e.g. after modifying nifly source), install CMake 3.10+ and run from
the repo root:
cd extern\nifly
mkdir build && cd build
cmake .. -G "Visual Studio 17 2022" -A x64 -DBUILD_TESTING=OFF
cmake --build . --config Release
copy build\src\Release\nifly.lib "..\..\..\prebuilt\nifly.lib"maya_nif_plugin/
│
├── NifTranslator.cpp / .h Main Maya translator entry point
├── maya_nif_plugin.sln Visual Studio solution
├── maya_nif_plugin.vcxproj Visual Studio project (all build configs)
│
├── niflib/ Submodule ─ niflib DLL (legacy NIF I/O)
├── extern/
│ ├── nifly/ Submodule ─ nifly source (modern NIF I/O)
│ ├── prebuilt/ Pre-built nifly.lib (ready to link)
│ └── maya2025/ Bundled Maya 2025 SDK
│ ├── include/maya/ 544 Maya API headers
│ └── lib/ Foundation, OpenMaya, OpenMayaAnim, etc.
│
├── include/
│ ├── Common/ Shared types, options, utilities
│ ├── Custom Nodes/ BSLightningShader, NifDismemberPartition
│ ├── Exporters/ Export fixtures (Default, Skyrim, Nifly, KF)
│ └── Importers/ Import fixtures (Default, Skyrim, Nifly, KF)
│
├── src/ Implementation files — mirrors include/ layout
│
├── nifTranslatorOpts.mel Import / export options dialog
├── nifTranslatorMenuCreate.mel Creates the NifTools menu
├── nifTranslatorMenuRemove.mel Removes the NifTools menu
├── AEbsLightningShaderTemplate.mel AE template ─ BS Lightning Shader
├── AEnifDismemberPartitionTemplate.mel AE template ─ Dismember Partition
│
└── README.md This file
The original Maya NIF File Translator by Alecu100 was documented at: http://www.niftools.org/wiki/index.php/Maya