Skip to content

armgit / raea

Public Imported from GitHub
0

Render Anything Engine: tell your AI what to make. Videos, motion graphics, 3D and games as React and TypeScript, rendered on your own GPU. Rust + Bevy, macOS, Linux and Windows.

blender-godot: L1's repo-wide checks (licences, dupes, taxonomy, the CLI reference)

shinyobjectz32fdfe0863d5
diff --git a/LICENSES/zeroize_derive-1.5.0/LICENSE-APACHE b/LICENSES/zeroize_derive-1.5.0/LICENSE-APACHE
deleted file mode 100644
index d6456956..00000000
--- a/LICENSES/zeroize_derive-1.5.0/LICENSE-APACHE
+++ /dev/null
@@ -1,202 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
diff --git a/LICENSES/zeroize_derive-1.5.0/LICENSE-MIT b/LICENSES/zeroize_derive-1.5.0/LICENSE-MIT
deleted file mode 100644
index f9d910e2..00000000
--- a/LICENSES/zeroize_derive-1.5.0/LICENSE-MIT
+++ /dev/null
@@ -1,25 +0,0 @@
-Copyright (c) 2019-2026 The RustCrypto Project Developers
-
-Permission is hereby granted, free of charge, to any
-person obtaining a copy of this software and associated
-documentation files (the "Software"), to deal in the
-Software without restriction, including without
-limitation the rights to use, copy, modify, merge,
-publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software
-is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice
-shall be included in all copies or substantial portions
-of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
-ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
-TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
-PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
-SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
-IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-DEALINGS IN THE SOFTWARE.
diff --git a/NOTICE b/NOTICE
index 563505e1..8368c222 100644
--- a/NOTICE
+++ b/NOTICE
@@ -428,7 +428,6 @@ LICENSES/<crate>-<version>/.
zbus 5.19.0: MIT
zbus 6.2.1: MIT
zcheapstr 1.1.0: MIT
- zeroize_derive 1.5.0: Apache-2.0 OR MIT
zruntime 0.2.2: MIT
zstd-safe 7.4.0: BSD-3-Clause
zstd-sys 2.1.2+zstd.1.5.7: BSD-3-Clause
diff --git a/apps/engines/src/godot.rs b/apps/engines/src/godot.rs
index afd15532..878c9985 100644
--- a/apps/engines/src/godot.rs
+++ b/apps/engines/src/godot.rs
@@ -6,6 +6,8 @@
use std::path::{Path, PathBuf};
use std::process::Command;
+use raea_app_tools::blender::own_dir;
+
type R<T> = Result<T, String>;
pub const USAGE: &str = "raea setup godot [--check] (download Godot 4.6.1 with GodotJS, its TypeScript bindings (MIT), into ~/.raea/tools/godot: JavaScriptCore on the Mac, QuickJS on Windows and Linux; checked against its pinned sha256)\n raea godot run SCRIPT.ts [--project DIR] [--window] [--movie FILE [--fps N]] [--size WxH] [--timeout S] [ARGS...] (a TypeScript script against Godot's whole API through raea/godot: its default export gets the SceneTree and ARGS, headless unless --window; --movie writes every frame Godot draws (NAME.png numbered, or .avi) at a fixed --fps, 30 unless given; the project is DIR, else the nearest project.godot above the script, else an empty one; Godot quits when it returns)\n raea godot types [DIR] (the project's own TypeScript types from GodotJS: Godot's API with its scenes, resources and input actions, into DIR/typings)\n raea godot open [DIR] (the Godot editor on the project, GodotJS's, to edit its scenes)";
@@ -32,14 +34,9 @@ fn pin() -> R<Pin> {
}
}
-/// Where raea keeps the Godot it downloads.
-fn own_dir() -> R<PathBuf> {
- Ok(raea_app_tools::agent_mcp::user_home()?.join(".raea/tools/godot"))
-}
-
/// The release a download in own_dir came from (raea.json beside it), so a moved pin downloads again.
fn own_release() -> Option<String> {
- let text = std::fs::read_to_string(own_dir().ok()?.join("raea.json")).ok()?;
+ let text = std::fs::read_to_string(own_dir("godot").ok()?.join("raea.json")).ok()?;
serde_json::from_str::<serde_json::Value>(&text).ok()?["release"].as_str().map(str::to_string)
}
@@ -50,7 +47,7 @@ pub fn find() -> Option<(PathBuf, &'static str)> {
if let Some(p) = configured.filter(|p| p.is_file()) {
return Some((p, "raea.godot in git config"));
}
- let own = own_dir().ok()?.join(pin().ok()?.program);
+ let own = own_dir("godot").ok()?.join(pin().ok()?.program);
own.is_file().then_some((own, "raea's download"))
}
@@ -69,7 +66,7 @@ fn version(bin: &Path) -> R<String> {
/// Downloads the pinned GodotJS editor into ~/.raea/tools/godot and returns its program.
fn download() -> R<(PathBuf, String)> {
let p = pin()?;
- let dir = own_dir()?;
+ let dir = own_dir("godot")?;
let tmp = dir.with_file_name("godot.download");
let _ = std::fs::remove_dir_all(&tmp);
std::fs::create_dir_all(&tmp).map_err(|e| format!("{}: {e}", tmp.display()))?;
@@ -156,7 +153,10 @@ fn types(args: &[String]) -> R<String> {
let tail: Vec<&str> = log.lines().rev().take(12).collect::<Vec<_>>().into_iter().rev().collect();
return Err(format!("GodotJS's codegen failed on {}:\n{}", dir.display(), tail.join("\n")));
}
- let n = std::fs::read_dir(dir.join("typings")).map(|d| d.flatten().filter(|e| e.path().to_string_lossy().ends_with(".d.ts")).count()).unwrap_or(0);
+ let mut n = 0;
+ for e in std::fs::read_dir(dir.join("typings")).into_iter().flatten().flatten() {
+ n += e.file_name().to_string_lossy().ends_with(".d.ts") as usize;
+ }
Ok(format!("APPLIED {n} typings files in {} (Godot's API with the project's scenes, resources and input actions); a tsconfig that includes them types `import ... from \"godot\"`", dir.join("typings").display()))
}
diff --git a/apps/engines/src/godot_run.rs b/apps/engines/src/godot_run.rs
index 1eaa9208..0d55413c 100644
--- a/apps/engines/src/godot_run.rs
+++ b/apps/engines/src/godot_run.rs
@@ -137,11 +137,11 @@ fn project_size(project_godot: &str) -> (u32, u32) {
if l.starts_with('[') {
display = l == "[display]";
} else if display {
- let num = |k: &str| l.strip_prefix(k).and_then(|v| v.trim().parse::<u32>().ok());
- if let Some(w) = num("window/size/viewport_width=") {
- size.0 = w;
- } else if let Some(h) = num("window/size/viewport_height=") {
- size.1 = h;
+ let Some((key, v)) = l.split_once('=') else { continue };
+ match (key.trim(), v.trim().parse::<u32>()) {
+ ("window/size/viewport_width", Ok(w)) => size.0 = w,
+ ("window/size/viewport_height", Ok(h)) => size.1 = h,
+ _ => {}
}
}
}
diff --git a/apps/tools/src/blender.rs b/apps/tools/src/blender.rs
index 5f3ce237..d5c908c2 100644
--- a/apps/tools/src/blender.rs
+++ b/apps/tools/src/blender.rs
@@ -13,14 +13,14 @@ pub const USAGE: &str = "raea setup blender [--check] [--download] (find Blend
/// ships a new LTS (blender.org/download/lts).
const LTS: &str = "5.2";
-/// Where raea keeps the Blender it downloads.
-fn own_dir() -> R<PathBuf> {
- Ok(crate::agent_mcp::user_home()?.join(".raea/tools/blender"))
+/// Where raea keeps a tool it downloads, ~/.raea/tools/NAME: Blender here, Godot in apps/engines.
+pub fn own_dir(name: &str) -> R<PathBuf> {
+ Ok(crate::agent_mcp::user_home()?.join(".raea/tools").join(name))
}
/// The Blender binary inside raea's own download, per platform.
fn own_binary() -> R<PathBuf> {
- let d = own_dir()?;
+ let d = own_dir("blender")?;
Ok(if cfg!(target_os = "macos") { d.join("Blender.app/Contents/MacOS/Blender") } else if cfg!(windows) { d.join("blender.exe") } else { d.join("blender") })
}
@@ -104,7 +104,7 @@ fn download() -> R<(PathBuf, String)> {
let listing = run(Command::new("curl").args(["-fsSL", &base]), "curl")?;
let v = newest(&listing).ok_or_else(|| format!("no Blender {LTS} release listed at {base}"))?;
let name = asset(&v)?;
- let dir = own_dir()?;
+ let dir = own_dir("blender")?;
let tmp = dir.with_file_name("blender.download");
let _ = std::fs::remove_dir_all(&tmp);
std::fs::create_dir_all(&tmp).map_err(|e| format!("{}: {e}", tmp.display()))?;
@@ -176,7 +176,7 @@ pub fn setup(args: &[String]) -> R<String> {
let fresh = args.iter().any(|a| a == "--download");
let (bin, from) = match find().filter(|_| !fresh) {
Some((b, f)) => (b, f.to_string()),
- None if check => return Ok(format!("CHECKED no Blender found (raea.blender, {}, PATH): raea setup blender downloads Blender {LTS} LTS", own_dir()?.display())),
+ None if check => return Ok(format!("CHECKED no Blender found (raea.blender, {}, PATH): raea setup blender downloads Blender {LTS} LTS", own_dir("blender")?.display())),
None => {
let (b, f) = download()?;
run(Command::new("git").args(["config", "--global", "raea.blender"]).arg(&b), "git config")?;
diff --git a/docs/manual/reference/cli/blender.md b/docs/manual/reference/cli/blender.md
index ad7ab7e3..1f8a1dff 100644
--- a/docs/manual/reference/cli/blender.md
+++ b/docs/manual/reference/cli/blender.md
@@ -2,7 +2,7 @@
title: "raea blender"
summary: "Run a Blender Python script headless, with raea's library of mesh scripts: convert, decimate, repair, split, bake, rig, cloth."
order: 104
-sources: ["apps/tools/src/blender.rs"]
+sources: ["apps/tools/src/blender.rs", "apps/engines/src/blender_ts.rs"]
---
`raea blender run` runs `blender --background --python SCRIPT.py -- ARGS` with the Blender [`raea setup
@@ -10,6 +10,10 @@ blender`](setup.md) found. A script named `blender/X.py` that the project doesn'
library first: `convert`, `decimate`, `repair`, `split`, `bake`, `rig` and `cloth`. The copy is the project's own
to change.
+A `.ts` script runs on raea's engine against a headless Blender instead, through `raea/blender`: Blender's whole
+Python API (bpy, bmesh, mathutils) typed. `FILE.blend` is opened first, the script reads ARGS as Python does, from
+`sys.argv` after `--`, and Blender quits when its default export returns. The guide is `raea guide bevy/blender`.
+
```sh
raea blender run blender/decimate.py -- model.glb 0.3 model-low.glb
raea blender run blender/repair.py -- scan.glb scan-fixed.glb
@@ -22,6 +26,7 @@ raea blender run blender/repair.py -- scan.glb scan-fixed.glb
```sh
raea setup blender [--check] [--download] (find Blender or download the LTS into ~/.raea/tools/blender, and install its MCP add-on)
raea blender run SCRIPT.py [ARGS...] (blender --background --python SCRIPT.py -- ARGS, headless; blender/X.py missing from the project is copied from the library: convert, decimate, repair, split, bake, rig, cloth)
+raea blender run SCRIPT.ts [FILE.blend] [ARGS...] (a TypeScript script against Blender's whole Python API through raea/blender: bpy, bmesh, mathutils, typed; a headless Blender, FILE.blend opened, quit when the script ends)
```
Headless: it needs nothing running and opens no window. Its arguments go to a parser of its own, whose forms are listed above.
diff --git a/docs/manual/reference/cli/godot.md b/docs/manual/reference/cli/godot.md
new file mode 100644
index 00000000..e44487f1
--- /dev/null
+++ b/docs/manual/reference/cli/godot.md
@@ -0,0 +1,31 @@
+---
+title: "raea godot"
+summary: "Run a TypeScript script against Godot's whole API in a headless Godot with GodotJS, record what it draws as frames, or open the editor on the project."
+order: 105
+sources: ["apps/engines/src/godot.rs", "apps/engines/src/godot_run.rs"]
+---
+
+`raea godot run` bundles SCRIPT.ts and runs it in the Godot that [`raea setup godot`](setup.md) downloaded: Godot
+4.6.1 with GodotJS, its TypeScript bindings. The script imports Godot's whole API, typed, from `raea/godot`. Its default
+export is either a function given the SceneTree and ARGS, or a `SceneTree` subclass that is Godot's main loop. Godot
+quits with 0 when the function returns, and with 1 when it or a callback throws.
+
+Godot runs headless unless `--window` is given. `--movie FILE` opens Godot's window too, since a headless Godot draws
+nothing, and records every frame it draws at a fixed `--fps`: `NAME.png` writes numbered PNGs, `NAME.avi` one video.
+`raea godot types` writes the project's own typings, and `raea godot open` opens GodotJS's editor on the project for the
+person. The guide is `raea guide bevy/godot`.
+
+<!-- generated:begin by tools/manual-ref/cli.ts from `raea help --json`; edit only the flag descriptions -->
+
+## Usage
+
+```sh
+raea setup godot [--check] (download Godot 4.6.1 with GodotJS, its TypeScript bindings (MIT), into ~/.raea/tools/godot: JavaScriptCore on the Mac, QuickJS on Windows and Linux; checked against its pinned sha256)
+raea godot run SCRIPT.ts [--project DIR] [--window] [--movie FILE [--fps N]] [--size WxH] [--timeout S] [ARGS...] (a TypeScript script against Godot's whole API through raea/godot: its default export gets the SceneTree and ARGS, headless unless --window; --movie writes every frame Godot draws (NAME.png numbered, or .avi) at a fixed --fps, 30 unless given; the project is DIR, else the nearest project.godot above the script, else an empty one; Godot quits when it returns)
+raea godot types [DIR] (the project's own TypeScript types from GodotJS: Godot's API with its scenes, resources and input actions, into DIR/typings)
+raea godot open [DIR] (the Godot editor on the project, GodotJS's, to edit its scenes)
+```
+
+Headless: it needs nothing running and opens no window. Its arguments go to a parser of its own, whose forms are listed above.
+
+<!-- generated:end -->
diff --git a/docs/manual/reference/cli/index.md b/docs/manual/reference/cli/index.md
index 69aa503c..e1acd307 100644
--- a/docs/manual/reference/cli/index.md
+++ b/docs/manual/reference/cli/index.md
@@ -100,13 +100,14 @@ Music read, foley and instruments made on this machine.
## Generate and 3D tools
-Generated media, physics bakes and Blender.
+Generated media, physics bakes, Blender and Godot.
| Verb | What it does |
| --- | --- |
| [`raea gen`](gen.md) | Generate images, video, music, sound, speech, 3D models and text through made.app, fal, Replicate, OpenRouter, Modal or ComfyUI. |
| [`raea physics`](physics.md) | Make the bakes <Physics> and <Goo> play: rigid bodies, soft goo, and parts cut out of a .glb. |
| [`raea blender`](blender.md) | Run a Blender Python script headless, with raea's library of mesh scripts: convert, decimate, repair, split, bake, rig, cloth. |
+| [`raea godot`](godot.md) | Run a TypeScript script against Godot's whole API in a headless Godot with GodotJS, record what it draws as frames, or open the editor on the project. |
## Agents and setup
diff --git a/docs/manual/reference/cli/setup.md b/docs/manual/reference/cli/setup.md
index f5da09d9..2a8cc025 100644
--- a/docs/manual/reference/cli/setup.md
+++ b/docs/manual/reference/cli/setup.md
@@ -19,6 +19,7 @@ raea setup blender
```sh
raea setup blender [--check] [--download] (find Blender or download the LTS into ~/.raea/tools/blender, and install its MCP add-on)
+raea setup godot [--check] (download Godot 4.6.1 with GodotJS, its TypeScript bindings (MIT), into ~/.raea/tools/godot: JavaScriptCore on the Mac, QuickJS on Windows and Linux; checked against its pinned sha256)
```
Headless: it needs nothing running and opens no window. Takes up to 1 argument besides its flags.
diff --git a/tools/manual-ref/cli.ts b/tools/manual-ref/cli.ts
index 5bb16752..a13804d6 100644
--- a/tools/manual-ref/cli.ts
+++ b/tools/manual-ref/cli.ts
@@ -30,13 +30,13 @@ const GROUPS: [string, string, string[]][] = [
["Check", "What's wrong before anyone watches it.", ["check", "judge", "findings", "scene", "world", "solid", "next", "doctor", "hook", "traces"]],
["Footage", "Takes, cuts and the camera, from your own media.", ["media", "cut", "frame", "track", "splat", "mezz", "neural"]],
["Sound", "Music read, foley and instruments made on this machine.", ["song", "sounds", "sao", "tokensynth", "setup-audio"]],
- ["Generate and 3D tools", "Generated media, physics bakes and Blender.", ["gen", "physics", "blender"]],
+ ["Generate and 3D tools", "Generated media, physics bakes, Blender and Godot.", ["gen", "physics", "blender", "godot"]],
["Agents and setup", "What an agent reads and shows the person, and the tools raea installs.", ["guide", "context", "notes", "show", "skill", "skills", "setup"]],
]
const groupOf = new Map(GROUPS.flatMap(([g, , vs]) => vs.map((v, i) => [v, { g, i }] as const)))
// a verb with its own parser lists its forms itself: that list is its usage
-const OWN_HELP: Record<string, string[]> = { media: ["media", "help"], gen: ["gen"], blender: ["blender"], physics: ["physics"] }
+const OWN_HELP: Record<string, string[]> = { media: ["media", "help"], gen: ["gen"], blender: ["blender"], godot: ["godot"], physics: ["physics"] }
function ownHelp(v: string): string {
return run(OWN_HELP[v] ?? [v]).replace(/^REFUSED\s+/, "").replace(/^usage:\s*/, "").split("\n").map((l) => l.replace(/^\s{7}(raea )/, "$1").trimEnd()).join("\n")
}
diff --git a/tools/taxonomy.sh b/tools/taxonomy.sh
index 7514c542..4aa15fee 100755
--- a/tools/taxonomy.sh
+++ b/tools/taxonomy.sh
@@ -81,9 +81,10 @@ done < "$tmp/listed"
n=$(wc -l < "$tmp/pascal"); a=$(wc -l < "$tmp/all")
# props named after the backend that draws them or the processor it runs on: the engine chooses where work runs
-# (S3b), so a prop names what it does, never the path
+# (S3b), so a prop names what it does, never the path. Another program's API typed as it is (sdk/blender/src/gen, Blender's
+# own names from its RNA: bpy.ops.render.opengl) is left out with the generated .gen.tsx
backend=$(grep -rnoE '^\s+(wgpu|metal|vulkan|opengl|webgl|webgpu|bevy|blitz|vello|skia|three|gpu|cpu|readback|software|hardware)([A-Z_][A-Za-z_]*)?\??:' \
- "$ROOT"/sdk/*/src --include='*.ts' --include='*.tsx' | grep -v '\.gen\.tsx' | sed "s|$ROOT/||; s/: *\$//" || true)
+ "$ROOT"/sdk/*/src --include='*.ts' --include='*.tsx' | grep -vE '\.gen\.tsx|/sdk/blender/src/gen/' | sed "s|$ROOT/||; s/: *\$//" || true)
if [ -n "$backend" ]; then
echo "taxonomy: props named after a backend or a processor (S3b: the engine chooses where work runs):"
echo "$backend" | sed 's/^/ /'