Page MenuHome

Normalize All Weights: default to Deform Pose Bones when there is an Armature
AbandonedPublic

Authored by Nate Rupsis (nrupsis) on May 7 2022, 2:17 AM.

Details

Summary

If armature is present, the default behavior is targeted to "All Groups". It should default to Deform Pose bone instead.

If we don't do that, we risk normalizing deforming and non deforming groups together which is catastrophic for all of them.

This patch sets the default Subset to Deform Pose bone and falls back to "All" if no armature is present.

Videos:
Old

New

Diff Detail

Repository
rB Blender
Branch
T95038 (branched from master)
Build Status
Buildable 22011
Build 22011: arc lint + arc unit

Event Timeline

Nate Rupsis (nrupsis) requested review of this revision.May 7 2022, 2:17 AM
Nate Rupsis (nrupsis) created this revision.
Nate Rupsis (nrupsis) edited the summary of this revision. (Show Details)May 7 2022, 2:25 AM

From an user's perspective this looks complete to me

  • fixing typo in comment
  • and fixing extra spacing
  • Merge branch 'master' into T95038
  • actually fixing typo

Love those little enhancements that just make more sense.
Check comment formatting in https://wiki.blender.org/wiki/Style_Guide/C_Cpp

This comment was removed by Nate Rupsis (nrupsis).
Nate Rupsis (nrupsis) updated this revision to Diff 51542.EditedMay 16 2022, 7:59 PM
  • Splitting Diff into two separate revisions.
Nate Rupsis (nrupsis) edited the summary of this revision. (Show Details)May 16 2022, 10:21 PM
Sybren A. Stüvel (sybren) requested changes to this revision.EditedJun 3 2022, 10:52 AM

Great improvement @Nate Rupsis (nrupsis)!

A bit of feedback on the patch itself:

  • The title should be understandable by everybody, so also regular users / artists. Mentioning constants like WT_VGROUP_BONE_DEFORM makes things harder to understand. Something like "Normalize All Weights: default to Deform Only when there is an Armature" would be clearer.
  • The videos are really nice as a demo of what's going wrong, but they have the disadvantage that they take much time to view, but more importantly, they cannot be indexed by the search engine. For bug reports & patches, please ensure that the information is written down, and that videos are only used as illustration, not as the main source fo info. That way there is a bigger chance the patch is found when people search for related terms. The patch description will also be used as commit message, which is another reason to take some time to write things down beforehand.

The functionality of the patch is certainly accepted. The comment & patch description could use some more love though.

source/blender/editors/object/object_vgroup.c
734

This explains the what, but not why this is done. The patch title and description also don't explain this, so for future developers it becomes tricky to figure out the motivation.

This revision now requires changes to proceed.Jun 3 2022, 10:52 AM
Daniel Salazar (zanqdo) retitled this revision from Setting default enum option to WT_VGROUP_BONE_DEFORM, and falling back to All Groups if no armature is found to Normalize All Weights: default to Deform Pose Bones when there is an Armature.Aug 4 2022, 1:15 AM
Daniel Salazar (zanqdo) edited the summary of this revision. (Show Details)
Daniel Salazar (zanqdo) edited the summary of this revision. (Show Details)Aug 4 2022, 1:18 AM
Daniel Salazar (zanqdo) edited the summary of this revision. (Show Details)
This comment was removed by Daniel Salazar (zanqdo).

Updated the title and description as requested.

As for the code comment I suggest something like this:

/* Set Deform Bone as default selection if armature is present to avoid normalizing deforming and non deforming groups together. */

Daniel Salazar (zanqdo) edited the summary of this revision. (Show Details)Aug 4 2022, 1:39 AM
Daniel Salazar (zanqdo) edited the summary of this revision. (Show Details)

Duplicate of https://developer.blender.org/D14881 (which has already been committed)