Deployed 2a63d0b to 1.0.x with MkDocs 1.6.1 and mike 2.2.0

This commit is contained in:
2026-09-22 21:47:39 +08:00
parent 87cb67d32a
commit a9aa0dfb8e
24 changed files with 233 additions and 111 deletions

View File

@@ -1580,7 +1580,7 @@
<nav class="md-footer__inner md-grid" aria-label="Footer" >
<a href="../../" class="md-footer__link md-footer__link--prev" aria-label="Previous: AnyImage">
<a href="../../" class="md-footer__link md-footer__link--prev" aria-label="Previous: 🖼️ AnyImage">
<div class="md-footer__button md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11z"/></svg>
@@ -1590,7 +1590,7 @@
Previous
</span>
<div class="md-ellipsis">
AnyImage
🖼️ AnyImage
</div>
</div>
</a>

View File

@@ -31,7 +31,7 @@
<title>AnyImage - AnyImage 文档</title>
<title>🖼️ AnyImage - AnyImage 文档</title>
@@ -127,7 +127,7 @@
<div class="md-header__topic" data-md-component="header-topic">
<span class="md-ellipsis">
AnyImage
🖼️ AnyImage
</span>
</div>
@@ -1324,6 +1324,58 @@
<label class="md-nav__title" for="__toc">
<span class="md-nav__icon md-icon"></span>
Table of contents
</label>
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
<li class="md-nav__item">
<a href="#image-is-all-you-need" class="md-nav__link">
<span class="md-ellipsis">
IMAGE is All You Need
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#start-directly-from-an-image" class="md-nav__link">
<span class="md-ellipsis">
Start directly from an image
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#one-image-multiple-spatial-forms" class="md-nav__link">
<span class="md-ellipsis">
One image, multiple spatial forms
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#quick-start" class="md-nav__link">
<span class="md-ellipsis">
Quick start
</span>
</a>
</li>
</ul>
</nav>
</div>
</div>
@@ -1339,44 +1391,48 @@
<h1 id="anyimage">AnyImage</h1>
<p>把图片里的空间感带进 Blender。</p>
<p>AnyImage 是一款 Blender 扩展,可以粘贴和编辑图片、创建普通 Plane 或 Depth Plane、从局部选区生成 Cutout Shape,并在独立 AI Environment 中完成去背景与高清放大。</p>
<h1 id="anyimage">🖼️ AnyImage</h1>
<h2 id="image-is-all-you-need">IMAGE is All You Need</h2>
<p><img alt="cover" src="../assets/cover.png" /></p>
<p>AnyImage is an image toolkit for Blender by OmooLab. It turns images into more than references: paste an image, select what you need, and transform it into a scene element with materials, contours, and depth.</p>
<h2 id="start-directly-from-an-image">Start directly from an image</h2>
<p>Press <strong>Ctrl+Shift+V</strong> in the 3D View or Node Editor (<strong>Cmd+Shift+V</strong> on macOS) to paste an image from the clipboard directly into the current workspace. There is no need to save the image first or interrupt your workflow.</p>
<p>You can also continue working with existing images. Select an Image Empty, right-click to open the <strong>AnyImage</strong> menu, and access the most common actions from there.</p>
<h2 id="one-image-multiple-spatial-forms">One image, multiple spatial forms</h2>
<ul>
<li>按 <strong>Ctrl+V</strong>(macOS 为 <strong>Cmd+V</strong>)把剪贴板图片粘贴到当前编辑器</li>
<li>用 <strong>Plane</strong> 创建可调厚度和细分的图片网格</li>
<li>用 <strong>Depth Plane</strong> 把静态图片转换为可调节的立体面片</li>
<li>用 <strong>Cutout</strong> 从套索选区生成 Surface、Balloon 与两种 Depth Shape</li>
<li>用 <strong>Frame</strong> 从当前视角重新取景并合并 Image Empty,用 <strong>Mask</strong> 的 Lasso、Brush 或 Polyline 编辑 Alpha;Brush 拖动时以红色或灰色填充预览准确范围,释放后提交;用 <strong>Rectify</strong> 校正透视</li>
<li>用 <strong>Remove Background / Upscale</strong> 处理单图、视频和序列帧</li>
<li><strong>Plane / Depth Plane</strong>: Turn an image into a flat or dimensional plane.</li>
<li><strong>Cutout</strong>: Select a subject and create a Surface, Balloon, or Depth Shape.</li>
<li><strong>Image tools</strong>: Reframe images, edit transparent areas, correct perspective, remove backgrounds, and upscale.</li>
</ul>
<h2 id="quick-start">Quick start</h2>
<p>Drag the button below into the Blender window to install. The first drag prompts you to add the AnyImage extension repository. Confirm it, then drag the button again.</p>
<div class="anyimage-install">
<div class="anyimage-install-item" data-platform="windows-x64">
<div class="anyimage-install-group">
<button type="button" draggable="true" class="anyimage-install-button" data-install-url="https://extensions.omoolab.xyz/AnyImage.v1.0.1.windows-x64.zip?repository=.%2Findex.json&amp;blender_version_min=4.5.0&amp;platforms=windows-x64&amp;python_versions=3.11%2C3.13">
<i class="i-move"></i><span>拖入 Blender 安装</span>
<i class="i-move"></i><span>Drag into Blender to install</span>
</button>
<div class="anyimage-install-platform"><strong>Windows</strong> – 78.3&nbsp;MB</div>
</div>
<small class="anyimage-install-note">…或<a href="https://extensions.omoolab.xyz/AnyImage.v1.0.1.windows-x64.zip" download="AnyImage.v1.0.1.windows-x64.zip">下载</a>后通过 <a href="https://docs.blender.org/manual/zh-hans/latest/editors/preferences/extensions.html#install" target="_blank">Install from Disk</a> 安装</small>
<small class="anyimage-install-note">…or <a href="https://extensions.omoolab.xyz/AnyImage.v1.0.1.windows-x64.zip" download="AnyImage.v1.0.1.windows-x64.zip">download</a> and use <a href="https://docs.blender.org/manual/en/latest/editors/preferences/extensions.html#install" target="_blank">Install from Disk</a></small>
</div>
<div class="anyimage-install-item" data-platform="macos-arm64">
<div class="anyimage-install-group">
<button type="button" draggable="true" class="anyimage-install-button" data-install-url="https://extensions.omoolab.xyz/AnyImage.v1.0.1.macos-arm64.zip?repository=.%2Findex.json&amp;blender_version_min=4.5.0&amp;platforms=macos-arm64&amp;python_versions=3.11%2C3.13">
<i class="i-move"></i><span>拖入 Blender 安装</span>
<i class="i-move"></i><span>Drag into Blender to install</span>
</button>
<div class="anyimage-install-platform"><strong>macOS<span class="anyimage-install-platform-rest"> - Apple Silicon</span></strong> – 57.5&nbsp;MB</div>
</div>
<small class="anyimage-install-note">…或<a href="https://extensions.omoolab.xyz/AnyImage.v1.0.1.macos-arm64.zip" download="AnyImage.v1.0.1.macos-arm64.zip">下载</a>后通过 <a href="https://docs.blender.org/manual/zh-hans/latest/editors/preferences/extensions.html#install" target="_blank">Install from Disk</a> 安装</small>
<small class="anyimage-install-note">…or <a href="https://extensions.omoolab.xyz/AnyImage.v1.0.1.macos-arm64.zip" download="AnyImage.v1.0.1.macos-arm64.zip">download</a> and use <a href="https://docs.blender.org/manual/en/latest/editors/preferences/extensions.html#install" target="_blank">Install from Disk</a></small>
</div>
<div class="anyimage-install-item" data-platform="linux-x64">
<div class="anyimage-install-group">
<button type="button" draggable="true" class="anyimage-install-button" data-install-url="https://extensions.omoolab.xyz/AnyImage.v1.0.1.linux-x64.zip?repository=.%2Findex.json&amp;blender_version_min=4.5.0&amp;platforms=linux-x64&amp;python_versions=3.11%2C3.13">
<i class="i-move"></i><span>拖入 Blender 安装</span>
<i class="i-move"></i><span>Drag into Blender to install</span>
</button>
<div class="anyimage-install-platform"><strong>Linux</strong> – 71.0&nbsp;MB</div>
</div>
<small class="anyimage-install-note">…或<a href="https://extensions.omoolab.xyz/AnyImage.v1.0.1.linux-x64.zip" download="AnyImage.v1.0.1.linux-x64.zip">下载</a>后通过 <a href="https://docs.blender.org/manual/zh-hans/latest/editors/preferences/extensions.html#install" target="_blank">Install from Disk</a> 安装</small>
<small class="anyimage-install-note">…or <a href="https://extensions.omoolab.xyz/AnyImage.v1.0.1.linux-x64.zip" download="AnyImage.v1.0.1.linux-x64.zip">download</a> and use <a href="https://docs.blender.org/manual/en/latest/editors/preferences/extensions.html#install" target="_blank">Install from Disk</a></small>
</div>
</div>

View File

@@ -1475,6 +1475,14 @@
<td>Scene 手势状态、模型状态查询、枚举与 Operator 属性构造</td>
</tr>
<tr>
<td><code>tools.py</code></td>
<td>3D View WorkspaceTool 声明、顺序与注册</td>
</tr>
<tr>
<td><code>keymaps.py</code></td>
<td>扩展快捷键的注册与清理</td>
</tr>
<tr>
<td><code>common/</code></td>
<td>Blender 侧公共能力</td>
</tr>
@@ -1489,7 +1497,7 @@
</tbody>
</table>
<h2 id="_2">注册与配置</h2>
<p>注销先关闭 Runtime、快捷键与工具,再移除菜单和 Scene 属性,按 <code>CLASSES</code> 逆序注销类型。设备、存储目录、模型、材质显示适配和功能上限统一通过 <code>preferences.py</code> 读取。</p>
<p>顶层入口注册类型后,通过 <code>tools.py</code> 统一注册 WorkspaceTool,通过 <code>keymaps.py</code> 统一注册快捷键。注销按相反生命周期关闭 Runtime、快捷键与工具,再移除菜单和 Scene 属性,按 <code>CLASSES</code> 逆序注销类型。设备、存储目录、模型、材质显示适配和功能上限统一通过 <code>preferences.py</code> 读取。</p>
<p><strong>Maximum AI Input Size</strong> 限制模型分析输入和 Upscale 可提交源图的长边;<strong>Maximum Frame Resolution</strong> 限制 Frame 输出长边;<strong>Minimum Relative Edge Length</strong> 与 <strong>Boundary Padding</strong> 控制 Cutout 的网格密度和轮廓边界采样。</p>
<h2 id="_3">执行边界</h2>
<pre class="mermaid"><code>flowchart TD

View File

@@ -1536,8 +1536,8 @@
<td>为本机同步扩展 wheel 与 Manifest</td>
</tr>
<tr>
<td><code>uv run node-group build</code></td>
<td>构建、验证节点资产并运行测试</td>
<td><code>uv run --group blender node-group build</code></td>
<td>构建、验证节点资产并运行节点测试</td>
</tr>
<tr>
<td><code>uv run model sync</code></td>

View File

@@ -1473,7 +1473,7 @@
<h1 id="_1">节点资产</h1>
<h2 id="_2">资产清单</h2>
<p>节点组由 <code>tools/nodes/groups/</code> 中的构建模块定义。</p>
<p>节点组由 <code>nodes/groups/</code> 中的构建模块定义,共用构建逻辑位于 <code>nodes/common/</code>。</p>
<table>
<thead>
<tr>
@@ -1525,7 +1525,7 @@
</tbody>
</table>
<h2 id="_3">构建节点资产</h2>
<p>生产节点组由 <code>uv run node-group build</code> 构建到 <code>src/anyimage/assets/O_AnyImage.blend</code></p>
<p>生产节点组由 <code>uv run --group blender node-group build</code> 构建到 <code>src/anyimage/assets/O_AnyImage.blend</code>。该文件是 Git 忽略的发布构建产物;CI 与本地发布都从节点源码重新生成。</p>
<p>节点组规则:</p>
<ul>
<li>字段默认直接连接,多个消费者可复用同一输出;按消费位置的几何、域、类型和输入属性版本验证求值等价性</li>
@@ -1542,15 +1542,12 @@
<li>接口或布局变更须验证 socket 顺序与结构、未使用输出隐藏及几何求值;纯布局变更比较运算、默认值和实际连接,确认功能不变</li>
</ul>
<h2 id="_4">构建资产脚本</h2>
<p><code>tools/nodes/build.py</code> 按依赖顺序构建资产,调用 <code>arrangement/</code> 统一排列几何节点组后保存。<code>common/</code> 提供共用构建函数:<code>nodes.py</code> 创建接口与节点,<code>depth_surface.py</code>、<code>cutout.py</code> 等组装几何,<code>shader.py</code> 构建材质着色节点,<code>material_slots.py</code> 继承几何材质槽;<code>tools/nodes/preview/</code> 导出交互预览。</p>
<p>保存后,<code>check.py</code> 在独立 Blender 进程中重新加载资产并做基本几何求值。接口、默认值和详细几何行为由 <code>tests/</code> 检查。</p>
<div class="language-bash highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a>uv<span class="w"> </span>run<span class="w"> </span>node-group<span class="w"> </span>build<span class="w"> </span>--blender<span class="w"> </span><span class="s2">&quot;/path/to/blender&quot;</span>
</span><span id="__span-0-2"><a id="__codelineno-0-2" name="__codelineno-0-2" href="#__codelineno-0-2"></a>uv<span class="w"> </span>run<span class="w"> </span>node-group<span class="w"> </span>build<span class="w"> </span>--skip-tests
</span><span id="__span-0-3"><a id="__codelineno-0-3" name="__codelineno-0-3" href="#__codelineno-0-3"></a>uv<span class="w"> </span>run<span class="w"> </span>node-group<span class="w"> </span>check
</span><span id="__span-0-4"><a id="__codelineno-0-4" name="__codelineno-0-4" href="#__codelineno-0-4"></a>uv<span class="w"> </span>run<span class="w"> </span>node-group<span class="w"> </span>preview
</span></code></pre></div>
<p>脚本按 <code>--blender</code>、环境变量 <code>BLENDER_BIN</code>、项目 <code>.env</code>、<code>PATH</code> 的顺序查找 Blender。无法自动找到时,在项目根目录的 <code>.env</code> 中配置:</p>
<div class="language-text highlight"><pre><span></span><code><span id="__span-1-1"><a id="__codelineno-1-1" name="__codelineno-1-1" href="#__codelineno-1-1"></a>BLENDER_BIN=&quot;/absolute/path/to/blender&quot;
<p><code>tools/nodes/build.py</code> 按依赖顺序加载 <code>nodes/groups/</code> 的定义,调用 <code>arrangement/</code> 统一排列几何节点组后保存。<code>nodes/common/</code> 提供共用构建函数:<code>nodes.py</code> 创建接口与节点,<code>depth_surface.py</code>、<code>cutout.py</code> 等组装几何,<code>shader.py</code> 构建材质着色节点,<code>material_slots.py</code> 继承几何材质槽;<code>tools/nodes/preview/</code> 导出交互预览。</p>
<p>命令通过当前 uv Python 的独立子进程执行构建、检查和预览,<code>bpy</code> 由 <code>blender</code> dependency group 提供。保存后,<code>check.py</code> 重新加载资产并做基本几何求值;<code>tests/nodes/</code> 覆盖节点定义行为,<code>tests/tools/nodes/</code> 覆盖工具行为。CI 使用同一入口先生成资产,再运行常规测试和打包。</p>
<div class="language-bash highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a>uv<span class="w"> </span>run<span class="w"> </span>--group<span class="w"> </span>blender<span class="w"> </span>node-group<span class="w"> </span>build
</span><span id="__span-0-2"><a id="__codelineno-0-2" name="__codelineno-0-2" href="#__codelineno-0-2"></a>uv<span class="w"> </span>run<span class="w"> </span>--group<span class="w"> </span>blender<span class="w"> </span>node-group<span class="w"> </span>build<span class="w"> </span>--skip-tests
</span><span id="__span-0-3"><a id="__codelineno-0-3" name="__codelineno-0-3" href="#__codelineno-0-3"></a>uv<span class="w"> </span>run<span class="w"> </span>--group<span class="w"> </span>blender<span class="w"> </span>node-group<span class="w"> </span>check
</span><span id="__span-0-4"><a id="__codelineno-0-4" name="__codelineno-0-4" href="#__codelineno-0-4"></a>uv<span class="w"> </span>run<span class="w"> </span>--group<span class="w"> </span>blender<span class="w"> </span>node-group<span class="w"> </span>preview
</span></code></pre></div>

View File

@@ -1452,7 +1452,7 @@
<h1 id="cutout">Cutout</h1>
<p>Cutout 在静态 Image Empty 上圈定 Selection,按轮廓创建 Flat、Solid、Depth Symmetry 或 Depth Solid。入口位于 <code>operators/cutout_tool/operators.py</code>,Shape 菜单位于 <code>interaction.py</code>,预设标识与节点组对应关系位于 <code>shape.py</code>。</p>
<p>Cutout 在静态 Image Empty 上圈定 Selection,按轮廓创建 Flat、Solid、Depth Symmetry 或 Depth Solid。Operator 入口位于 <code>operators/cutout_tool/operators.py</code>,WorkspaceTool 声明位于 <code>tools.py</code>,Shape 菜单位于 <code>interaction.py</code>,预设标识与节点组对应关系位于 <code>shape.py</code>。</p>
<pre class="mermaid"><code>flowchart TD
A[Lasso 或 Polyline 提交 SelectionPath] --&gt; B[选择 Shape]
B --&gt; C[栅格化 SelectionMask 并读取源 RGBA]

View File

@@ -1363,7 +1363,7 @@
<h1 id="frame">Frame 多图合成</h1>
<p><code>operators/frame_tool/operators.py</code> 定义 <code>FrameImages</code> 和 <code>FrameTool</code>。<code>projection.py</code> 负责视图投影、交叠和结果平面定位,<code>compositing.py</code> 负责像素深度排序与边界覆盖采样,<code>__init__.py</code> 导出类型及注册清单。Frame 将选中的静态 Image Empty 按当前视图合成为一张图片。</p>
<p><code>operators/frame_tool/operators.py</code> 定义 <code>FrameImages</code>。<code>projection.py</code> 负责视图投影、交叠和结果平面定位,<code>compositing.py</code> 负责像素深度排序与边界覆盖采样,<code>__init__.py</code> 导出 Operator 及注册清单。<code>tools.py</code> 定义对应的 <code>FrameTool</code>。Frame 将选中的静态 Image Empty 按当前视图合成为一张图片。</p>
<pre class="mermaid"><code>flowchart TD
A[拖出屏幕矩形] --&gt; B[冻结视图矩阵并收集选中静态图片]
B --&gt; C[检查矩形与 active 图片的有效投射交集]

View File

@@ -1403,7 +1403,7 @@
</tr>
</tbody>
</table>
<p>单文件功能按业务命名;复杂功能包在 <code>operators.py</code> 定义 Operator 和入口协调逻辑,交互式工具同时定义 WorkSpaceTool,其余模块承载具体实现。包的 <code>__init__.py</code> 汇总导出与 <code>CLASSES</code> 注册清单,类型在 <code>operators/__init__.py</code> 和扩展 <code>__init__.py</code> 汇总注册。AI Operator 使用普通字典提交任务,并在主线程响应中读取文件和修改 Blender 数据。</p>
<p>单文件功能按业务命名;复杂功能包在 <code>operators.py</code> 定义 Operator 和入口协调逻辑,其余模块承载具体实现。包的 <code>__init__.py</code> 汇总导出与 <code>CLASSES</code> 注册清单,类型在 <code>operators/__init__.py</code> 和扩展 <code>__init__.py</code> 汇总注册。交互式工具的 WorkspaceTool 统一定义和注册于 <code>tools.py</code>。AI Operator 使用普通字典提交任务,并在主线程响应中读取文件和修改 Blender 数据。</p>

View File

@@ -1363,7 +1363,7 @@
<h1 id="mask-alpha">Mask Alpha 编辑</h1>
<p><code>operators/mask_tool.py</code> 定义 <code>EditImageAlpha</code> 和 <code>MaskTool</code>,使用 <code>common/viewport.py</code> 的 <code>ImageGesture</code> 管理 Lasso、Brush 与 Polyline。</p>
<p><code>operators/mask_tool.py</code> 定义 <code>EditImageAlpha</code>,使用 <code>common/viewport.py</code> 的 <code>ImageGesture</code> 管理 Lasso、Brush 与 Polyline;<code>tools.py</code> 定义对应的 <code>MaskTool</code>。</p>
<pre class="mermaid"><code>flowchart TD
A[冻结 Scene 的 Gesture、Mode、Radius] --&gt; B[屏幕手势与 Overlay]
B --&gt; C[完成后投影并生成覆盖 M]

View File

@@ -1363,7 +1363,7 @@
<h1 id="rectify">Rectify 透视校正</h1>
<p><code>operators/rectify_tool/operators.py</code> 定义 <code>RectifyImagePerspective</code> 与 <code>RectifyTool</code>,将图片内的四角区域校正为矩形。<code>geometry.py</code> 负责四角验证与像素校正,<code>preview.py</code> 负责预览图、Overlay 和宽高比控制,<code>__init__.py</code> 导出类型及注册清单。</p>
<p><code>operators/rectify_tool/operators.py</code> 定义 <code>RectifyImagePerspective</code>,将图片内的四角区域校正为矩形。<code>geometry.py</code> 负责四角验证与像素校正,<code>preview.py</code> 负责预览图、Overlay 和宽高比控制,<code>__init__.py</code> 导出 Operator 及注册清单;<code>tools.py</code> 定义对应的 <code>RectifyTool</code>。</p>
<pre class="mermaid"><code>flowchart TD
A[点选四角] --&gt; B[规范为凸 Quad 并检查图片交叠]
B --&gt; C[512×512 预览与宽高比调整]