Skip to content

fix(blender): OpenCode for Blender 0.4.6, refused contexts and the saved file - #28

Merged
pascalandr merged 2 commits into
mainfrom
feat/blender-0.4.6
Nov 14, 2026
Merged

pascalandr merged 2 commits into
mainfrom
feat/blender-0.4.6

Conversation

@pascalandr

Copy link
Copy Markdown
Collaborator

OpenCode for Blender 0.4.6, from the 0.4.5 exercises (ex06): a refused operator said only "context is incorrect", and checks read the open document while the file on disk is what counts. Everything read from the running Blender; nothing domain-specific; no new tool.

What changes

  1. Refused operator (failed poll). The error's hint and blender_inspect's operator poll add:
    • same_group_passing: the operators of its group whose poll passes now;
    • passes_with: the context members (with their Python path) or the editor area that make its poll pass, found by trying poll() only under temp_override (the operator never runs): data two steps from the active object, scene and view layer, members named after the property that leads to them or a collection's item type, then the screen's areas.
    • ex06: ptcache.bake passes with point_cache = bpy.context.active_object.modifiers['Cloth'].point_cache or bpy.context.scene.rigidbody_world.point_cache; view3d.view_all with the VIEW_3D area.
  2. blender_verify saved. true (the open file) or a .blend path: a background Blender opens the file as written on disk and runs the same verification (criteria, visible, render); read names the file, time and size; unsaved still says what the open document has that the file lacks. No window; never offered to OpenCode.

Validation

  • ops046_tests.py (3) and one plugin test in a background Blender 5.3: fail on 0.4.5, pass on 0.4.6.
  • Windowed trial on a hidden desktop with a copy of the exercise's ex06 file: the refused bake's hint and inspect name both point caches and ptcache.bake_all/free_bake_all; after a change, verify measured 2.0 live and 0.0 with saved: true.
  • lint, typecheck, npm test, build, check:markers, trace scan, Blender suites (24/24, extension 1/1), native sessions with OpenCode 2.2.5.

…ved file

In the 0.4.5 exercises (ex06) ptcache.bake refused its context and the error
said only "context is incorrect"; the agent's checks read the open document
while the file on disk was what counted.

A refused operator (failed poll): the error's hint and blender_inspect's
operator now say, read from this Blender, what would let it run: Blender's
poll message as before, the operators of its group whose poll passes now, and
the context members that make its poll pass, with their Python path, or the
editor area that does. They are found by trying poll() only, under
temp_override, never running the operator: the data two steps from the
active object, the scene and the view layer (a member named after the
property leading to it, or after a collection's item type: modifiers ->
modifier), then the screen's areas. In ex06's file: ptcache.bake passes with
point_cache = bpy.context.active_object.modifiers['Cloth'].point_cache or
bpy.context.scene.rigidbody_world.point_cache; bake_all and free_bake_all pass
as they are. Nothing is specific to a domain.

blender_verify saved: true (or a .blend path) reads the file as written on
disk: a background Blender opens it and runs the same verify program (same
criteria, visible and render), without a window and never offered to
OpenCode (OPENCODE_LINK_ROLE verify); read names the file, its time and
size. unsaved still says what the open document has that the file lacks.

Validation: ops046_tests.py (3) and a plugin test in a background Blender 5.3
fail on 0.4.5 (834689d) and pass on 0.4.6. Windowed trial on the hidden
desktop with a copy of the exercise's ex06 file: the refused bake's hint and
inspect name both point caches and the passing operators; after a change,
verify measured 2.0 live and 0.0 with saved (the file). lint, typecheck,
npm test, build, check:markers, trace scan, the Blender suites (24/24,
extension 1/1) and native sessions with OpenCode 2.2.5 pass.
…areas

The quality round's archviz render shows four black rectangles on the window
wall that neither the agent nor any check noticed. Their cause, measured on
the file in a background Blender: the east wall is four pieces whose volumes
interpenetrate (the full-height pieces beside the window and the full-length
pieces under and over it overlap by 2.41, 2.09, 1.33 and 1.15 m2), with their
room-side faces on one plane. Cycles renders a surface inside another closed
mesh black; with the overlap removed, the same render has no black area.
Normals, materials and holes are not involved.

blender_verify now adds geometry, for the meshes in view at the first checked
frame, read from their evaluated geometry and present only when found:
closed meshes whose normals point inward (negative signed volume), open edges
of mostly closed meshes, non-manifold edges, zero-area faces, and coplanar
overlapping faces between objects facing the same way toward the camera, with
their area. A render also names its near-black opaque areas (box, share) and
the object a camera ray meets at each one's centre. Nothing is specific to a
domain; on the archviz file the four east-wall pairs come first and the black
areas are on the east wall pieces.

Validation: a plugin test (overlapping walls, an inside-out cube, a holed
sphere, a zero-area face, a black board in a Workbench render) fails on the
branch's previous head (c9ee82d) and passes; the verify program on a copy of
the archviz file reports the overlaps and the black areas. lint, typecheck,
npm test, build, check:markers, trace scan, the Blender suites (25/25,
extension 1/1) and native sessions with OpenCode 2.2.5 pass.
@pascalandr
pascalandr merged commit 8344c03 into main Nov 14, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant