From bd2034a749a9a9d2dbd058b858aa590710d6e11a Mon Sep 17 00:00:00 2001 From: Gaia Clary Date: Tue, 26 Feb 2013 18:35:16 +0000 Subject: [PATCH] Add: [#34443] Ability to set 'Pivot Center for rotation/scale' missing in weight paint mode --- source/blender/editors/space_view3d/view3d_header.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c index 7161014396a..e078fa8eda1 100644 --- a/source/blender/editors/space_view3d/view3d_header.c +++ b/source/blender/editors/space_view3d/view3d_header.c @@ -453,6 +453,13 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C) uiItemR(layout, &v3dptr, "viewport_shade", UI_ITEM_R_ICON_ONLY, "", ICON_NONE); if (obedit == NULL && is_paint) { + + if (ob->mode & OB_MODE_WEIGHT_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); + } + /* 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 */ @@ -476,7 +483,9 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C) 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 */ + * 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); }