Fix T96347: Pose gizmo shown at wrong location with multiple objects

Regression in [0] error iterating over pose bones which only used the
active-object, also follow the same logic as edit-mode for using the
local-matrix.

[0]: d052169e7e
This commit is contained in:
Campbell Barton
2022-03-29 12:49:04 +11:00
parent 87d9d33c00
commit f99beb730a

View File

@@ -939,7 +939,7 @@ int ED_transform_calc_gizmo_stats(const bContext *C,
for (uint ob_index = 0; ob_index < objects_len; ob_index++) {
Object *ob_iter = objects[ob_index];
const bool use_mat_local = params->use_local_axis && (ob_iter != ob);
const bool use_mat_local = (ob_iter != ob);
/* mislead counting bones... bah. We don't know the gizmo mode, could be mixed */
const int mode = TFM_ROTATION;
@@ -951,7 +951,7 @@ int ED_transform_calc_gizmo_stats(const bContext *C,
}
/* Use channels to get stats. */
LISTBASE_FOREACH (bPoseChannel *, pchan, &ob->pose->chanbase) {
LISTBASE_FOREACH (bPoseChannel *, pchan, &ob_iter->pose->chanbase) {
if (!(pchan->bone->flag & BONE_TRANSFORM)) {
continue;
}