diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2021-02-10 18:27:01 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2021-02-10 18:32:46 +0300 |
commit | bdb83cc32cbd0997752420ef95c791f66dca54c8 (patch) | |
tree | faf31e7434a245d75e0435f98fe5079d1ff97cf0 /source/blender/editors/transform/transform_orientations.c | |
parent | d9eeb7840f52d9fdbb6c4a5d3f1f2b2944fbcc6e (diff) |
Fix T85471: Wrong orientation in transforming objects in weight paint mode
The local orientation chosen was that of the active object, but as
confirmed in other parts of the code, the orientation of the selected
Bone has priority.
Diffstat (limited to 'source/blender/editors/transform/transform_orientations.c')
-rw-r--r-- | source/blender/editors/transform/transform_orientations.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c index 6d1bb9cc0de..1470d3b7059 100644 --- a/source/blender/editors/transform/transform_orientations.c +++ b/source/blender/editors/transform/transform_orientations.c @@ -609,6 +609,12 @@ short transform_orientation_matrix_get( orientation_index_custom = orientation - V3D_ORIENT_CUSTOM; orientation = V3D_ORIENT_CUSTOM; } + else if (ob && (ob->mode & OB_MODE_ALL_WEIGHT_PAINT) && !(t->options & CTX_PAINT_CURVE)) { + Object *ob_armature = transform_object_deform_pose_armature_get(t, ob); + if (ob_armature) { + ob = ob_armature; + } + } if ((t->spacetype == SPACE_VIEW3D) && t->region && (t->region->regiontype == RGN_TYPE_WINDOW)) { rv3d = t->region->regiondata; |