Skip to content

fix: driver_namespace id_type and SDF-grid meshing in skills#9

Merged
TMHSDigital merged 2 commits into
mainfrom
fix/driver-id-type-and-sdf-example
Jun 19, 2026
Merged

fix: driver_namespace id_type and SDF-grid meshing in skills#9
TMHSDigital merged 2 commits into
mainfrom
fix/driver-id-type-and-sdf-example

Conversation

@TMHSDigital

Copy link
Copy Markdown
Owner

Summary

Two in-Blender findings from executing the content on 4.5.10 LTS and 5.1.1, both reproduced and both fixes verified on both builds.

F1 — driver_namespace example raised TypeError (fix)

skills/drivers-and-app-handlers/SKILL.md: the worked example did var.targets[0].id = bpy.context.scene without first setting id_type='SCENE'. A SINGLE_PROP target id pointer defaults to OBJECT, so the assignment raised TypeError: DriverTarget.id expected a Object type, not Scene on both versions.

  • Repro (both): RAISES: TypeError: ... DriverTarget.id expected a Object type, not Scene
  • Fix: add var.targets[0].id_type = 'SCENE' before the id = line (matching the already-correct snippet driver-with-custom-function.py L28); also clarified the SINGLE_PROP prose.
  • Post-fix (both): driver attaches and location.z evaluates to [0.0, 2.425, 4.9985] across frames 1/50/100.

F2 — SDF-remesh example produced 0 vertices (diagnosed, then fixed)

skills/geometry-nodes-python/SKILL.md: build_remesh_via_sdf wired MeshToSDFGridVolumeToMesh.

  • Diagnosis (not a parameter bug): MeshToSDFGrid.outputs["SDF Grid"] is a grid/float socket (type=VALUE, NodeSocketFloat); VolumeToMesh.inputs["Volume"] is NodeSocketGeometry. The link is is_valid=False — incompatible socket types — so VolumeToMesh gets no data and emits 0 verts at every Voxel Size / Band Width / Threshold combination on both builds. Control: MeshToVolume → VolumeToMesh is is_valid=True and meshes fine (8216/7778 verts), confirming VolumeToMesh is for volume geometry, not bare grids.
  • Correct node: GeometryNodeGridToMesh ("Grid to Mesh") — IN=['Grid','Threshold','Adaptivity'] OUT=['Mesh'], Grid input type-compatible with the SDF grid output.
  • Fix: switch to GridToMesh, wire SDF Grid → Grid, default threshold=0.0 (SDF zero-level); updated heading + node-reference table.
  • Post-fix (both): cube remesh yields 10088 verts (5.1.1) / 9602 (4.5.10), zrange (-1.0, 1.0) (the cube spans ±1).

Constraints

Counts unchanged (12/6/2/17). No edits to CHANGELOG / CLAUDE **Version:** / ROADMAP **Current:**. standards-version stays 1.10.0. CLAUDE.md untouched (no context-mode block). Both commits signed (-s). Per known release.yml behavior this fix: will cut a patch.

🤖 Generated with Claude Code

The drivers skill's driver_namespace worked example assigned var.targets[0].id = bpy.context.scene without first setting id_type='SCENE'. A SINGLE_PROP target id pointer defaults to OBJECT, so the bare assignment raises TypeError: DriverTarget.id expected a Object type, not Scene on both 4.5.10 LTS and 5.1.1. Added the id_type line (matching snippet driver-with-custom-function.py) and clarified the SINGLE_PROP prose. Verified: driver now attaches and location.z evaluates to [0.0, 2.425, 4.9985] across frames 1/50/100 on both builds.

Signed-off-by: fOuttaMyPaint <TMhospitalitystrategies@gmail.com>
build_remesh_via_sdf wired MeshToSDFGrid's 'SDF Grid' output (a grid/float socket) into VolumeToMesh's 'Volume' input (a geometry socket). That link is is_valid=False, so VolumeToMesh received no data and the evaluated modifier produced 0 vertices on both 4.5.10 LTS and 5.1.1, at every Voxel Size/Band Width/Threshold combination tried. Root cause: VolumeToMesh meshes a volume geometry (as produced by MeshToVolume), not a bare grid. Switched to GeometryNodeGridToMesh (Grid input is type-compatible) with threshold=0.0 (SDF zero-level). Verified: cube remesh now yields 10088 verts (5.1.1) / 9602 (4.5.10), zrange (-1.0, 1.0). Updated the heading and node-reference table accordingly.

Signed-off-by: fOuttaMyPaint <TMhospitalitystrategies@gmail.com>
@TMHSDigital TMHSDigital merged commit f21a7d4 into main Jun 19, 2026
6 checks passed
@TMHSDigital TMHSDigital deleted the fix/driver-id-type-and-sdf-example branch June 19, 2026 03:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant