Maniphest T100187

Edit mode normalize lacks option to only normalize deformed bones
Closed, ResolvedBUG

Assigned To
Nate Rupsis (nrupsis)
Authored By
Daniel Salazar (zanqdo)
Aug 4 2022, 12:48 AM
Tags
  • BF Blender
  • Modeling
  • Animation & Rigging
Subscribers
Daniel Salazar (zanqdo)
Hans Goudey (HooglyBoogly)
Jer Bot (verbal007)
Sybren A. Stüvel (sybren)
Tokens
"Like" token, awarded by verbal007.

Description

Context: This is a split of T96787 to separate into 2 different problems.

System Information
Operating system: Windows-10-10.0.19044-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1080 with Max-Q Design/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 512.15

Blender Version
Broken: version: 3.2.0 Alpha, branch: master, commit date: 2022-03-24 00:35, hash: rB98d4872d7f42

Short description of error
This bug relates to object.vertex_weight_normalize_active_vertex()

Normalization should only be applied to deforming bones by default.

Exact steps for others to reproduce the error

Check the L and R groups, these are non-deforming groups. The L group looks like this:

Now hit the Normalize operator. The result is the L group looking like this:

Video overview

Proposal
The proposal is to enhance the object.vertex_weight_normalize_active_vertex() operator to get the same option that it's cousin the object.vertex_group_normalize_all() operator has

Namely group_select_mode can be set to 'ALL' or 'BONE_DEFORM'.

object.vertex_group_normalize_all(group_select_mode='BONE_DEFORM')

In the case of object.vertex_weight_normalize_active_vertex() there are no such options and we are always stuck normalizing all groups!

After we get the options, we can then make the operator do the right thing depending on the context.

For this I propose to use the exact same logic that object.vertex_group_normalize_all() uses which is:

If the mesh has a deformation relationship with an armature modifier, default to 'BONE_DEFORM', otherwise choose 'ALL'

Event Timeline

Daniel Salazar (zanqdo) changed the task status from Needs Triage to Confirmed.Aug 4 2022, 12:48 AM
Daniel Salazar (zanqdo) created this task.
Daniel Salazar (zanqdo) updated the task description.Aug 4 2022, 12:54 AM
Daniel Salazar (zanqdo) updated the task description.Aug 4 2022, 12:58 AM
Daniel Salazar (zanqdo) updated the task description.Aug 4 2022, 1:02 AM
Daniel Salazar (zanqdo) updated the task description.Aug 4 2022, 1:07 AM
Pratik Borhade (PratikPB2123) added projects: BF Blender, Modeling, Animation & Rigging.Aug 4 2022, 5:24 AM
Jer Bot (verbal007) awarded a token.Aug 4 2022, 6:08 PM
Jer Bot (verbal007) added a subscriber: Jer Bot (verbal007).
Germano Cavalcante (mano-wii) changed the subtype of this task from "Report" to "Bug".Aug 5 2022, 3:04 PM
Sybren A. Stüvel (sybren) moved this task from Backlog to Short Term on the Animation & Rigging board.Aug 31 2022, 2:55 PM
Nate Rupsis (nrupsis) added subscribers: Hans Goudey (HooglyBoogly), Sybren A. Stüvel (sybren).Sep 30 2022, 5:16 PM

Looks like we lucked out, and some C -> C++ porting solved the issue:
https://developer.blender.org/D15689

cc @Sybren A. Stüvel (sybren) @Hans Goudey (HooglyBoogly)

Hans Goudey (HooglyBoogly) added a comment.EditedSep 30 2022, 5:32 PM

You mean I fixed the bug with that port? That's surprising, any idea how?

Nate Rupsis (nrupsis) added a comment.Oct 5 2022, 6:32 PM

@Hans Goudey (HooglyBoogly) That's a great question, and looking over your C++ port, I'm not 100% sure....

Only reason I thought it would have been your port, is because it updates: VGroupSelect subset_type = static_cast<eVGroupSelect>(ts->vgroupsubset); Which conveniently coincides with subsets now being respected.

Sybren A. Stüvel (sybren) closed this task as Resolved.Oct 7 2022, 10:18 AM