@hybridlabor-api/aos-blender-studio 0.0.0-stage → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +18 -0
- package/.claude-plugin/plugin.json +39 -0
- package/AGENTS.md +29 -0
- package/CHANGELOG.md +18 -0
- package/LICENSE +201 -0
- package/NOTICE +4 -0
- package/README.md +36 -2
- package/agents/asset-rig-pipeline.md +11 -0
- package/agents/audio-caption-mixer.md +11 -0
- package/agents/motion-studio-director.md +13 -0
- package/agents/set-and-anim-builder.md +12 -0
- package/agents/visual-qa-critic.md +12 -0
- package/bin/b3-blender-studio.mjs +156 -0
- package/bootstrap_upstreams.py +78 -0
- package/bootstrap_upstreams.sh +3 -0
- package/commands/hybrid-motion.md +13 -0
- package/commands/motion-studio.md +13 -0
- package/commands/scene-studio.md +13 -0
- package/episodes/_template/script.md +5 -0
- package/episodes/_template/scripts/01_smoke_test_set.py +37 -0
- package/episodes/_template/shotlist_draft.json +48 -0
- package/episodes/_template/sources.md +4 -0
- package/hooks/post_blender_audit.py +56 -0
- package/hooks/pre_asset_route.py +71 -0
- package/hooks/pre_final_mux.py +92 -0
- package/install.py +150 -0
- package/install.sh +3 -0
- package/package.json +49 -4
- package/plugin.json +74 -0
- package/schemas/shot_metrics.schema.json +59 -0
- package/schemas/timeline.schema.json +209 -0
- package/scripts/check-manifests.mjs +114 -0
- package/scripts/check-pack.mjs +28 -0
- package/skills/blender-2d5-set-builder/SKILL.md +15 -0
- package/skills/blender-tripo-character/SKILL.md +17 -0
- package/skills/cartoon-studio/SKILL.md +17 -0
- package/skills/code-motion-hybrid/SKILL.md +12 -0
- package/skills/farm-3d-studio/SKILL.md +21 -0
- package/skills/video-audio-post/SKILL.md +12 -0
- package/tests/smoke_test.py +227 -0
- package/tools/blender_lib/__init__.py +2 -0
- package/tools/blender_lib/assembly_guard.py +163 -0
- package/tools/blender_lib/incremental_render.py +52 -0
- package/tools/blender_lib/motion_easing.py +62 -0
- package/tools/blender_lib/scene_preset.py +86 -0
- package/tools/blender_lib/svg_cutout_rig.py +175 -0
- package/tools/blender_locate.py +36 -0
- package/tools/contact_sheet.py +90 -0
- package/tools/run_blender_headless.py +82 -0
- package/tools/stitch_episode.py +101 -0
- package/tools/style_adapter.py +51 -0
- package/tools/timeline_compiler.py +87 -0
- package/upstreams.json +304 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "b3-marketplace",
|
|
3
|
+
"owner": {
|
|
4
|
+
"name": "Hybridlabor Global LLC"
|
|
5
|
+
},
|
|
6
|
+
"metadata": {
|
|
7
|
+
"description": "B3 Blender Studio — AOS extra plugin for Blender 2.5D/3D motion production",
|
|
8
|
+
"version": "1.1.0"
|
|
9
|
+
},
|
|
10
|
+
"plugins": [
|
|
11
|
+
{
|
|
12
|
+
"name": "b3-blender-studio",
|
|
13
|
+
"source": "./",
|
|
14
|
+
"description": "Max-Level ECC Blender 2.5D/3D Motion Studio & Video Generation Plugin for AOS",
|
|
15
|
+
"version": "1.1.0"
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://anthropic.com/claude-code/plugin.schema.json",
|
|
3
|
+
"name": "b3-blender-studio",
|
|
4
|
+
"version": "1.1.0",
|
|
5
|
+
"description": "Max-Level ECC Blender 2.5D/3D Motion Studio & Video Generation Plugin for AOS: 2.5D cartoon studio, full 3D scene studio, Blender + code-motion hybrid, headless rendering, captions and audio QA.",
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "Hybridlabor Global LLC"
|
|
8
|
+
},
|
|
9
|
+
"license": "Apache-2.0",
|
|
10
|
+
"keywords": [
|
|
11
|
+
"blender",
|
|
12
|
+
"motion",
|
|
13
|
+
"animation",
|
|
14
|
+
"2d5",
|
|
15
|
+
"3d",
|
|
16
|
+
"video",
|
|
17
|
+
"aos"
|
|
18
|
+
],
|
|
19
|
+
"skills": [
|
|
20
|
+
"./skills/cartoon-studio",
|
|
21
|
+
"./skills/farm-3d-studio",
|
|
22
|
+
"./skills/code-motion-hybrid",
|
|
23
|
+
"./skills/blender-2d5-set-builder",
|
|
24
|
+
"./skills/blender-tripo-character",
|
|
25
|
+
"./skills/video-audio-post"
|
|
26
|
+
],
|
|
27
|
+
"agents": [
|
|
28
|
+
"./agents/motion-studio-director.md",
|
|
29
|
+
"./agents/set-and-anim-builder.md",
|
|
30
|
+
"./agents/asset-rig-pipeline.md",
|
|
31
|
+
"./agents/audio-caption-mixer.md",
|
|
32
|
+
"./agents/visual-qa-critic.md"
|
|
33
|
+
],
|
|
34
|
+
"commands": [
|
|
35
|
+
"./commands/motion-studio.md",
|
|
36
|
+
"./commands/scene-studio.md",
|
|
37
|
+
"./commands/hybrid-motion.md"
|
|
38
|
+
]
|
|
39
|
+
}
|
package/AGENTS.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# AOS — Blender Studio Global Directives
|
|
2
|
+
|
|
3
|
+
## Execution Contract
|
|
4
|
+
- Interactive blocking & inspection: use the active `blender-mcp` bridge (`ahujasid/blender-mcp`).
|
|
5
|
+
- Deterministic builds, animation passes, and renders:
|
|
6
|
+
`python3 tools/run_blender_headless.py --blend <file.blend> --script <step.py>`
|
|
7
|
+
(Underlying CLI: `blender -b file.blend --python script.py`; macOS fallback: `/Applications/Blender.app/Contents/MacOS/Blender`).
|
|
8
|
+
- Every pipeline step MUST be saved as an independent, rerunnable `.py` file under `episodes/<slug>/scripts/`.
|
|
9
|
+
- Reuse modules from `tools/blender_lib/` instead of rewriting `bpy` boilerplate.
|
|
10
|
+
|
|
11
|
+
## Non-Negotiable Production Rules
|
|
12
|
+
- **Single Source of Truth**: Frame boundaries flow exclusively from `timeline.json` compiled from WhisperX word timestamps. Never guess or hardcode frame counts.
|
|
13
|
+
- **Vertical 2.5D Format**: Exact `1080x1920`, `30 fps`, `55-70s`. Render at target size; never crop or upscale.
|
|
14
|
+
- **3-Pass Set Discipline**: Build sets strictly as `BLOCK -> LIGHT -> DRESS`, rendering a look sheet after each pass.
|
|
15
|
+
- **2D vs 3D Separation**: Flat 2D SVG characters inside 3D sets NEVER receive realistic lighting/shading. Always apply flat color, thick dark outline, and a floor contact shadow at `Z = 0.001`.
|
|
16
|
+
- **3D Rig & Retargeting Pro Rules**:
|
|
17
|
+
1. Align rest poses before mocap/Mixamo retargeting.
|
|
18
|
+
2. Grip held props from finger bones.
|
|
19
|
+
3. Render close-up stills of hands and feet before full renders.
|
|
20
|
+
4. Enforce max 4 weights per vertex and zero cloth weights on arms/legs.
|
|
21
|
+
- **License Compliance Guardrail**: Never clone or execute `Hunyuan3D-2` when `B3_REGION` is in `EU`, `UK`, or `KR`. Route assets via `hooks/pre_asset_route.py`.
|
|
22
|
+
- **Blender UI Locale**: Run Blender in English (`en_US`) so add-ons like Material Combiner resolve shader nodes cleanly.
|
|
23
|
+
|
|
24
|
+
## Banned Visual & Audio Patterns (Auto-Reject in QA)
|
|
25
|
+
- Centered title on a gradient background.
|
|
26
|
+
- Corner labels, visible timecodes, or decorative frame borders.
|
|
27
|
+
- Everything fading in.
|
|
28
|
+
- A whoosh sound effect on every cut.
|
|
29
|
+
- Any on-screen number or claim not linked to an openable URL in `sources.md`.
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 1.1.0 — 2026-12-05
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
- AOS extra plugin packaging: `.claude-plugin/plugin.json`, `.claude-plugin/marketplace.json` (`b3-marketplace`, source `./`, version 1.1.0), npm package `@hybridlabor-api/aos-blender-studio`.
|
|
7
|
+
- Commands: `/motion-studio`, `/scene-studio`, `/hybrid-motion` (`commands/*.md`).
|
|
8
|
+
- `b3-blender-studio` CLI (`bin/b3-blender-studio.mjs`, no dependencies): `doctor`, `install`, `path`, `--version`, `--help`; cross-platform tool detection (macOS, Windows, Linux).
|
|
9
|
+
- `scripts/check-manifests.mjs` manifest consistency check; `npm test` / `npm run check`.
|
|
10
|
+
- Blender 4.5 `sys.path` fix.
|
|
11
|
+
- Cross-platform install scripts.
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
- Product renamed to AOS.
|
|
15
|
+
- Apache-2.0 license.
|
|
16
|
+
|
|
17
|
+
### Removed
|
|
18
|
+
- Compiled `.pyc` caches.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [2026] [BDB DEV]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/NOTICE
ADDED
package/README.md
CHANGED
|
@@ -1,3 +1,37 @@
|
|
|
1
|
-
#
|
|
1
|
+
# b3-blender-studio (AOS Plugin)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
ECC-style Blender 2.5D/3D Motion Studio & Video Generation plugin built on top of `ahujasid/blender-mcp`.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
```bash
|
|
7
|
+
unzip b3-blender-studio-plugin.zip
|
|
8
|
+
cd b3-blender-studio
|
|
9
|
+
|
|
10
|
+
# Default install (clones core_skills + blender_addons_and_libs, respects B3_REGION=EU)
|
|
11
|
+
B3_REGION=EU python3 install.py
|
|
12
|
+
# Windows: py install.py (or: python install.py; set B3_REGION with `set B3_REGION=EU`)
|
|
13
|
+
|
|
14
|
+
# Optional: clone additional tiers (modeling_pipeline_sdks, video_audio_and_motion)
|
|
15
|
+
B3_REGION=EU python3 bootstrap_upstreams.py --tiers core_skills blender_addons_and_libs video_audio_and_motion
|
|
16
|
+
|
|
17
|
+
# Point at a non-PATH Blender binary (also honored by tools/run_blender_headless.py)
|
|
18
|
+
export BLENDER_BIN=/path/to/blender # Windows: set BLENDER_BIN=C:\Blender\blender.exe
|
|
19
|
+
|
|
20
|
+
# Verify hooks, schemas, timeline compiler, and style adapter without Blender
|
|
21
|
+
python3 tests/smoke_test.py
|
|
22
|
+
|
|
23
|
+
# Run headless Blender smoke test (requires Blender 4.5 LTS or 5.2+)
|
|
24
|
+
python3 tools/run_blender_headless.py \
|
|
25
|
+
--script episodes/_template/scripts/01_smoke_test_set.py \
|
|
26
|
+
--audit-json episodes/_template/qa/audit_smoke.json \
|
|
27
|
+
--mode 2d5-cartoon
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Modes
|
|
31
|
+
- `/motion-studio` (`skills/cartoon-studio/SKILL.md`): Vertical 2.5D animated shorts (`1080x1920 @ 30fps`).
|
|
32
|
+
- `/scene-studio` (`skills/farm-3d-studio/SKILL.md`): Full 3D scene & character shorts (`geometry-script`, `Tripo SDK`, `Expy Kit`, `Wiggle 2`).
|
|
33
|
+
- `/hybrid-motion` (`skills/code-motion-hybrid/SKILL.md`): Headless Blender render passes composited in `Remotion`, `Motion Canvas`, or `Manim`.
|
|
34
|
+
|
|
35
|
+
## License
|
|
36
|
+
|
|
37
|
+
Apache-2.0, see LICENSE and NOTICE. Upstream repos in upstreams.json are cloned on your machine at install time and keep their own licenses.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: asset-rig-pipeline
|
|
3
|
+
description: Handles 3D asset routing (build123d / Tripo SDK), cleanup, LODs, Rigify+Expy Kit rigging, Mixamo/FreeMoCap retargeting, and Wiggle 2 cloth physics.
|
|
4
|
+
tools: [pre_asset_route, run_blender_headless, read, write]
|
|
5
|
+
skills: [blender-tripo-character, farm-3d-studio]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You build and rig 3D hero props and characters.
|
|
9
|
+
- Always invoke `hooks/pre_asset_route.py` before selecting a 3D generation backend (enforces EU/UK/KR license block on `Hunyuan3D-2`).
|
|
10
|
+
- Enforce max 4 weights/vertex, zero cloth weights on limbs, aligned rest poses before retargeting, finger-bone prop grips, and mandatory hand/foot close-up test renders.
|
|
11
|
+
- Log all measured numbers (triangles, bones, LOD counts, texture sizes, clip frame ranges).
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: audio-caption-mixer
|
|
3
|
+
description: Handles voiceover (Kokoro/mic), WhisperX timestamps, AudioCraft SFX, earshot mix QA, and HyperFrames/FFmpeg final assembly.
|
|
4
|
+
tools: [shell, read, write]
|
|
5
|
+
skills: [video-audio-post]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You handle voice, word-level sync, sound mixing, captions, and final video delivery.
|
|
9
|
+
- Never place a whoosh on every cut.
|
|
10
|
+
- Always run `earshot` and produce `audio/earshot_report.json` before stitching.
|
|
11
|
+
- Run `hooks/pre_final_mux.py` on the final MP4 to enforce resolution, FPS, duration, and source coverage.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: motion-studio-director
|
|
3
|
+
description: Orchestrates 2.5D/3D/Hybrid episodes from story pitch and timeline compilation to final QA sign-off.
|
|
4
|
+
tools: [read, write, web_search, timeline_compiler, style_adapter, delegate]
|
|
5
|
+
skills: [cartoon-studio, farm-3d-studio, code-motion-hybrid]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are the showrunner and pipeline orchestrator for AOS.
|
|
9
|
+
- Enforce approval gates after Step 1 (5 pitched true stories with 2 openable URLs each) and Step 2 (`script.md` 150-170 words + `sources.md`).
|
|
10
|
+
- Compile `timeline.json` and `REFERENCE.md` deterministically via `tools/timeline_compiler.py`.
|
|
11
|
+
- Lock visual tokens via `tools/style_adapter.py`.
|
|
12
|
+
- Delegate Blender set/animation work to `set-and-anim-builder`, 3D organic/rigged assets to `asset-rig-pipeline`, audio/compositing to `audio-caption-mixer`, and mandatory reviews to `visual-qa-critic`.
|
|
13
|
+
- Never present a final video until `hooks/pre_final_mux.py` and `visual-qa-critic` pass with zero P0/P1 flaws.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: set-and-anim-builder
|
|
3
|
+
description: Builds 3D sets (BLOCK->LIGHT->DRESS), 2D SVG-plane cutout rigs, and motivated animations via Blender MCP and blender_lib.
|
|
4
|
+
tools: [blender-mcp, run_blender_headless, read, write]
|
|
5
|
+
skills: [blender-2d5-set-builder, motion-design-skill]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You execute Blender set building, lighting, 2D cutout integration, and shot animation.
|
|
9
|
+
- Save every stage as a standalone `.py` script in `episodes/<slug>/scripts/` using `tools/blender_lib/`.
|
|
10
|
+
- Follow `BLOCK -> LIGHT -> DRESS` strictly, rendering a look sheet after each pass and running `hooks/post_blender_audit.py`.
|
|
11
|
+
- Use `incremental_render.py` so critic-loop fixes re-render only dirty shots.
|
|
12
|
+
- Keep 2D characters flat-shaded with thick dark outlines and floor contact shadows (`Z = 0.001`).
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: visual-qa-critic
|
|
3
|
+
description: Independent visual critic running 1-fps contact sheets, frame-jump audits, close-up checks, and the fix-3-worst loop.
|
|
4
|
+
tools: [run_blender_headless, contact_sheet, read, write]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
You are the ruthless QA gate before the user sees any cut.
|
|
8
|
+
1. Run `tools/contact_sheet.py` at 1 fps on the stitched video.
|
|
9
|
+
2. For motion transitions or suspect cuts, run targeted frame-jump checks:
|
|
10
|
+
> Render stills at <f1, f2, f3, f4> and a preview of <start-end>. Check in-between frames for jumps. Report what changed and the output files.
|
|
11
|
+
3. Verify zero banned elements (gradient titles, corner labels, timecodes, frame borders, missing contact shadows, unsourced claims).
|
|
12
|
+
4. Output a timestamped issue list (`[MM:SS / frame #] [P0|P1|P2]`), pick the **3 worst**, return an actionable fix ticket, and repeat until clean.
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// b3-blender-studio CLI — no dependencies.
|
|
3
|
+
import { spawnSync } from "node:child_process";
|
|
4
|
+
import { existsSync, readdirSync, readFileSync, statSync } from "node:fs";
|
|
5
|
+
import { delimiter, dirname, join, resolve } from "node:path";
|
|
6
|
+
import { fileURLToPath } from "node:url";
|
|
7
|
+
|
|
8
|
+
const PKG_ROOT = resolve(dirname(fileURLToPath(import.meta.url)), "..");
|
|
9
|
+
const IS_WIN = process.platform === "win32";
|
|
10
|
+
|
|
11
|
+
function packageVersion() {
|
|
12
|
+
try {
|
|
13
|
+
return JSON.parse(readFileSync(join(PKG_ROOT, "package.json"), "utf8")).version || "unknown";
|
|
14
|
+
} catch {
|
|
15
|
+
return "unknown";
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function isFile(p) {
|
|
20
|
+
try { return statSync(p).isFile(); } catch { return false; }
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function isExecutable(p) {
|
|
24
|
+
if (!isFile(p)) return false;
|
|
25
|
+
if (IS_WIN) return true;
|
|
26
|
+
try { return (statSync(p).mode & 0o111) !== 0; } catch { return false; }
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function findOnPath(names) {
|
|
30
|
+
const dirs = (process.env.PATH || "").split(delimiter).filter(Boolean);
|
|
31
|
+
const exts = IS_WIN ? (process.env.PATHEXT || ".EXE;.CMD;.BAT").split(";") : [""];
|
|
32
|
+
for (const dir of dirs) {
|
|
33
|
+
for (const name of names) {
|
|
34
|
+
for (const ext of exts) {
|
|
35
|
+
const cand = join(dir, name + (name.toLowerCase().endsWith(ext.toLowerCase()) ? "" : ext));
|
|
36
|
+
if (isExecutable(cand)) return cand;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function versionOf(name) {
|
|
44
|
+
const m = /(\d+)\.(\d+)/.exec(name);
|
|
45
|
+
return m ? Number(m[1]) * 100 + Number(m[2]) : 0;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const MIN_BLENDER = 405; // the plugin needs Blender 4.5 LTS or 5.2+
|
|
49
|
+
|
|
50
|
+
function findBlender() {
|
|
51
|
+
const envBin = process.env.BLENDER_BIN;
|
|
52
|
+
if (envBin && isExecutable(envBin)) return envBin;
|
|
53
|
+
const onPath = findOnPath(IS_WIN ? ["blender", "blender.exe"] : ["blender", "Blender"]);
|
|
54
|
+
if (onPath) return onPath;
|
|
55
|
+
const candidates = [];
|
|
56
|
+
if (process.platform === "darwin") {
|
|
57
|
+
candidates.push("/Applications/Blender.app/Contents/MacOS/Blender");
|
|
58
|
+
}
|
|
59
|
+
if (IS_WIN) {
|
|
60
|
+
const pf = process.env["ProgramFiles"] || "C:\\Program Files";
|
|
61
|
+
const base = join(pf, "Blender Foundation");
|
|
62
|
+
candidates.push(join(base, "blender.exe"));
|
|
63
|
+
try {
|
|
64
|
+
// Newest install first: "Blender 4.5" must win over "Blender 3.6".
|
|
65
|
+
const dirs = readdirSync(base).filter((e) => e.toLowerCase().startsWith("blender"));
|
|
66
|
+
dirs.sort((a, b) => versionOf(b) - versionOf(a));
|
|
67
|
+
for (const entry of dirs) candidates.push(join(base, entry, "blender.exe"));
|
|
68
|
+
} catch { /* base dir missing */ }
|
|
69
|
+
} else if (process.platform !== "darwin") {
|
|
70
|
+
candidates.push("/usr/bin/blender", "/usr/local/bin/blender", "/opt/blender/blender", "/snap/bin/blender");
|
|
71
|
+
}
|
|
72
|
+
for (const c of candidates) if (isExecutable(c)) return c;
|
|
73
|
+
return null;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function tryVersion(cmd, args) {
|
|
77
|
+
try {
|
|
78
|
+
const r = spawnSync(cmd, args, { encoding: "utf8", timeout: 15000 });
|
|
79
|
+
return r.status === 0 && /Python 3/.test((r.stdout || "") + (r.stderr || "")) ? cmd : null;
|
|
80
|
+
} catch {
|
|
81
|
+
return null;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function findPython() {
|
|
86
|
+
const candidates = IS_WIN
|
|
87
|
+
? [["python3", []], ["python", []], ["py", ["-3"]], ["python3.exe", []], ["python.exe", []]]
|
|
88
|
+
: [["python3", []], ["python", []], ["py", ["-3"]]];
|
|
89
|
+
for (const [cmd, pre] of candidates) {
|
|
90
|
+
// No PATH pre-check: Windows Store aliases (python.exe) cannot be stat'ed by Node but do run.
|
|
91
|
+
if (tryVersion(cmd, [...pre, "--version"])) return { cmd, pre };
|
|
92
|
+
}
|
|
93
|
+
return null;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function report(label, found) {
|
|
97
|
+
console.log(`${found ? "OK" : "MISSING"} ${label}${found ? ` (${found})` : ""}`);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
function doctor() {
|
|
101
|
+
const blender = findBlender();
|
|
102
|
+
const python = findPython();
|
|
103
|
+
const ffmpeg = findOnPath(IS_WIN ? ["ffmpeg", "ffmpeg.exe"] : ["ffmpeg"]);
|
|
104
|
+
const ffprobe = findOnPath(IS_WIN ? ["ffprobe", "ffprobe.exe"] : ["ffprobe"]);
|
|
105
|
+
report("blender", blender);
|
|
106
|
+
if (blender && versionOf(blender) && versionOf(blender) < MIN_BLENDER) {
|
|
107
|
+
console.log("WARN blender is older than 4.5; the plugin needs Blender 4.5 LTS or 5.2+ (set BLENDER_BIN)");
|
|
108
|
+
}
|
|
109
|
+
report("python", python ? python.cmd + (python.pre.length ? " " + python.pre.join(" ") : "") : null);
|
|
110
|
+
report("ffmpeg", ffmpeg);
|
|
111
|
+
report("ffprobe", ffprobe);
|
|
112
|
+
const ok = Boolean(blender) && Boolean(python);
|
|
113
|
+
process.exit(ok ? 0 : 1);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
function install(rest) {
|
|
117
|
+
const python = findPython();
|
|
118
|
+
if (!python) {
|
|
119
|
+
console.error("MISSING python: no python3, python or 'py -3' found on PATH");
|
|
120
|
+
process.exit(1);
|
|
121
|
+
}
|
|
122
|
+
const script = join(PKG_ROOT, "install.py");
|
|
123
|
+
if (!isFile(script)) {
|
|
124
|
+
console.error(`install.py not found at ${script}`);
|
|
125
|
+
process.exit(1);
|
|
126
|
+
}
|
|
127
|
+
const r = spawnSync(python.cmd, [...python.pre, script, ...rest], { cwd: PKG_ROOT, stdio: "inherit" });
|
|
128
|
+
process.exit(r.status === null ? 1 : r.status);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
const HELP = `b3-blender-studio ${packageVersion()}
|
|
132
|
+
|
|
133
|
+
Usage: b3-blender-studio <command> [args]
|
|
134
|
+
|
|
135
|
+
Commands:
|
|
136
|
+
doctor Check blender, python, ffmpeg, ffprobe; OK/MISSING per tool;
|
|
137
|
+
exit 1 if blender or python is missing
|
|
138
|
+
install [args...] Run 'python install.py' with the remaining args, cwd = package root
|
|
139
|
+
(python3, python or 'py -3', whichever works)
|
|
140
|
+
path Print the package root
|
|
141
|
+
--version Print the version
|
|
142
|
+
--help Show this help
|
|
143
|
+
`;
|
|
144
|
+
|
|
145
|
+
const [cmd, ...rest] = process.argv.slice(2);
|
|
146
|
+
switch (cmd) {
|
|
147
|
+
case "doctor": doctor(); break;
|
|
148
|
+
case "install": install(rest); break;
|
|
149
|
+
case "path": console.log(PKG_ROOT); break;
|
|
150
|
+
case "--version": case "-v": case "version": console.log(packageVersion()); break;
|
|
151
|
+
case "--help": case "-h": case "help": case undefined: process.stdout.write(HELP); break;
|
|
152
|
+
default:
|
|
153
|
+
console.error(`unknown command: ${cmd}\n`);
|
|
154
|
+
process.stdout.write(HELP);
|
|
155
|
+
process.exit(1);
|
|
156
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Bootstrap upstream repositories from upstreams.json (Python 3.9+, stdlib only)."""
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
import argparse
|
|
5
|
+
import json
|
|
6
|
+
import os
|
|
7
|
+
import subprocess
|
|
8
|
+
import sys
|
|
9
|
+
from pathlib import Path, PurePosixPath
|
|
10
|
+
|
|
11
|
+
PLUGIN_DIR = Path(__file__).resolve().parent
|
|
12
|
+
MANIFEST = PLUGIN_DIR / "upstreams.json"
|
|
13
|
+
DEFAULT_TIERS = ["core_skills", "blender_addons_and_libs"]
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def parse_args(argv):
|
|
17
|
+
parser = argparse.ArgumentParser(description="Clone upstream repositories listed in upstreams.json.")
|
|
18
|
+
parser.add_argument("--tiers", nargs="+", default=list(DEFAULT_TIERS), metavar="TIER")
|
|
19
|
+
parser.add_argument("--region", default=os.environ.get("B3_REGION", "EU"))
|
|
20
|
+
parser.add_argument("--dry-run", action="store_true", help="Print planned git commands; clone nothing.")
|
|
21
|
+
return parser.parse_args(argv)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def main(argv=None):
|
|
25
|
+
args = parse_args(argv)
|
|
26
|
+
region = args.region.upper()
|
|
27
|
+
|
|
28
|
+
data = json.loads(MANIFEST.read_text(encoding="utf-8"))
|
|
29
|
+
tiers = data.get("tiers", {})
|
|
30
|
+
|
|
31
|
+
print(
|
|
32
|
+
"[B3 Blender Studio] Bootstrapping upstream repos "
|
|
33
|
+
"(region={}, tiers={}{})".format(region, " ".join(args.tiers), ", dry-run" if args.dry_run else "")
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
cloned = 0
|
|
37
|
+
skipped = 0
|
|
38
|
+
|
|
39
|
+
for tier_name in args.tiers:
|
|
40
|
+
entries = tiers.get(tier_name)
|
|
41
|
+
if entries is None:
|
|
42
|
+
print("WARNING: Unknown tier '{}', skipping.".format(tier_name))
|
|
43
|
+
continue
|
|
44
|
+
|
|
45
|
+
print("\n=== Tier: {} ===".format(tier_name))
|
|
46
|
+
for item in entries:
|
|
47
|
+
excluded = {r.upper() for r in item.get("excluded_regions", [])}
|
|
48
|
+
if region in excluded:
|
|
49
|
+
print("SKIP [LICENSE GUARD]: {} excluded for region={}".format(item["id"], region))
|
|
50
|
+
skipped += 1
|
|
51
|
+
continue
|
|
52
|
+
|
|
53
|
+
target = PLUGIN_DIR / PurePosixPath(item["target"].replace("\\", "/"))
|
|
54
|
+
if target.exists():
|
|
55
|
+
print("SKIP: {} -> {} (target exists)".format(item["id"], item["target"]))
|
|
56
|
+
skipped += 1
|
|
57
|
+
continue
|
|
58
|
+
|
|
59
|
+
cmd = ["git", "clone", "--depth", "1", item["repo"], str(target)]
|
|
60
|
+
if args.dry_run:
|
|
61
|
+
print("DRY-RUN: " + " ".join(cmd))
|
|
62
|
+
cloned += 1
|
|
63
|
+
continue
|
|
64
|
+
|
|
65
|
+
target.parent.mkdir(parents=True, exist_ok=True)
|
|
66
|
+
print("CLONE: {} -> {}".format(item["id"], item["target"]))
|
|
67
|
+
subprocess.run(cmd, check=True)
|
|
68
|
+
cloned += 1
|
|
69
|
+
|
|
70
|
+
if args.dry_run:
|
|
71
|
+
print("\nSummary: planned={}, skipped={}".format(cloned, skipped))
|
|
72
|
+
else:
|
|
73
|
+
print("\nSummary: cloned={}, skipped={}".format(cloned, skipped))
|
|
74
|
+
return 0
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
if __name__ == "__main__":
|
|
78
|
+
sys.exit(main())
|