live kitbash, kitbash_assembly: the rows the host must load are the action table's, read from brokkr_actions.json

Both suites listed the kitbash rows by hand, ending at ribs, and failed once shell added a row.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-12-02 12:10:30 +01:00
commit dddef79d8d
3 changed files with 8 additions and 5 deletions

View file

@ -49,6 +49,8 @@ target.reload_host_actions()
R = {"blender": bpy.app.version_string, "checks": [], "hostErrors": target.host_actions()[1],
"hostRows": [row["name"] for row in target.host_actions()[0]]}
COUNT = [0]
# the rows the add-on's action table names, in its order: what the host must load, whatever rows the table grows
TABLE = [row["name"] for row in json.loads((SURFACE / "brokkr_kitbash" / "brokkr_actions.json").read_text(encoding="utf-8"))["actions"]]
def check(name, ok, detail=None):
@ -74,8 +76,7 @@ def extent(obj, axis=2):
check("the kitbash rows load as host actions with no errors", not R["hostErrors"]
and [r for r in R["hostRows"] if r.startswith("brokkr_kitbash.")] == [f"brokkr_kitbash.{name}" for name in (
"place_part", "set_params", "describe", "report", "attach", "detach", "roll", "aim", "reach", "close", "boolean", "cut", "cut_many", "apply", "ribs")], [R["hostErrors"], R["hostRows"]])
and [r for r in R["hostRows"] if r.startswith("brokkr_kitbash.")] == TABLE != [], [R["hostErrors"], R["hostRows"]])
# --- describe ---------------------------------------------------------------------------------------------------------
kit = core.load_kit("mechanical")

View file

@ -420,7 +420,8 @@
"brokkr_kitbash.cut",
"brokkr_kitbash.cut_many",
"brokkr_kitbash.apply",
"brokkr_kitbash.ribs"
"brokkr_kitbash.ribs",
"brokkr_kitbash.shell"
],
"placed": {
"nozzle": {

View file

@ -59,6 +59,8 @@ target.configure_action_dirs("", str(WORK))
target.reload_host_actions()
R = {"blender": bpy.app.version_string, "checks": [], "hostErrors": target.host_actions()[1], "readings": {}}
COUNT = [0]
# the rows the add-on's action table names, in its order: what the host must load, whatever rows the table grows
TABLE = [row["name"] for row in json.loads((SURFACE / "brokkr_kitbash" / "brokkr_actions.json").read_text(encoding="utf-8"))["actions"]]
kit = core.load_kit("mechanical")
# Metres (or a difference of unit vectors) between where a seated socket is and where its mate puts it, read from
# the two world matrices. Shipped worst 1.5e-07 (float32 matrices, parts a few metres from the origin); least
@ -176,8 +178,7 @@ def evaluated(obj):
rows = [row["name"] for row in target.host_actions()[0] if row["name"].startswith("brokkr_kitbash.")]
check("the kitbash rows load as host actions with no errors", not R["hostErrors"] and rows == [f"brokkr_kitbash.{n}" for n in (
"place_part", "set_params", "describe", "report", "attach", "detach", "roll", "aim", "reach", "close", "boolean", "cut", "cut_many", "apply", "ribs")], [R["hostErrors"], rows])
check("the kitbash rows load as host actions with no errors", not R["hostErrors"] and rows == TABLE != [], [R["hostErrors"], rows])
# --- attach -------------------------------------------------------------------------------------------------------------
tank = place("Tank", "tank", location=[1.0, 2.0, 3.0], rotation=[0.3, -0.2, 0.5]) # port size 0.088