|
76 | 76 | CELL_OX = 244.4 # 28 px crosshair gap, ~165 px side margins at 1280x720 |
77 | 77 | CELL_OY = 143.6 # 28 px gap, ~87 px top/bottom margins |
78 | 78 | XF_TOL = 1e-3 # float32 transform read-back tolerance |
| 79 | +# Visual mosaic (A top-left, B top-right, C bottom-left, GC bottom-right). |
| 80 | +MOSAIC = ( |
| 81 | + ("A", -CELL_OX, CELL_OY), |
| 82 | + ("B", CELL_OX, CELL_OY), |
| 83 | + ("C", -CELL_OX, -CELL_OY), |
| 84 | + ("GC", CELL_OX, -CELL_OY), |
| 85 | +) |
79 | 86 |
|
80 | 87 | A_RGB = (0.85, 0.10, 0.22) # crimson |
81 | 88 | B_RGB = (0.06, 0.75, 0.80) # teal |
@@ -277,8 +284,7 @@ def check(coll_owner): |
277 | 284 |
|
278 | 285 | # 9. Mosaic transforms + compositing defaults persist on the strips. |
279 | 286 | xf_err = 0.0 |
280 | | - for name, ox, oy in (("A", -CELL_OX, CELL_OY), ("B", CELL_OX, CELL_OY), |
281 | | - ("C", -CELL_OX, -CELL_OY), ("GC", CELL_OX, -CELL_OY)): |
| 287 | + for name, ox, oy in MOSAIC: |
282 | 288 | t = coll.get(name).transform |
283 | 289 | xf_err = max(xf_err, abs(t.scale_x - CELL_SCALE), |
284 | 290 | abs(t.scale_y - CELL_SCALE), |
@@ -598,9 +604,27 @@ def near(got, want, tol): |
598 | 604 | def check_pixels(engine): |
599 | 605 | """Compositing witness on a tiny render: cell centers carry their strip |
600 | 606 | colors, the cross cell is the blend (neither source), and a margin point |
601 | | - is stage-dark — if T1 composited independently it would be crimson.""" |
| 607 | + is stage-dark — if T1 composited independently it would be crimson. |
| 608 | +
|
| 609 | + 5.2 COLOR strips bake readonly ``width``/``height`` from the scene render |
| 610 | + resolution at ``new_effect`` time. Transform scale/offset are then in |
| 611 | + that media space, not the later output size. 4.5/5.1 COLOR strips have |
| 612 | + no intrinsic size — scale is always a fraction of the output frame. |
| 613 | + Set the tiny resolution *before* building the cut list or C (channel 4) |
| 614 | + covers the 96×54 frame and TL samples amber. |
| 615 | + """ |
602 | 616 | sc = bpy.context.scene |
| 617 | + sc.render.resolution_x = PXW |
| 618 | + sc.render.resolution_y = PXH |
603 | 619 | build_cut_list(sc, pix=PXW / RENDER_W) |
| 620 | + if bpy.app.version >= (5, 2, 0): |
| 621 | + a = strips_coll(sc.sequence_editor).get("A") |
| 622 | + if (a.width, a.height) != (PXW, PXH): |
| 623 | + return fail( |
| 624 | + f"5.2 COLOR size {(a.width, a.height)} != render {(PXW, PXH)} " |
| 625 | + f"— width/height bake at new_effect drifted", |
| 626 | + 12, |
| 627 | + ) |
604 | 628 | build_stage(bpy.data.scenes["Stage"]) |
605 | 629 | tmp = tempfile.mkdtemp(prefix="vse_pixels_") |
606 | 630 | path = os.path.join(tmp, "px.png") |
|
0 commit comments