Skip to content

Version 2026.7.1 - #404

Open
Mustard2 wants to merge 7 commits into
mainfrom
2026.7.1
Open

Version 2026.7.1#404
Mustard2 wants to merge 7 commits into
mainfrom
2026.7.1

Conversation

@Mustard2

@Mustard2 Mustard2 commented Aug 22, 2026

Copy link
Copy Markdown
Owner
  • Enhancement: Some Creator Tools now offer the possibility to remove unused data (null shape keys, unused vertex groups, attributes, UV Maps).
  • Enhancement How to setup the new Jiggle physics? #399: The Jiggle Cage (Quick) operator now infers the direction automatically by default.
  • Fix Custom Properties bug #402: Improved the section selection for custom properties in Configuration mode, in order to be less confusing and restore the custom property list correct icons indentation.
  • Fix Create Morphs Preset error #403: Morphs with shape keys might fail to be written.
  • Fix: Context in active model selection.

@Mustard2 Mustard2 self-assigned this Aug 22, 2026
@Mustard2 Mustard2 added the bug Something isn't working label Aug 22, 2026
This was linked to issues Aug 22, 2026
@Mustard2

Copy link
Copy Markdown
Owner Author

@claude Review

@claude

claude Bot commented Aug 22, 2026

Copy link
Copy Markdown

Claude finished @Mustard2's task in 3m 48s —— View job


Code Review — PR #404 (Version 2026.7.1)

Reviewed the diff against origin/main (13 files, +446/-80). Overall the changes are clean and match the repo conventions in CLAUDE.md (register/unregister ordering, mustardui_active_object usage, ops_*/settings_* naming). Two issues found, both minor:

1. Dead fallback / wrong comparison in the custom-property section icon (custom_properties/ui_list.py:44-47)

section = rig_settings.body_custom_properties_sections.get(item.section)
icon = "RECORD_OFF"
if section is not None:
    icon = section.icon if section not in {"", "NONE"} else "DOT"

section is a MustardUI_SectionItem PropertyGroup instance, not a string, so section not in {"", "NONE"} is always True — the "DOT" fallback branch is unreachable, and a section with an unset icon (""/"NONE") won't fall back to "DOT" as intended. The correct comparison (and the one already used a few lines away in the new custom_properties/ops_set_section.py:23) is against section.icon, not section itself:

icon = section.icon if section.icon not in {"", "NONE"} else "DOT"

Since this PR's own goal (#402) is to "restore the custom property list correct icon indentation," this is worth fixing for consistency even though it isn't a crash (icon values are constrained by the EnumProperty, so nothing breaks — it's a cosmetic/logic inconsistency).

Fix this →

2. Missing model_body null guard in the new shape-key preset paths (morphs/settings_presets.py:20,65, morphs/ops_defvalue.py:40)

The #403 fix correctly switches from the (non-existent) rig_settings.data to rig_settings.model_body.data, but none of the three call sites check rig_settings.model_body is not None before dereferencing .data:

shape_keys = rig_settings.model_body.data.shape_keys  # settings_presets.py:20, ops_defvalue.py
...
elif m.get("shape_key") and rig_settings.model_body.data.shape_keys:  # settings_presets.py:65

model_body is a PointerProperty that can legitimately be None — the codebase guards against this explicitly elsewhere (configuration/ops_quick_setup.py, configuration/ops_configuration.py, misc/get_ui_objects.py, etc.). In practice these preset/morph paths are only reachable on an enabled/configured model where model_body should already be set, so this is likely low-risk, but an unguarded AttributeError would be a regression vs. the previous defensive rig_settings.data and rig_settings.data.shape_keys check pattern that was dropped.

Fix this →

Other notes (no action needed)

  • model_selection/active_object.py: switching bpy.context.scenecontext.scene is a correct fix — using the passed-in context instead of the global is the right call when this helper can be invoked from contexts where they diverge (matches the "Fix: Context in active model selection" changelog entry).
  • tools_creators/ops_jiggle.py: the automatic Pin-direction inference (border-vertex vs. island-center vector, then nearest-island matching for the generated cages) looks correct, and the refactored gradient projection math is behavior-preserving for the existing manual +X/-X/… options (verified the sign/inversion algebra matches the old per-axis branches).
  • misc/mesh_cleanup.py, ops_optimize_sk.py, ops_collision_cage.py, ops_jiggle_accurate.py: the new cleanup helpers (void shape-key detection/removal, unused vertex groups/attributes) are well-isolated, skip morph-managed shape keys correctly, and are wired behind opt-in operator toggles.

Not run: ruff check . / ruff format --check . — Bash execution requires interactive approval in this environment and none was available; please run these locally/in CI to confirm lint/format still pass (the CI lint job will also catch this).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Custom Properties bug Create Morphs Preset error

1 participant