Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGermano Cavalcante <germano.costa@ig.com.br>2021-02-10 18:27:01 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2021-02-10 18:32:46 +0300
commitbdb83cc32cbd0997752420ef95c791f66dca54c8 (patch)
treefaf31e7434a245d75e0435f98fe5079d1ff97cf0 /source/blender/editors/transform/transform_orientations.c
parentd9eeb7840f52d9fdbb6c4a5d3f1f2b2944fbcc6e (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.c6
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;