You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FixCustom 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.
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 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:
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).
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:
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.
model_selection/active_object.py: switching bpy.context.scene → context.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).
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
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.
Uh oh!
There was an error while loading. Please reload this page.