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
The implementation is generally correct and well-structured. The core idea — splitting extras_config_subcollections from outfit_config_subcollections and adding a recursive update_extras_visibility helper — is sound, and all previously wrong uses of outfit_config_subcollections for the extras collection have been migrated. Registration order in outfits/__init__.py is correct (reverse for unregister). Found a few issues to address:
Issues
1. Missing poll() on new operator — potential crash
outfits/ops_visibility_extras.py:27
poll, arm=mustardui_active_object(context, config=0)
rig_settings=arm.MustardUI_RigSettings# crashes if arm is None
MustardUI_ExtrasCollectionVisibility has no @classmethod poll() method. If the operator is called when mustardui_active_object returns (False, None) (e.g. no model selected), arm.MustardUI_RigSettings will crash. Every other operator in this module guards against this. Fix:
2. show_viewport_extras_update doesn't propagate to sub-collections
settings/rig.py:602–621
When the global eye-icon toggle for Extras is clicked, show_viewport_extras_update sets only the top-level extras_collection.hide_viewport and its layer collection exclude. Sub-collection hide_viewport/exclude flags are not updated. This is fine when Blender propagates visibility down from the parent, but for consistency with the rest of the feature (which calls update_extras_visibility) it would be cleaner to call that helper instead of (or alongside) the current logic — especially since update_extras_visibility also handles the hide_render and exclude flags for each sub-level.
At minimum, show_viewport_extras_update should also update individual object visibility before deferring to the helper. As-is, it only hides/shows the collection level, not the individual objects (it reads hide_viewport to decide hidden but never writes it back to objects). This was pre-existing behavior, but may interact oddly with the new sub-collection toggle.
status_int= (
statusandnotrig_settings.extras_collection.hide_viewport# only top-level checkedandnotobj.hide_viewport
)
For objects in a sub-collection that is hidden (but the parent extras collection is shown), rig_settings.extras_collection.hide_viewport will be False (visible), so status_int can become True even though the object's own sub-collection is excluded. The per-object obj.hide_viewport flag should already reflect this correctly if MustardUI_ExtrasCollectionVisibility set it properly, but the parent-collection check is misleadingly incomplete.
4. SingleCage rebind still uses c.objects for outfit items
physics/ops_rebind.py:337
forobjin [xforxinc.objectsifx.type=="MESH"]: # outfit_config_subcollections not respected
The MustardUI_PhysicsItem_Rebind_SingleCage operator correctly uses extras_config_subcollections for the extras section (added in this PR), but the outfit collection loop still uses .objects instead of .all_objects if outfit_config_subcollections. The regular MustardUI_PhysicsItem_Rebind was fixed to respect this flag. This inconsistency is pre-existing but this PR is a good opportunity to fix it in SingleCage too.
Minor Notes
Empty sub-collection → auto-excluded (helper_functions.py:27): _update uses all(obj.hide_render for obj in coll.objects) — all([]) returns True in Python, so a sub-collection with no direct objects is considered "all hidden" and gets excluded. This could surprise creators who add a placeholder empty sub-collection during configuration. Might be worth an early-out: if not coll.objects and not coll.children: return False (or True, depending on desired behavior).
One-level UI depth vs. recursive hide logic: menu_outfits.py:440 iterates extras.children (direct children only), while update_extras_visibility recurses through all descendants. So only one nesting level gets its own collapse/toggle in the UI; deeper nesting is still handled at the visibility level but won't have separate UI groups. This seems intentional for UI simplicity, but worth documenting.
poll_collection_extras simplification (settings/rig.py:584): The if self.hair_collection is not None guard was removed. The simplified object != self.hair_collection is semantically equivalent (comparing to None always differs from a collection object), so this is correct and cleaner. ✓
Summary
The implementation is correct and complete for the main feature. Issues 1 and 3 are the most actionable (potential crash + physics logic), Issue 2 is a pre-existing behavioral gap made more visible by the new feature, and Issue 4 is a pre-existing inconsistency. The UI drawing logic, property definitions, and registration wiring are all correct.
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.