Skip to content

Repository files navigation

Alpha Sequence Importer

One click: transparent PNG sequences & alpha videos → animated planes that follow the Blender timeline. 一键导入透明背景 PNG 序列 / 透明视频,生成跟随 Blender 时间轴自动播放的透明平面。

Blender License Tests

A WebM(VP9-alpha) video plane and an APNG plane imported with this add-on, playing over the timeline (Cycles render): 本插件导入的 WebM(VP9-alpha) 视频平面与 APNG 平面(Cycles 渲染):

demo


✨ Features | 功能

  • One-click import — pick files or a whole folder; sequences are detected and grouped automatically. 一键导入:选文件或整个文件夹,序列自动识别分组。
  • Transparent videos — WebM (VP9/VP8), MOV (ProRes 4444 / QuickTime Animation / PNG-in-MOV), MKV, AVI, APNG and more, with per-codec alpha intelligence and warnings. 透明视频专项支持,按编码器判断 alpha 可用性并给出可执行的转换建议。
  • Follows the timeline natively — uses Blender's SEQUENCE/MOVIE image sources (one GPU texture, loaded on demand; no keyframes, no drivers, no per-frame Python). 原生跟随时间轴:SEQUENCE/MOVIE 数据源按需加载,零驱动器零脚本。
  • Timeline helpers — start frame, loop, scene frame-range sync, auto FPS sync (container sniffing → ffprobe → MovieClip). 起始帧/循环/场景范围同步/帧率自动探测与同步。
  • Quality checks — missing frames, mixed padding, interlaced PNG, alpha-less codecs (H.264/H.265), GIF binary alpha… all reported with actionable messages. 序列断帧/补位混用/交错 PNG/无 alpha 编码/GIF 二值透明等自动体检并提示。
  • Placement & materials — standing / floor / facing camera, fixed width or fit-to-camera, billboard; Unlit (overlay), Principled, Diffuse presets; Straight/Premultiplied auto; pixel-art interpolation. 摆放与材质三预设、alpha 模式自动、像素风插值。
  • N-panel manager — select, move start to current frame, toggle loop, set scene range, fix-not-animating, clean remove. N 面板管理工具:选中/对齐当前帧/循环开关/设为场景范围/修复不播放/删除。
  • Bilingual UI — English + 简体中文 (toggle in preferences). 中英双语界面。

📦 Install | 安装

Blender Method 方法
4.2 and newer Get Extensions → arrow (top-right) → Install from Diskalpha_sequence_importer-x.y.z.zip 扩展面板 → 从磁盘安装
3.6 – 4.1 Preferences > Add-ons → Installalpha_sequence_importer-x.y.z-legacy.zip 插件偏好 → 安装 legacy 包

Download from Releases. The two zip layouts are mutually exclusive (Blender enforces different structures), so pick the one matching your Blender version. 两个 zip 布局互不兼容(Blender 对两种安装强制不同结构),请按版本选择。

🚀 Quick start | 快速上手

  1. File > Import > Alpha Sequence / Transparent Video (or the N-panel → Alpha Import button). 顶部菜单 文件 > 导入,或 N 面板 "Alpha Import"。
  2. Select any frame(s) of your sequence — or a video — and confirm. Multi-select and whole-folder scan are supported. 选中序列中的任意一帧或多帧(或直接选视频),支持多选与整文件夹扫描。
  3. Press Space — the plane animates with the timeline. 按空格播放,平面随时间轴自动播放。

Naming examples | 命名示例: shot_0100.png … shot_0107.png ✓ · img_1.png … img_12.png ✓ (unpadded) · 渲染/中文_0001.png ✓ · exp_0001.exr

🎬 Format guide | 格式指南

Source Alpha Notes 说明
PNG / TGA / TIFF / WebP sequence ✅ full Best for hand-drawn / rendered frames 序列首选
EXR / DPX sequence ✅ premultiplied Linear color space auto-set 自动线性色彩空间
WebM (VP9/VP8) ✅ full* Recommended video format — plays in Blender out of the box 透明视频首选
MOV — QuickTime Animation (RLE) ✅ full Heavy but reliable 稳定但体积大
MOV — ProRes 4444 / 4444 XQ ✅ full Industry standard 行业标准
MKV, AVI (alpha codecs) ✅ / ⚠️ Codec dependent 取决于编码
APNG ⚠️ first frame Blender itself decodes only frame 1 — convert to WebM Blender 仅解首帧,建议转 WebM
GIF ⚠️ binary 1-bit transparency only 仅 1 位透明
MP4 (H.264/H.265), MPEG, WMV, FLV ❌ none No alpha in these codecs — the add-on warns you 无 alpha,插件会警告

* WebM VP9 alpha is signalled out-of-band; the add-on treats VP9 as "maybe alpha" and renders it correctly either way. WebM 的 VP9 alpha 走附加块通道,插件按"可能含 alpha"处理,两种情况都能正确显示。

Convert with FFmpeg | 用 FFmpeg 转换:

# PNG sequence → WebM VP9 with alpha (recommended)
ffmpeg -framerate 25 -start_number 1 -i shot_%04d.png -c:v libvpx-vp9 -pix_fmt yuva420p -auto-alt-ref 0 out.webm

# PNG sequence → ProRes 4444
ffmpeg -framerate 25 -start_number 1 -i shot_%04d.png -c:v prores_ks -profile:v 4444 -pix_fmt yuva444p10le out.mov

🛠 Troubleshooting | 常见问题

  • Plane shows a gray checkerboard / won't animate → N-panel → Fix Not Animating (re-reads files, forces auto refresh). 平面显示灰棋盘/不播放 → N 面板"修复不播放"。
  • Imported MP4 looks like a solid card → that codec has no alpha (see table above); convert to WebM/ProRes4444. MP4 不透明 → 该编码无 alpha,请转换格式。
  • Batch/headless rendering shows placeholders on the first frames → this is a Blender quirk with auto_refresh in background mode; for renders, either keep the planes playing in a saved .blend (paths resolved) or disable auto refresh on the image data-block before batch rendering. 无头渲染偶发占位 → 属 Blender 后台模式怪癖,批量渲染前可临时关闭图像的"自动刷新"。
  • Scene plays at the wrong speed → enable Sync Video FPS to Scene (default on) or check Output > Frame Rate. 速度不对 → 检查场景帧率是否已同步。

⚙️ How it works | 实现原理

For sequences the add-on loads frame #1 and switches the image data-block source to SEQUENCE; for videos the source is MOVIE. Playback is driven by the ImageUser on the Image Texture node (frame_start / frame_offset / frame_duration / use_auto_refresh), the same mechanism as the bundled Import Images as Plans — Blender swaps the GPU texture per timeline frame with zero Python overhead. frame_offset = first file number − start frame maps file numbers to timeline frames (verified by render tests, including non-padded numbers and gaps).

序列:读取首帧后将数据块源切换为 SEQUENCE;视频:MOVIE 源。播放由贴图节点的 ImageUser(起始帧/偏移/时长/自动刷新)驱动——与官方 Import Images as Planes 同一机制,逐帧仅换 GPU 纹理,无 Python 开销。frame_offset = 首帧编号 − 起始帧 完成编号映射(含非补位编号与断帧,均由渲染级测试验证)。

Video intelligence chain: pure-Python container sniffing (MP4/MOV box parser, MKV/WebM EBML parser, GIF, APNG) → optional ffprobe → Blender MovieClip. No third-party Python dependencies.

视频智能探测链:纯 Python 容器嗅探(MP4/MOV box、MKV/WebM EBML、GIF、APNG)→ 可选 ffprobe → Blender MovieClip,零第三方依赖。

Field-tested Blender quirks the add-on defends against | 已实测规避的 Blender 怪癖: renaming SEQUENCE data-blocks breaks frame lookup · check_existing=True can break sequence playback · backslash paths + auto-refresh can break re-scan (Windows) · image.update() corrupts freshly-switched SEQUENCE sources · image.size is invalid after switching to SEQUENCE. 重命名序列数据块会使帧查找失效 · check_existing=True 可能破坏播放 · 反斜杠路径+自动刷新在 Windows 可能破坏重扫描 · image.update() 会损坏刚切换的 SEQUENCE 源 · 切换源后 image.size 失效。

🧪 Development | 开发与测试

# Generate test assets (Blender 4.5+; renders short sample videos)
blender -b --factory-startup --python tests/assets_gen.py
# Optional: extra formats (VP9 alpha, ProRes 4444, APNG, GIF) + ffprobe cross-checks
python tests/ffmpeg_gen.py

# Full test suite (30 cases, render-verified)
blender -b --factory-startup --python tests/run_tests.py -- --assets tests/assets

# Build the distribution zip
python tools/build.py

See docs/development.md for architecture notes and the bug field-guide.

📄 License | 许可证

GPL-3.0-or-later — see LICENSE. Compatible with Blender's add-on licensing requirements. 遵循 Blender 插件许可要求。

About

One-click import of transparent PNG sequences & alpha videos (WebM VP9 / ProRes 4444 / QTRLE / APNG) as animated planes that follow the Blender timeline. Blender 3.6-5.x.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages