DEV Community

Cover image for [RELEASE] AIS Unit & Scale Doctor — Fix Blender unit/scale issues, profile-aware rulers, and guarded FBX/glTF export
Anvil Interactive Solutions
Anvil Interactive Solutions

Posted on

[RELEASE] AIS Unit & Scale Doctor — Fix Blender unit/scale issues, profile-aware rulers, and guarded FBX/glTF export

Correct size, correct axes—every time.

Why this exists

If your mesh looks right in Blender but wrong in engine, you’re probably fighting:

  • Unapplied or non-uniform scale
  • Negative (mirrored) scale & flipped normals
  • Parent objects with scale ≠ 1
  • Scene unit mismatch vs target engine

AIS Unit & Scale Doctor solves that, end-to-end.


Key features

  • 🧭 Profile-aware units & axes Choose a Target Profile and the tool adapts:
    • Unity (meters, Y-up)
    • Unreal (centimeters, Z-up)
    • glTF (meters, Y-up on export)
    • CAD (millimeters) Rulers and axis lines are remapped to match the profile’s up/forward, so what you see in the viewport reflects what the engine expects.
  • 🔎 One-click detection Flags unapplied, nonuniform, negative, parentScaled, and sceneMismatch with a clean UI summary + detailed console printout.
  • 🛠️ Safe fixes
    • Align Scene Units to profile (does not rescale vertices).
    • Apply Scale on Meshes (safe for statics).
    • Fix Negative Scales (auto recalculate normals).
    • Skip Armature to preserve rigs/skin by default.
  • 📏 Rulers, axis lines, and cages (AABB/OBB)
    • AABB or OBB (true extents) with translucent fill & wire.
    • On-mesh dimension labels (units + precision), inside the box with adjustable inset.
    • Axis colors (X=red, Y=green, Z=blue).
    • Draw On Top option for dense scenes.
  • 🔒 Guarded FBX/glTF export Configurable fail-on rules block exports that would break downstream pipelines (toast + JSON-style console report).
  • 🧪 CI / headless validator Run checks in automated builds. Emits JSON to disk and returns non-zero exit codes when violations exist.

Screenshots / GIFs


Demo video (2:05)

🎥 https://youtu.be/iTdByFfPiKs


Quickstart

  1. Pick Target Profile (Unity/Unreal/glTF/CAD)
  2. Run Detection (optional: Selection Only)
  3. Run Fix: align scene units, apply scale, fix mirrored normals; skip armatures if needed
  4. Toggle Ruler Overlay (AABB/OBB, colorize, on-top, precision)
  5. Export (Guarded) → fix any violations → export clean

Installation

  1. Edit → Preferences → Add-ons → Install…
  2. Select the zip (e.g., ais-unit-scale-doctor-0.4.0.zip)
  3. Enable AIS Unit & Scale Doctor
  4. Open 3D View → N-Panel → AIS Tools

Compatibility: Blender 3.0–4.4 (tested 3.6 LTS & 4.4). Windows/macOS/Linux.
Dependencies: none (GPU/BLF fallbacks handled).


Download / Docs / Issues


Guarded export (details)

  • Fail-on rules (comma-sep): negative,nonuniform,parentScaled,unapplied,sceneMismatch
  • FBX axes set per profile:
    • Unity/glTF: Forward -Z, Up Y
    • Unreal: Forward X, Up Z
  • glTF operator enables Y-up flag

On failure: export is blocked; a human-readable toast appears and a JSON-style report is printed to the console.


CI / Headless validation

Example call (write report + exit non-zero on violations):

blender -b --python-expr "import bpy; bpy.ops.preferences.addon_enable(module='ais_unit_scale_doctor')" \
-- --v4-validate --profile UNITY \
--fail-on negative,nonuniform,sceneMismatch \
--out unit_report.json
Enter fullscreen mode Exit fullscreen mode

FAQ

Q: My asset looks mirrored or inside-out after fixing.
A: You likely had negative scale. Enable Fix Negative Scales so normals are recalculated after apply.

Q: Will this break my rigs?
A: By default we skip objects with Armature modifiers. Only freeze rigged meshes when you intend to.

Q: Why do Y/Z labels “swap” when I pick Unity?
A: Unity is Y-up. The overlay remaps axes to your profile so what you see is what the engine expects.

Q: Does Align Scene Units rescale my mesh?
A: No—only scene unit settings change. Vertex data remains unchanged.

Q: Can I use this with CAD millimeters?
A: Yes—select CAD (mm) and validate with rulers before export.


Changelog (0.4.0)

  • Profile-aware axis remap (Unity Y-up / Unreal Z-up / glTF Y-up export)
  • AABB/OBB cages with translucent fill and on-top mode
  • Colorized labels (X/Y/Z) with precision control & inside/inset placement
  • Expanded detection reasons and parent-scale checks
  • Guarded FBX/glTF export with customizable fail-on rules
  • Headless validator (JSON report + exit codes)
  • GPU/BLF compatibility fallbacks; clean register/unregister

Roadmap

  • Saved rule presets per project/team
  • Ignore lists / per-object overrides
  • CI templates for GitHub/GitLab/Jenkins

Credits / License

  • Author: Anvil Interactive Solutions
  • License: MIT
  • Thanks to everyone who tested mixed-unit scenes and shared tricky edge cases!

Top comments (0)