Skip to content

PyNifly 28.0.0 - Starfield! and Blender 5.2

Choose a tag to compare

@BadDogSkyrim BadDogSkyrim released this 17 Jul 16:03
· 127 commits to main since this release

Major new release! We added support for Blender 5.2, fixed FO4 compound
collisions
, and are giving you a very early preview of Starfield support. We've also
moved from storing nif-specific properties in generic custom attributes and have put them
in named property panels (which is actually the major incompatibility, sorry).

New: Starfield support

Consider this experimental - what's here works, passes tests, etc. etc. But the
functionality is limited and I've only tried it out on a few bodyparts and some simple
statics.

  • Import and export Starfield meshes. Starfield stores geometry in external .mesh
    files referenced by a BSGeometry block in the NIF; PyNifly reads and writes both.

    • The folder and name of a nif's associated mesh can be set in Blender.
    • Multiple LOD levels are not yet supported.
  • Skinning. Skinned bodies round-trip with their bones, bind transforms, and weights.
    SF meshes can have more than 4 bone weights per vertex, and that's supported.
    Verified in-game and in the Creation Kit.

  • Materials. Starfield has a new, complex layered materials system. Our goal is to
    make it possible to visualize, create and modify these matierals directly in Blender.

    • Import creates a shader that mimics the Starfield material to the extent possible.
      Every material layer and blend is represented as a group node in Blender, connected as
      in the material structure.

    • Materials are compressed into a material database (materialsbeta.cdb) and may not be
      available as loose files. The importer will look for a loose file first (using our
      existing rules for finding texture files), then look in materialsbeta. You can set
      the path to that file in the addon's preferences.

    • The standard in SF is that materials live in a subfolder under the materials folder.
      Vanilla SF materials files have a hashed folder and material file name. You can
      override both with comprehensible names ('mod'/'material') if you prefer. This is an
      option on export, should you prefer to manage your own materials.

  • Bodypart morphs. In Starfield, morphs live in a morph.dat file associated with the
    nif through the bodypart's record. Morphs are not constrainted to headparts only.
    Headparts have two morph files: "performance" (expressions) and "chargen". There is no
    convention that the morph be named after the nif or saved with it - vanilla morphs are
    kept in a separate meshes/morphs/ folder tree. So:

    • Load morphs expliclity with import/Starfield morph with PyNifly

    • Properties chargen_path and performance_path store the relative path of the morph
      file.

    • On export the morph files will be written to those paths if defined (and if the
      "export morphs/tri files" option is set), or to a generated path if not.

  • We've added dedicated Starfield texture-path preferences and property panels.

Fallout 4 fixes

  • Compound collions Fallout 4 collisions may be a single object that combines multiple
    collisions (workbenches, for example). These are now represented in Blender and import
    and export without crashing the game. Modifying them is not yet supported - they use a
    bounding-volume tree format that we haven't implemented yet. The collision is shown in
    Blender as a bhkPhysicsSystem → bhkCompound group of the individual shapes.

  • The convex-radius collision visualization now uses one node group per radius, so
    shapes with different convex radii are shown correctly.

  • A shape skinned to bones but parented under a non-identity node (common in Fallout 4
    furniture) is now placed correctly on both import and export. Previously the node's
    offset was applied twice on import (the shape slid off its collision), and on export the
    skin transforms didn't carry the offset, so the shape rendered in the wrong place with
    skinning on (correct with skinning off) in NifSkope, Outfit Studio, and the game.

  • Static shapes that share a NIF with a skinned shape are no longer given an empty
    skin binding. Fallout 4 furniture often mixes a skinned mesh with static decoration;
    exporting the static pieces with a (bone-less) skin instance crashed the game on load.
    They now export as plain static geometry.

General improvements

  • Pynifly property panels We've moved from custom properties on objects and materials
    to dedicated PyNifly-specific property panels. This should be easier to manage, but old
    blend files won't have the new properties. There's a migration path from old custom
    properties to new panels so this shouldn't be a major issue.

  • Exporting dense meshes is dramatically faster. A per-vertex read of the UV layer
    scaled badly on modern Blender (over two minutes on a ~130k-loop body); it is now read
    in bulk, cutting that shape's export from ~120 s to ~3 s, with byte-identical output.

Animation fixes (Fallout 4 / Skyrim)

  • Linear rotation keys export. Node/bone rotations stored as linear (rather than
    quadratic) keys now export instead of failing.

  • Rotation channels with mismatched key times are handled. A NIF can store X/Y/Z
    rotation as three independent curves with different key times; import and export now
    put them on a common timeline when needed instead of mis-combining them (and the
    spurious "Keyframes do not align" warning is gone).

  • Node and root-node animations export. Animations on a nif's ordinary nodes — and on
    the root node itself — are no longer dropped or written onto the wrong bone.

New: Blender 5.2 support

  • PyNifly works on Blender 5.2. Blender 5.2 changed how geometry-node modifier inputs
    are set, which broke collision import; fixed. The full test suite passes on 5.2 and 5.1.