Page MenuHome

Fix T60689: Flip Active/Selected bone does not work in weight paint mode
Needs ReviewPublic

Authored by Jacques Lucke (JacquesLucke) on Jan 21 2019, 12:17 PM.



@Alexander Gavrilov (angavrilov), afaik you wrote this code in the first place.
Is there any special reason for this default for the object_type?
I'm not sure about what impact this change can have on other code.
The bug you solved in when you introduced this code is still solved (T58412).

Diff Detail

rB Blender
flip-active (branched from master)
Build Status
Buildable 2754
Build 2754: arc lint + arc unit

Event Timeline

The reason for the default is because the original code used the type of the active object, and this default specifically implements it. I'd suggest not changing it without consulting with whoever actually wrote the actual original code.

@Dalai Felinto (dfelinto) or @Campbell Barton (campbellbarton), I guess one of you would know the correct logic for multi-object modes and the active object?

The original (unimplemented) design was to implement a WEIGHT_PAINT mode for the bones as well. To stop this mess of having two edit objects in different modes. What we would have is both armature and mesh object in weight mode.
So although this patch provides a fix, it deviates the code even further from that design.

Anyways, this patch seems to be a valid quick fix. An improvement from what we have in master anyways.
That said I would rather -1 as argument to FOREACH_BASE_IN_MODE_BEGIN to use a define (e.g., ANY_MODE) instead of -1.

@Campbell Barton (campbellbarton) what do you say? Is the whole weightpaint mode for armature still a thing?