diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-10-29 07:01:50 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-10-29 07:01:50 +0300 |
commit | 657923cf93952713f230af7b20dfa4930375951f (patch) | |
tree | 7b680e77b294ce05ed4aeed0eef4c71aa64600c4 /source/blender | |
parent | 57f7650dc7af54015dee6e1fcc8f82ec4f496f3b (diff) | |
parent | b546202a9afa5ee358893d82e6a1ba0f69cca254 (diff) |
Merge branch 'blender-v3.0-release'
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/transform/transform_gizmo_3d.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/editors/transform/transform_gizmo_3d.c b/source/blender/editors/transform/transform_gizmo_3d.c index e4c20fa0be1..466c4202dbd 100644 --- a/source/blender/editors/transform/transform_gizmo_3d.c +++ b/source/blender/editors/transform/transform_gizmo_3d.c @@ -646,10 +646,8 @@ int ED_transform_calc_gizmo_stats(const bContext *C, Depsgraph *depsgraph = CTX_data_expect_evaluated_depsgraph(C); ViewLayer *view_layer = CTX_data_view_layer(C); View3D *v3d = area->spacedata.first; - Object *obedit = CTX_data_edit_object(C); RegionView3D *rv3d = region->regiondata; Base *base; - Object *ob = OBACT(view_layer); bGPdata *gpd = CTX_data_gpencil_data(C); const bool is_gp_edit = GPENCIL_ANY_MODE(gpd); const bool is_curve_edit = GPENCIL_CURVE_EDIT_SESSIONS_ON(gpd); @@ -660,6 +658,15 @@ int ED_transform_calc_gizmo_stats(const bContext *C, (params->orientation_index - 1) : BKE_scene_orientation_get_index(scene, SCE_ORIENT_DEFAULT); + Object *ob = OBACT(view_layer); + Object *obedit = OBEDIT_FROM_OBACT(ob); + if (ob && ob->mode & OB_MODE_WEIGHT_PAINT) { + Object *obpose = BKE_object_pose_armature_get(ob); + if (obpose != NULL) { + ob = obpose; + } + } + /* transform widget matrix */ unit_m4(rv3d->twmat); |