Skip to content

OnatKCB/x-file-opener

Repository files navigation

This Blender addon enables importing and exporting DirectX (.x) files with full animation support.

Key Features:

  • ✅ Mesh geometry import/export
  • ✅ Material information handling
  • ✅ UV coordinates support (multiple UV layers)
  • ✅ Normal mapping support (MeshNormals)
  • ✅ Vertex color support (MeshVertexColors)
  • ✅ Polygon to triangle conversion
  • ✅ User-friendly interface panel
  • NEW: Full animation support
  • NEW: Skeletal animation (bones/armatures)
  • NEW: Skin weights and vertex groups
  • NEW: Keyframe animations (rotation, scale, position)

Installation: Standard Blender addon installation via Edit > Preferences > Add-ons

Usage:

  • Import via File > Import > DirectX (.x) or using the DirectX panel
  • Export via File > Export > DirectX (.x) or panel buttons
  • Supports exporting selected objects only
  • NEW: Animations automatically imported and exported

Supported Format: DirectX Text (.x) format - ASCII text-based .x files with animation support

Mapping Features

The plugin now supports advanced mapping features:

Normal Mapping

  • Imports and exports MeshNormals blocks
  • Automatically applies custom normals to imported meshes
  • Preserves vertex normal information during export

Vertex Colors

  • Supports MeshVertexColors blocks for vertex-based coloring
  • Creates vertex color layers in Blender during import
  • Exports existing vertex color data from Blender meshes

Multiple UV Layers

  • Handles multiple MeshTextureCoords blocks
  • Creates separate UV layers for each texture coordinate set
  • Exports all UV layers from Blender meshes

Animation Features

The plugin now supports full skeletal animation:

Skeletal Animation

  • Imports and exports Frame hierarchy for bone structures
  • Creates Blender armatures from DirectX Frame data
  • Supports bone parent-child relationships

Skin Weights

  • Imports SkinWeights blocks for vertex deformation
  • Creates vertex groups in Blender for each bone
  • Applies armature modifiers automatically
  • Preserves vertex weight information during export

Keyframe Animation

  • Supports AnimationSet and Animation blocks
  • Imports three animation key types:
    • Type 0: Quaternion rotation keyframes
    • Type 1: Scale keyframes
    • Type 2: Position keyframes
  • Creates Blender Actions from DirectX animations
  • Exports Blender animations back to DirectX format

Animation Workflow

  1. Import: DirectX files with animations create armatures and actions
  2. Edit: Use Blender's animation tools to modify keyframes
  3. Export: All armatures and actions are automatically included

The README includes test examples:

  • test_cube.x (basic mesh)
  • test_mapping.x (with mapping features)
  • test_animated_cube.x (with full animation support)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages