diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2017-01-05 02:09:42 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2017-01-05 02:14:25 +0300 |
commit | 82b9e1e3126a5c9de36d57d2d04edd11f00de9a5 (patch) | |
tree | 9b7e867db691263a01864f8fc0839944a51bc0d1 /source/blender/editors/space_view3d/view3d_header.c | |
parent | b86042f21a8d905bea91af7c04b1265b7517f4cf (diff) |
Show 'Manipulate Center Points' in weight paint mode
If the active object is in weight paint mode, but some armatures in pose mode, 'manipulate center points' still affects the transformation. See bd2034a749a9a9.
Also removed redundant check, we basically did the same check for paint modes twice.
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_header.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_header.c | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c index 0713377d210..bf1bdf68619 100644 --- a/source/blender/editors/space_view3d/view3d_header.c +++ b/source/blender/editors/space_view3d/view3d_header.c @@ -337,13 +337,13 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C) /* Draw type */ uiItemR(layout, &v3dptr, "viewport_shade", UI_ITEM_R_ICON_ONLY, "", ICON_NONE); - if (obedit == NULL && is_paint) { - if (ob->mode & OB_MODE_ALL_PAINT) { - /* Only for Weight Paint. makes no sense in other paint modes. */ - row = uiLayoutRow(layout, true); - uiItemR(row, &v3dptr, "pivot_point", UI_ITEM_R_ICON_ONLY, "", ICON_NONE); - } + row = uiLayoutRow(layout, true); + uiItemR(row, &v3dptr, "pivot_point", UI_ITEM_R_ICON_ONLY, "", ICON_NONE); + if (!ob || ELEM(ob->mode, OB_MODE_OBJECT, OB_MODE_POSE, OB_MODE_WEIGHT_PAINT)) { + uiItemR(row, &v3dptr, "use_pivot_point_align", UI_ITEM_R_ICON_ONLY, "", ICON_NONE); + } + if (obedit == NULL && is_paint) { /* Manipulators aren't used in paint modes */ if (!ELEM(ob->mode, OB_MODE_SCULPT, OB_MODE_PARTICLE_EDIT)) { /* masks aren't used for sculpt and particle painting */ @@ -361,17 +361,6 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C) } } else { - row = uiLayoutRow(layout, true); - uiItemR(row, &v3dptr, "pivot_point", UI_ITEM_R_ICON_ONLY, "", ICON_NONE); - - /* pose/object only however we want to allow in weight paint mode too - * so don't be totally strict and just check not-editmode for now - * XXX We never get here when we are in Weight Paint mode - */ - if (obedit == NULL) { - uiItemR(row, &v3dptr, "use_pivot_point_align", UI_ITEM_R_ICON_ONLY, "", ICON_NONE); - } - /* Transform widget / manipulators */ row = uiLayoutRow(layout, true); uiItemR(row, &v3dptr, "show_manipulator", UI_ITEM_R_ICON_ONLY, "", ICON_NONE); |