Repository navigation
fix(blender): OpenCode for Blender 0.4.6, refused contexts and the saved file - #28
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
hintandblender_inspect's operatorpolladd: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 tryingpoll()only undertemp_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.ptcache.bakepasses withpoint_cache = bpy.context.active_object.modifiers['Cloth'].point_cacheorbpy.context.scene.rigidbody_world.point_cache;view3d.view_allwith theVIEW_3Darea.blender_verifysaved.true(the open file) or a.blendpath: a background Blender opens the file as written on disk and runs the same verification (criteria, visible, render);readnames the file, time and size;unsavedstill 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.ptcache.bake_all/free_bake_all; after a change,verifymeasured 2.0 live and 0.0 withsaved: true.npm test, build,check:markers, trace scan, Blender suites (24/24, extension 1/1), native sessions with OpenCode 2.2.5.