Repository navigation
fix(skills): correct driver autoexec, handler args, active-vs-selected, bake target and migration claims - #476
Merged
Conversation
…d, bake target and migration claims Several skills taught behavior that live Blender contradicts, so agents following them shipped dead drivers in shared files, AttributeErrors in pre handlers, None guards that miss an unselected active object, and bake setups that cancel on 5.x once a "redundant" tex.select line is removed. - drivers-and-app-handlers: driver_namespace calls are not simple expressions and need Python auto-execution (off by default); pre handlers receive (scene, None); exit_pre receives one bool. - operators + type-annotate-props-and-defend-context rule: active_object survives deselect-all and headless startup; active and selected are independent. - bake-high-to-low + snippet: on 5.0+ the active-texture node must also be selected; 4.5 LTS ignores selection. - bl-info-migration: replace hard-coded add-on names and submodule __name__ with __package__. - depsgraph / mesh-editing: one temporary mesh per evaluated object, not per to_mesh() call. ui-panels: drop the unverified fallback tab name. Examples gain checks with falsifiers: driver-wave (exit 5 is_simple_expression, exit 7 handler arg types), temp-override-join (exit 13 active survives deselect), bake-normal-high-to-low (--unselect-target, exit 4 on 5.0+). Signed-off-by: TMHSDigital <tmhospitalitystrategies@gmail.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Closes #458
Closes #459
Closes #460
Closes #461
Closes #464
Fixes skill, rule and snippet claims that live Blender contradicts. Three existing examples gain checks, each with a catalog falsifier.
Binaries used (versions as the binaries report them):
.scratch/blender-5.2.1-windows-x64/blender.exe(5.2.1 LTS, hash 9e2066aef7ef) and.scratch/blender-4.5.11-windows-x64/blender.exe(4.5.11 LTS, hash 4db51e9d1e1e). The bake-selection boundary was also probed on 5.0.1 and 5.1.2.Per issue
#458 Drivers: autoexec and
is_simple_expressiondrivers-and-app-handlers.driver_namespacecall needs Auto Run Python Scripts, Trusted Source, or-y. This cites the manual's Drivers > Troubleshooting page.driver.is_simple_expressionto tell which kind you wrote. A measured table is included.driver-with-custom-function.pyheader now carries the same caveat.driver-waveasserts that every column's custom-function driver reportsis_simple_expression == False(exit 5). Falsifier:--simple-exprwrites the same profile inline as1.4 + sin(i*0.6). The heights still match, but the run exits 5.#459 Handler signatures
frame_change_preanddepsgraph_update_prenow read(scene, None), with a note on what to do instead.exit_preis documented as(interactive: bool); a*argshandler gets(bool, None).driver-waveasserts the argument types of all four handlers (exit 7). This went into driver-wave rather thanexit-pre-sidecarto avoid conflicting with the exit-code renumbering. Falsifier:--swap-handlershangs each probe on the opposite list and exits 7.#460 Active vs selected
operatorsandrules/type-annotate-props-and-defend-context.mdcnow say:active_objectis None only when there is no active object: an empty scene, a deleted active object, or an override that sets it to None.select_get(),visible_get()andlibrary is None.select_get()check.claude/blender-rules.md.temp-override-join, which is cheaper than a new check-only example. Afterselect_all(DESELECT)the target stays active,select_get()is False, andselected_objectsis empty (exit 13). Falsifier:--clear-active-on-deselect.#461 Bake target must be a selected Image Texture node
nodes.active, and the bake FINISHES, because that node is still the active texture.--unselect-targetadded tobake-normal-high-to-low. It exits 4 on 5.x and exits 0 on 4.5, so the catalog row carries"min_version": "5.0"and the README says so.#464
bl-info-migration: new Step 4 replaces hard-coded add-on names and submodule__name__with__package__, and cross-linkscustom-properties. Measured with an installed test extension on 5.2.1:addons["bare_id"]raises KeyError.__name__isbl_ext.user_default.<id>.prefs.bl_idname = __name__registers silently, andaddons[pkg].preferencesis then None.to_mesh_clear()or re-evaluation; many objects hold one each".to_mesh()on the same object frees the previous mesh. The old Python handle then raises ReferenceError.Proven by live run vs inspection
Live, headless (
--background --factory-startup) on 5.2.1 and 4.5.11:use_scripts_auto_executeis False on factory settings.is_simple_expressionvalues for 7 expressions.active_objectafter deselect-all, after deleting the active object, and in an empty scene.object.deleteon an active but unselected object returns CANCELLED.to_meshlifetime.exit_prepasses False in background on 5.2.1.Live, other:
exit_prereceiving True.__package__/addons/AddonPreferencesfacts come from a 5.2.1 run with an installed test extension in a temporaryBLENDER_USER_RESOURCES.Inspection only:
--backgrounddoes not apply the GUI autoexec block. This comes from skills: drivers skill says driver_namespace is the security gate; custom-function drivers actually need Auto Run Python Scripts and go dead in shared files #458's evidence and the skill's existing save-and-reopen measurement; I did not re-measure it in a GUI session.evaluated_depsgraph_get()inside a depsgraph handler.__package__behaviour of deeper submodules (ui/panels.pygives...<id>.ui). This is standard Python package semantics and was not run.Falsifier probes (measured exits)
--flat-expr--simple-expr16/16 drivers report is_simple_expression=True)--swap-handlersDepsgraph, post gotNoneType)--no-override--clear-active-on-deselectactive=None)--unselect-target{'CANCELLED'}, active=True selected=False)min_version5.0, SKIP below)python tests/run_all.py: 31 passed, 0 failed. Gallery pages were regenerated withscripts/build_gallery.py; the diff covers only the README-derived text of the three example pages, and I read it in the generated HTML. No renders changed.🤖 Generated with Claude Code