diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2014-07-18 13:09:28 +0400 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2014-07-20 12:47:41 +0400 |
commit | 32a7cf4db9f9f9f8f5bfe377c53be8eae04008c7 (patch) | |
tree | 0492ae001689a45681f1aeb8dcaf375eaaa2c4cd /source/blender/editors/space_view3d | |
parent | cfd131bcbb6b0a48cd8ef65a7be8cfb68dfd26d2 (diff) |
cursor transform WIP for curves
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_header.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c index e3d0e87066b..9bd0c8cb9dd 100644 --- a/source/blender/editors/space_view3d/view3d_header.c +++ b/source/blender/editors/space_view3d/view3d_header.c @@ -32,6 +32,7 @@ #include <stdio.h> #include <stdlib.h> +#include "DNA_brush_types.h" #include "DNA_scene_types.h" #include "DNA_object_types.h" @@ -45,6 +46,7 @@ #include "BKE_depsgraph.h" #include "BKE_main.h" #include "BKE_modifier.h" +#include "BKE_paint.h" #include "BKE_screen.h" #include "BKE_editmesh.h" @@ -336,8 +338,10 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C) uiItemR(layout, &v3dptr, "viewport_shade", UI_ITEM_R_ICON_ONLY, "", ICON_NONE); if (obedit == NULL && is_paint) { + Paint *p = BKE_paint_get_active(scene); + Brush *br = BKE_paint_brush(p); - if (ob->mode & OB_MODE_WEIGHT_PAINT) { + if ((ob->mode & OB_MODE_WEIGHT_PAINT) || (br && (br->flag & BRUSH_CURVE))) { /* 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); |