Complete M16 action select column parity
Some checks failed
M6 deployable RC / quick (push) Has been cancelled
M6 deployable RC / chromium (push) Has been cancelled
M6 deployable RC / release (push) Has been cancelled

This commit is contained in:
mes123456
2026-08-20 23:02:40 -04:00
parent 6a0b980d75
commit 7440b51394
16 changed files with 572 additions and 14 deletions

View File

@@ -9,10 +9,10 @@
| 字段 | 值 |
| --- | --- |
| 里程碑 | M16 Main、Mesh、Modifier、Sculpt |
| 当前任务 | `M16-GAP-00137` |
| parent manifest | `tests/golden/M16-GAP-00136/manifest.json` |
| 任务卡 | [`tasks/M16-GAP-00137.md`](tasks/M16-GAP-00137.md) |
| 专项验收 | `npm --prefix web run test:generated-gap -- --task M16-GAP-00137` |
| 当前任务 | `M16-GAP-00138` |
| parent manifest | `tests/golden/M16-GAP-00137/manifest.json` |
| 任务卡 | [`tasks/M16-GAP-00138.md`](tasks/M16-GAP-00138.md) |
| 专项验收 | `npm --prefix web run test:generated-gap -- --task M16-GAP-00138` |
领取前执行:

View File

@@ -0,0 +1,17 @@
# M16-GAP-00137 Status
status: done
task: action.select_column operator LOCAL_EXACT slice
updated: 2026-08-20 America/New_York
scope:
- Action Editor current-frame column selection on `object:WebGapSelectColumnObject`.
evidence:
- Blender desktop and WASM/Main expose matching three location channels with frame 3 selected.
- Save/reopen is exact; malformed Blend input is rejected without Main mutation.
- Fixture generation, desktop checker, npm comparator, direct comparator, context handoff and manifest hashing passed.
nextTask: `M16-GAP-00138`

View File

@@ -0,0 +1,37 @@
# M16-GAP-00137: operator:action.select_column LOCAL_EXACT slice
- task: M16-GAP-00137
- parent: M16-GAP-00136
- status: in_progress
- gap: operator:action.select_column
- ownerFamily: OPERATOR
- targetImplementationClass: LOCAL_EXACT
## 目标
Make the same minimal fixture produce observable operator:action.select_column data in Blender desktop and WASM/Main, with save/reopen stability. Change only this gap; do not expand to other data-blocks, editors, or browsers.
## 输入与范围
- Fixture: `tests/files/web/generated/M16-GAP-00137-operator-action.select_column.blend`
- Generator: `tools/web/generated/M16-GAP-00137.py`
- Production: `blender-5.2.0/source/blender/web_engine/web_engine_blend_reader.cpp`
- Checker: `tools/web/check-generated-gap.mjs`
- Do: field read, desktop/WASM comparison, save/reopen, structured report.
- Do not: other gaps, Firefox/WebKit, or full editor behavior.
## 验收
build_blender_5.2.0/bin/blender -b --factory-startup --python tools/web/generated/M16-GAP-00137.py -- tests/files/web/generated/M16-GAP-00137-operator-action.select_column.blend
npm --prefix web run test:generated-gap -- --task M16-GAP-00137
node tools/web/check-generated-gap.mjs --task M16-GAP-00137
Malformed/unsupported, cancellation, duplicate, over-budget, or hash-drift cases must keep in_progress; they must not change Main revision or advance nextTask.
## 交付与回滚
- Reports: `tests/golden/M16-GAP-00137/`
- Status: `docs/status/M16-GAP-00137.md`
- Manifest: `tests/golden/M16-GAP-00137/manifest.json`
- Handoff: `node tools/web/check-task-context.mjs --task M16-GAP-00137 --write`
- Rollback: remove this task production entry, fixture, tests, reports, manifest, status, and context; restore the parent as queue tail without rewriting parent evidence.

View File

@@ -0,0 +1,37 @@
# M16-GAP-00138: operator:action.select_lasso LOCAL_EXACT slice
- task: M16-GAP-00138
- parent: M16-GAP-00137
- status: in_progress
- gap: operator:action.select_lasso
- ownerFamily: OPERATOR
- targetImplementationClass: LOCAL_EXACT
## 目标
Make the same minimal fixture produce observable operator:action.select_lasso data in Blender desktop and WASM/Main, with save/reopen stability. Change only this gap; do not expand to other data-blocks, editors, or browsers.
## 输入与范围
- Fixture: `tests/files/web/generated/M16-GAP-00138-operator-action.select_lasso.blend`
- Generator: `tools/web/generated/M16-GAP-00138.py`
- Production: `blender-5.2.0/source/blender/web_engine/web_engine_blend_reader.cpp`
- Checker: `tools/web/check-generated-gap.mjs`
- Do: field read, desktop/WASM comparison, save/reopen, structured report.
- Do not: other gaps, Firefox/WebKit, or full editor behavior.
## 验收
build_blender_5.2.0/bin/blender -b --factory-startup --python tools/web/generated/M16-GAP-00138.py -- tests/files/web/generated/M16-GAP-00138-operator-action.select_lasso.blend
npm --prefix web run test:generated-gap -- --task M16-GAP-00138
node tools/web/check-generated-gap.mjs --task M16-GAP-00138
Malformed/unsupported, cancellation, duplicate, over-budget, or hash-drift cases must keep in_progress; they must not change Main revision or advance nextTask.
## 交付与回滚
- Reports: `tests/golden/M16-GAP-00138/`
- Status: `docs/status/M16-GAP-00138.md`
- Manifest: `tests/golden/M16-GAP-00138/manifest.json`
- Handoff: `node tools/web/check-task-context.mjs --task M16-GAP-00138 --write`
- Rollback: remove this task production entry, fixture, tests, reports, manifest, status, and context; restore the parent as queue tail without rewriting parent evidence.

View File

@@ -134,5 +134,6 @@
"operator:action.select_all",
"operator:action.select_box",
"operator:action.select_by_type",
"operator:action.select_circle"
"operator:action.select_circle",
"operator:action.select_column"
]

View File

@@ -13,14 +13,14 @@
},
"completions": {
"path": "tests/golden/M15-03A/completed-gap-tasks.json",
"sha256": "65fc0455aaa0cde333537b6e6d1d5de022ad4fab161837ca18d47a8272ef25c8"
"sha256": "bd0da816e54864a855ec14d14eefc2423823c8002e2f15776807a2c7f9e9175d"
}
},
"summary": {
"taskCount": 6900,
"active": 1,
"pending": 6763,
"completed": 136,
"pending": 6762,
"completed": 137,
"blocked": 0,
"byWave": {
"M16": 2667,
@@ -3166,7 +3166,7 @@
"gapId": "operator:action.select_column",
"ownerFamily": "OPERATOR",
"sourceTask": "M15-01B",
"state": "active",
"state": "completed",
"dependencies": [],
"targetImplementationClass": "LOCAL_EXACT",
"fixture": {
@@ -3189,7 +3189,7 @@
"gapId": "operator:action.select_lasso",
"ownerFamily": "OPERATOR",
"sourceTask": "M15-01B",
"state": "pending",
"state": "active",
"dependencies": [],
"targetImplementationClass": "LOCAL_EXACT",
"fixture": {
@@ -158734,7 +158734,7 @@
]
}
],
"firstTask": "M16-GAP-00137",
"firstTask": "M16-GAP-00138",
"closureGate": "M15-03E",
"nextTask": "M15-03B"
}

View File

@@ -134,8 +134,8 @@
{"id":"M16-GAP-00134","gapId":"operator:action.select_box","ownerFamily":"OPERATOR","sourceTask":"M15-01B","state":"completed","targetImplementationClass":"LOCAL_EXACT"}
{"id":"M16-GAP-00135","gapId":"operator:action.select_by_type","ownerFamily":"OPERATOR","sourceTask":"M15-01B","state":"completed","targetImplementationClass":"LOCAL_EXACT"}
{"id":"M16-GAP-00136","gapId":"operator:action.select_circle","ownerFamily":"OPERATOR","sourceTask":"M15-01B","state":"completed","targetImplementationClass":"LOCAL_EXACT"}
{"id":"M16-GAP-00137","gapId":"operator:action.select_column","ownerFamily":"OPERATOR","sourceTask":"M15-01B","state":"active","targetImplementationClass":"LOCAL_EXACT"}
{"id":"M16-GAP-00138","gapId":"operator:action.select_lasso","ownerFamily":"OPERATOR","sourceTask":"M15-01B","state":"pending","targetImplementationClass":"LOCAL_EXACT"}
{"id":"M16-GAP-00137","gapId":"operator:action.select_column","ownerFamily":"OPERATOR","sourceTask":"M15-01B","state":"completed","targetImplementationClass":"LOCAL_EXACT"}
{"id":"M16-GAP-00138","gapId":"operator:action.select_lasso","ownerFamily":"OPERATOR","sourceTask":"M15-01B","state":"active","targetImplementationClass":"LOCAL_EXACT"}
{"id":"M16-GAP-00139","gapId":"operator:action.select_leftright","ownerFamily":"OPERATOR","sourceTask":"M15-01B","state":"pending","targetImplementationClass":"LOCAL_EXACT"}
{"id":"M16-GAP-00140","gapId":"operator:action.select_less","ownerFamily":"OPERATOR","sourceTask":"M15-01B","state":"pending","targetImplementationClass":"LOCAL_EXACT"}
{"id":"M16-GAP-00141","gapId":"operator:action.select_linked","ownerFamily":"OPERATOR","sourceTask":"M15-01B","state":"pending","targetImplementationClass":"LOCAL_EXACT"}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,57 @@
{
"action": {
"channels": [
{
"frames": [
1.0,
3.0,
5.0
],
"index": 0,
"path": "location",
"selected": [
false,
true,
false
]
},
{
"frames": [
1.0,
3.0,
5.0
],
"index": 1,
"path": "location",
"selected": [
false,
true,
false
]
},
{
"frames": [
1.0,
3.0,
5.0
],
"index": 2,
"path": "location",
"selected": [
false,
true,
false
]
}
],
"name": "WebGapSelectColumnObjectAction"
},
"blenderVersion": "5.2.0 LTS",
"fixture": "/home/mes123456/workinf_Blender_Wasm/tests/files/web/generated/M16-GAP-00137-operator-action.select_column.blend",
"fixtureSha256": "01b13092985f0c672a5ac639ce1e556caf8c405ed3574249b0c4680aedecdc27",
"operation": "ACTION_SELECT_COLUMN_DESKTOP",
"saveReopen": "EXACT",
"schemaVersion": 1,
"selectedFrame": 3,
"task": "M16-GAP-00137"
}

View File

@@ -0,0 +1,35 @@
{
"schemaVersion": 1,
"task": "M16-GAP-00137",
"operation": "ACTION_SELECT_COLUMN_LOCAL_EXACT",
"fixture": {
"path": "tests/files/web/generated/M16-GAP-00137-operator-action.select_column.blend",
"sha256": "01b13092985f0c672a5ac639ce1e556caf8c405ed3574249b0c4680aedecdc27"
},
"desktop": {
"status": "EXACT",
"report": "tests/golden/M16-GAP-00137/action-select-column-desktop-report.json",
"saveReopen": "EXACT"
},
"wasm": {
"status": "EXACT",
"actionId": "action:WebGapSelectColumnObjectAction:object:WebGapSelectColumnObject",
"selectedFrame": 3,
"selectedPerChannel": [
[
3
],
[
3
],
[
3
]
]
},
"saveReopen": "EXACT",
"negative": {
"malformedBlend": "REJECTED_WITHOUT_MAIN_MUTATION"
},
"nextTask": "M16-GAP-00138"
}

View File

@@ -0,0 +1,25 @@
{
"schemaVersion": 1,
"task": "M16-GAP-00137",
"parentTask": "M16-GAP-00136",
"enablingTask": false,
"parityStateChange": true,
"runtime": "BLENDER_5_2_LOCAL_EXACT",
"operation": "ACTION_SELECT_COLUMN_LOCAL_EXACT",
"status": "done",
"artifacts": {
"parentManifest": {"path": "tests/golden/M16-GAP-00136/manifest.json", "sha256": "4953a140158fde453aa89670b3281f756fdc65a70bfc17099c891cec9d70197f"},
"fixture": {"path": "tests/files/web/generated/M16-GAP-00137-operator-action.select_column.blend", "sha256": "01b13092985f0c672a5ac639ce1e556caf8c405ed3574249b0c4680aedecdc27"},
"generator": {"path": "tools/web/generated/M16-GAP-00137.py", "sha256": "8743db045d9df0505233a88785b92b0fadb2551788b909047d1aa2376e8e9516"},
"desktopChecker": {"path": "tools/web/check-action-select-column-desktop.py", "sha256": "7e4c5fcef9b85239b3f561db2736eaa80de819d042b8caa3eaaf7fb3230cc189"},
"webChecker": {"path": "tools/web/check-generated-gap.mjs", "sha256": "a2461a33a4a31ac6a1dc57c5066edd596798421a0d3ec741404fa0344bec5d80"},
"reader": {"path": "blender-5.2.0/source/blender/web_engine/web_engine_blend_reader.cpp", "sha256": "bd0c21440ef1af91dbb861687f8b8637a58656a4965e59cc67fc16b495cf437e"},
"wasm": {"path": "web/app/src/vendor/blender/web_engine.wasm", "sha256": "82d423ed9aff4df29ea7d2a18788365f9369ce6bfd9365dbd31044ba88555359"},
"wasmPublic": {"path": "web/app/public/vendor/blender/web_engine.wasm", "sha256": "82d423ed9aff4df29ea7d2a18788365f9369ce6bfd9365dbd31044ba88555359"},
"wasmJs": {"path": "web/app/src/vendor/blender/web_engine.js", "sha256": "9c831d0351ac9d0714cce3b1da748cba416ced3086e3c59595cf24ac4da459ed"},
"desktopReport": {"path": "tests/golden/M16-GAP-00137/action-select-column-desktop-report.json", "sha256": "71916a53336e89a4be1d07e1fec163b215661d1554d86a1446a79dad0411ba88"},
"webReport": {"path": "tests/golden/M16-GAP-00137/action-select-column-local-exact-report.json", "sha256": "c9747457cd2746e4bcd27c10c87564e92f74664c6d59129222e826b17ace7815"},
"taskContext": {"path": "tests/golden/M16-GAP-00137/task-context.json", "sha256": "847fe153913ff003ef06c7f17c952667a603b31f95a5bc1a9a06fb8a077c6e6b"}
},
"nextTask": "M16-GAP-00138"
}

View File

@@ -0,0 +1,185 @@
{
"schemaVersion": 1,
"task": "M16-GAP-00137",
"parentTask": "M16-GAP-00136",
"status": "in_progress",
"goal": "Make the same minimal fixture produce observable operator:action.select_column data in Blender desktop and WASM/Main, with save/reopen stability. Change only this gap; do not expand to other data-blocks, editors, or browsers.",
"scope": {
"gap": "operator:action.select_column",
"ownerFamily": "OPERATOR",
"implementationClass": "LOCAL_EXACT"
},
"commands": [
"build_blender_5.2.0/bin/blender -b --factory-startup --python tools/web/generated/M16-GAP-00137.py -- tests/files/web/generated/M16-GAP-00137-operator-action.select_column.blend",
"npm --prefix web run test:generated-gap -- --task M16-GAP-00137",
"node tools/web/check-generated-gap.mjs --task M16-GAP-00137"
],
"inputPaths": [
"tools/web/generated/M16-GAP-00137.py"
],
"inputSelection": {
"schemaVersion": 1,
"limits": {
"maxFiles": 12,
"evidenceBytes": 8192,
"contextRemainingBytes": 3183,
"contextRemainingTokens": 794
},
"source": {
"bytes": 6721,
"tokens": 1682
},
"selected": [
{
"path": "tools/web/generated/M16-GAP-00137.py",
"bytes": 2267,
"tokens": 567
}
],
"excluded": [
{
"path": "tests/files/web/generated/M16-GAP-00137-operator-action.select_column.blend",
"bytes": 86891,
"reason": "EVIDENCE_BYTE_BUDGET"
},
{
"path": "blender-5.2.0/source/blender/web_engine/web_engine_blend_reader.cpp",
"bytes": 224767,
"reason": "EVIDENCE_BYTE_BUDGET"
},
{
"path": "tools/web/check-generated-gap.mjs",
"bytes": 229962,
"reason": "EVIDENCE_BYTE_BUDGET"
},
{
"path": "tests/golden/M16-GAP-00137/",
"bytes": null,
"reason": "GENERATED_EVIDENCE_OUTPUT"
},
{
"path": "docs/status/M16-GAP-00137.md",
"bytes": null,
"reason": "GENERATED_EVIDENCE_OUTPUT"
},
{
"path": "tests/golden/M16-GAP-00137/manifest.json",
"bytes": null,
"reason": "GENERATED_EVIDENCE_OUTPUT"
}
],
"totals": {
"files": 1,
"bytes": 2267,
"tokens": 567
}
},
"exitCriteria": [
"desktop fixture evidence exists",
"WASM uses the same fixture",
"comparator passes",
"save/reopen preserves Main",
"manifest hashes all artifacts"
],
"nextTask": "M16-GAP-00138",
"sourceDocuments": {
"queue": "docs/EXECUTION_QUEUE.md",
"taskCard": "docs/tasks/M16-GAP-00137.md",
"taskIndex": "tests/golden/M15-03A/task-index.json",
"parentManifest": "tests/golden/M16-GAP-00136/manifest.json",
"parentStatus": "docs/status/M16-GAP-00136.md"
},
"readPolicy": {
"required": [
"docs/EXECUTION_QUEUE.md",
"docs/tasks/M16-GAP-00137.md",
"tests/golden/M16-GAP-00136/manifest.json",
"docs/status/M16-GAP-00136.md"
],
"machineOnly": [
"tests/golden/M15-03A/task-index.json",
"tests/golden/M15-03A/task-catalog.jsonl"
],
"optionalByNeed": [
"docs/WEB_BLENDER_MODELER_V1_SCOPE.md",
"任务卡列出的精确协议/生产路径",
"任务卡明确命名的长期计划小节"
],
"forbiddenByDefault": [
"完整 CURRENT_EXECUTION_PLAN.md",
"完整 PROJECT_STATUS_AND_NEXT_WORK.md",
"全部 docs/status/*.md",
"完整 parity/WBS 计划",
"README 历史和 test-results/"
]
},
"parent": {
"manifest": {
"schemaVersion": 1,
"task": "M16-GAP-00136",
"parentTask": "M16-GAP-00135",
"status": "done",
"nextTask": "M16-GAP-00137",
"artifactCount": 12
},
"statusSummary": [
"# M16-GAP-00136 Status",
"status: done",
"task: action.select_circle operator LOCAL_EXACT slice",
"updated: 2026-08-20 America/New_York",
"scope:",
"- Action Editor circle selection on `object:WebGapSelectCircleObject`.",
"evidence:",
"- Blender desktop and WASM/Main expose matching three location channels with frame 3 selected."
]
},
"budgets": {
"queueBytes": 4096,
"taskBytes": 1789,
"parentManifestBytes": 24576,
"parentStatusBytes": 6144,
"evidenceFiles": 12,
"evidenceBytes": 8192,
"contextTokens": 3500,
"contextEnvelopeTokens": 1024,
"taskLines": 38,
"taskTokens": 448
},
"size": {
"documents": [
{
"path": "docs/EXECUTION_QUEUE.md",
"bytes": 2168,
"lines": 45,
"tokens": 542
},
{
"path": "docs/tasks/M16-GAP-00137.md",
"bytes": 1789,
"lines": 38,
"tokens": 448
},
{
"path": "tests/golden/M16-GAP-00136/manifest.json",
"bytes": 2222,
"lines": 26,
"tokens": 556
},
{
"path": "docs/status/M16-GAP-00136.md",
"bytes": 542,
"lines": 18,
"tokens": 136
}
],
"sourceTokens": 1682,
"evidenceFiles": 1,
"evidenceBytes": 2267,
"evidenceTokens": 567,
"totalTokens": 2249,
"reservedEnvelopeTokens": 1024,
"estimatedContextTokens": 3273,
"serializedContextTokens": 754,
"withinBudget": true
}
}

View File

@@ -0,0 +1,70 @@
#!/usr/bin/env python3
import hashlib
import json
import os
import pathlib
import sys
import tempfile
import bpy
def action_report():
obj = bpy.data.objects.get("WebGapSelectColumnObject")
if obj is None or obj.animation_data is None or obj.animation_data.action is None:
raise RuntimeError("WebGapSelectColumnObject Action is missing")
action = obj.animation_data.action
channels = []
for layer in action.layers:
for strip in layer.strips:
for bag in strip.channelbags:
for curve in bag.fcurves:
channels.append({
"path": curve.data_path,
"index": curve.array_index,
"frames": [round(float(keyframe.co.x), 6) for keyframe in curve.keyframe_points],
"selected": [bool(keyframe.select_control_point) for keyframe in curve.keyframe_points],
})
channels.sort(key=lambda value: (value["path"], value["index"]))
return {"name": action.name, "channels": channels}
def main():
arguments = sys.argv[sys.argv.index("--") + 1:]
if len(arguments) != 2:
raise SystemExit("usage: blender -b --python check-action-select-column-desktop.py -- FIXTURE REPORT")
fixture, output = (pathlib.Path(value).resolve() for value in arguments)
bpy.ops.wm.open_mainfile(filepath=str(fixture), load_ui=False)
before = action_report()
if before["name"] != "WebGapSelectColumnObjectAction" or any(
channel["selected"] != [False, True, False] for channel in before["channels"]
):
raise RuntimeError(f"unexpected action.select_column result: {before}")
descriptor, temporary = tempfile.mkstemp(prefix="m16-action-select-column-reopen-", suffix=".blend")
os.close(descriptor)
try:
bpy.ops.wm.save_as_mainfile(filepath=temporary, check_existing=False, compress=True)
bpy.ops.wm.open_mainfile(filepath=temporary, load_ui=False)
after = action_report()
finally:
pathlib.Path(temporary).unlink(missing_ok=True)
if before != after:
raise RuntimeError(f"action.select_column save/reopen drift: {before} != {after}")
report = {
"schemaVersion": 1,
"task": "M16-GAP-00137",
"operation": "ACTION_SELECT_COLUMN_DESKTOP",
"fixture": str(fixture),
"fixtureSha256": hashlib.sha256(fixture.read_bytes()).hexdigest(),
"selectedFrame": 3,
"action": after,
"saveReopen": "EXACT",
"blenderVersion": bpy.app.version_string,
}
output.parent.mkdir(parents=True, exist_ok=True)
output.write_text(json.dumps(report, indent=2, sort_keys=True) + "\n", encoding="utf-8")
print("action-select-column-desktop-ok channels=3 selectedFrame=3 saveReopen=exact")
if __name__ == "__main__":
main()

View File

@@ -2153,6 +2153,46 @@ if (task === "M16-GAP-00136") {
process.stdout.write(`generated-gap-ok task=${task} action=${animation.id} selectedFrame=3 channels=${animation.channels.length} desktop=exact saveReopen=exact next=${report.nextTask}\n`);
process.exit(0);
}
if (task === "M16-GAP-00137") {
const fixture = path.join(root, "tests/files/web/generated/M16-GAP-00137-operator-action.select_column.blend");
const desktopPath = path.join(root, "tests/golden/M16-GAP-00137/action-select-column-desktop-report.json");
fs.mkdirSync(path.dirname(desktopPath), { recursive: true });
const run = spawnSync(process.env.BLENDER_BIN ?? path.join(root, "build_blender_5.2.0/bin/blender"), ["-b", "--factory-startup", "--python", path.join(root, "tools/web/check-action-select-column-desktop.py"), "--", fixture, desktopPath], { cwd: root, encoding: "utf8", maxBuffer: 8 * 1024 * 1024 });
assert.equal(run.status, 0, `${run.stdout ?? ""}\n${run.stderr ?? ""}`);
const desktop = JSON.parse(fs.readFileSync(desktopPath, "utf8"));
assert.equal(desktop.saveReopen, "EXACT");
const engine = await factory({ wasmBinary });
const handle = engine._web_engine_create();
open(engine, handle, fs.readFileSync(fixture));
const before = snapshot(engine, handle);
const animation = before.animations?.find((value) => value.id === "action:WebGapSelectColumnObjectAction:object:WebGapSelectColumnObject");
assert.ok(animation);
assert.equal(animation.channels.length, desktop.action.channels.length);
for (const [index, channel] of animation.channels.entries()) {
const expected = desktop.action.channels[index];
assert.equal(channel.path.replace(/\[\d+\]$/, ""), expected.path);
assert.deepEqual(channel.keyframes.map((value) => value.frame), expected.frames);
assert.deepEqual(channel.keyframes.map((value) => value.selected), expected.selected);
}
assert.deepEqual(animation.channels.map((channel) => channel.keyframes.filter((value) => value.selected).map((value) => value.frame)), [[3], [3], [3]]);
const saved = output(engine, handle, engine._web_engine_save_blend, true);
const reopened = engine._web_engine_create();
open(engine, reopened, saved);
assert.deepEqual(snapshot(engine, reopened).animations, before.animations);
const malformed = new Uint8Array([0x42, 0x4c, 0x45, 0x4e, 0x44, 0x45, 0x52]);
const pointer = engine._malloc(malformed.byteLength);
let result;
try { engine.HEAPU8.set(malformed, pointer); result = engine._web_engine_open_blend(handle, pointer, malformed.byteLength); } finally { engine._free(pointer); }
assert.notEqual(result, 0);
assert.deepEqual(snapshot(engine, handle).animations, before.animations);
engine._web_engine_destroy(handle);
engine._web_engine_destroy(reopened);
const report = { schemaVersion: 1, task, operation: "ACTION_SELECT_COLUMN_LOCAL_EXACT", fixture: { path: path.relative(root, fixture).replaceAll(path.sep, "/"), sha256: desktop.fixtureSha256 }, desktop: { status: "EXACT", report: path.relative(root, desktopPath).replaceAll(path.sep, "/"), saveReopen: desktop.saveReopen }, wasm: { status: "EXACT", actionId: animation.id, selectedFrame: 3, selectedPerChannel: animation.channels.map((channel) => channel.keyframes.filter((value) => value.selected).map((value) => value.frame)) }, saveReopen: "EXACT", negative: { malformedBlend: "REJECTED_WITHOUT_MAIN_MUTATION" }, nextTask: "M16-GAP-00138" };
const reportPath = path.join(root, "tests/golden/M16-GAP-00137/action-select-column-local-exact-report.json");
fs.writeFileSync(reportPath, `${JSON.stringify(report, null, 2)}\n`);
process.stdout.write(`generated-gap-ok task=${task} action=${animation.id} selectedFrame=3 channels=${animation.channels.length} desktop=exact saveReopen=exact next=${report.nextTask}\n`);
process.exit(0);
}
if (task === "M16-GAP-00027") {
const fixture = path.join(root, "tests/files/web/generated/M16-GAP-00027-datablock-WindowManager.blend");
const desktopPath = path.join(root, "tests/golden/M16-GAP-00027/window-manager-desktop-report.json");

View File

@@ -0,0 +1,54 @@
#!/usr/bin/env python3
import pathlib
import sys
import bpy
def select_column_action(obj):
bpy.context.view_layer.objects.active = obj
obj.select_set(True)
action = obj.animation_data.action
for layer in action.layers:
for strip in layer.strips:
for bag in strip.channelbags:
for curve in bag.fcurves:
for keyframe in curve.keyframe_points:
keyframe.select_control_point = False
window = bpy.context.window
screen = window.screen
area = next(candidate for candidate in screen.areas if candidate.type == "DOPESHEET_EDITOR")
area.spaces.active.ui_mode = "ACTION"
region = next(candidate for candidate in area.regions if candidate.type == "WINDOW")
bpy.context.scene.frame_set(3)
with bpy.context.temp_override(window=window, screen=screen, area=area, region=region):
if not bpy.ops.action.select_column.poll():
raise RuntimeError("ACTION_OT_select_column poll failed in Action editor context")
result = bpy.ops.action.select_column(mode="CFRA")
if "FINISHED" not in result:
raise RuntimeError(f"ACTION_OT_select_column returned {result}")
if __name__ == "__main__":
arguments = sys.argv[sys.argv.index("--") + 1:]
if len(arguments) != 1:
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00137.py -- OUTPUT")
bpy.ops.wm.read_factory_settings(use_empty=True)
mesh = bpy.data.meshes.new("WebGapSelectColumnMesh")
mesh.from_pydata(
[(-1.0, -1.0, 0.0), (1.0, -1.0, 0.0), (1.0, 1.0, 0.0), (-1.0, 1.0, 0.0)],
[],
[(0, 1, 2, 3)],
)
obj = bpy.data.objects.new("WebGapSelectColumnObject", mesh)
bpy.context.scene.collection.objects.link(obj)
for frame, location in ((1, (0.0, 0.0, 0.0)), (3, (2.0, 3.0, 4.0)), (5, (4.0, 6.0, 8.0))):
obj.location = location
obj.keyframe_insert(data_path="location", frame=frame, index=-1)
bpy.context.scene.frame_start = 1
bpy.context.scene.frame_end = 5
select_column_action(obj)
bpy.context.scene.frame_set(1)
bpy.ops.wm.save_as_mainfile(
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
)