YAPF/extensions/blender
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Nexoniarz 2ca726e3af YAPF v1: fast byte-aligned format, SIMD, tools and plugins
Format (version 1, replaces the earlier experimental versions):
- per-tile YCoCg-R or subtract-green colour transform, 8-bit modular
- 12 row filters per 8-row band (Left, Gradient, Up-right, Up-average,
  Up 1-8 rows), none with more than a one-add serial dependency
- residuals in groups of 8 at the group's width (w bits x 8 = w bytes),
  4-bit control codes with repeat-previous-width runs chosen by DP
- constant and stored tiles, independent 64x64 tiles, mips, GPU hints
- all sizes validated before decoding; corrupt input is rejected

Library:
- SIMD on by default: SSSE3 (runtime CPUID check; GCC, Clang, MSVC,
  MinGW) and NEON on ARM64; -DYAPF_NO_SIMD for plain C
- yapf_load_memory, yapf_load_mt, yapf_load_memory_mt
- 6-10x faster decoding than PNG (stb_image) on one core; -O2 and -O3
  builds perform the same
- fixes for macOS (sysconf) and the Windows import library exports

Tools and integrations:
- `yapf` CLI: convert PNG/JPG/TGA/BMP/PSD/GIF <-> YAPF, info, bench,
  thumbnail, mips
- JavaScript and Python bindings (byte-identical to the C encoder)
- GIMP 3 plugin: exports the flattened image, optional mipmaps
- Blender extension: import (also as plane), export, drag and drop
- VS Code preview, Figma plugin, Photoshop scripts, Linux MIME type and
  thumbnailer
- Makefile, updated build.sh / build.bat, tools/build_release.sh
- tests/test_yapf.c (784 checks) and bindings/js/test.js

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 14:17:59 +02:00
..
yapf_image YAPF v1: fast byte-aligned format, SIMD, tools and plugins 2026-10-03 14:17:59 +02:00
build.py YAPF v1: fast byte-aligned format, SIMD, tools and plugins 2026-10-03 14:17:59 +02:00
README.md YAPF v1: fast byte-aligned format, SIMD, tools and plugins 2026-10-03 14:17:59 +02:00

YAPF for Blender

Import and export .yapf images in Blender 4.2 or later (tested with Blender 5.1).

  • File → Import → YAPF Image (.yapf) — optionally as a plane with a material that shows the image.
  • Image Editor → Image → Open YAPF… / Save as YAPF… (with mipmaps option).
  • Drag and drop .yapf files into the 3D Viewport (creates a plane), the Image Editor or a node editor.

Blender cannot read .yapf on its own, so imported images are packed into the .blend and survive saving and reopening.

Install

  1. Get yapf_image-blender.zip from the Releases, or build it (below).
  2. Blender → Edit → Preferences → Get Extensions → ⌄ → Install from Disk… and pick the zip.

The zip contains the native YAPF library for Windows, macOS and Linux (x64 and ARM64). If no library matches your system, the extension still imports using a pure-Python decoder (numpy, bundled with Blender), but cannot export.

Build the zip

python3 extensions/blender/build.py            # library for this machine only
tools/build_release.sh                         # all platforms (needs zig)

Both write dist/yapf_image-blender.zip.