diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-02-18 15:26:11 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-02-18 15:26:11 +0400 |
commit | 910f04ca6373510f463de2541576b479671dc2ef (patch) | |
tree | 544499dbbab4c371052e54cc1a32e7a60e64206a /source/blender/editors/space_view3d | |
parent | f261d58b6dfd68ae936ed8b76c8399df7a34a071 (diff) | |
parent | f3bef40b0cf2a10bcffedae6c5235e3f5537670f (diff) |
Merged changes in the trunk up to revision 44221.
Conflicts resolved:
release/datafiles/blender_icons.png
source/blender/blenkernel/intern/anim_sys.c
source/blender/blenloader/intern/readfile.c
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r-- | source/blender/editors/space_view3d/space_view3d.c | 1 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_header.c | 29 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_intern.h | 6 |
3 files changed, 20 insertions, 16 deletions
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c index 94ab847c91b..72a068af095 100644 --- a/source/blender/editors/space_view3d/space_view3d.c +++ b/source/blender/editors/space_view3d/space_view3d.c @@ -933,6 +933,7 @@ static void view3d_buttons_area_listener(ARegion *ar, wmNotifier *wmn) ED_region_tag_redraw(ar); break; case NC_TEXTURE: + case NC_MATERIAL: /* for brush textures */ ED_region_tag_redraw(ar); break; diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c index e9b339c0baf..1df0b3a8a4e 100644 --- a/source/blender/editors/space_view3d/view3d_header.c +++ b/source/blender/editors/space_view3d/view3d_header.c @@ -478,6 +478,7 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C) uiBut *but; uiLayout *row; const float dpi_fac= UI_DPI_FAC; + int is_paint = 0; RNA_pointer_create(&screen->id, &RNA_SpaceView3D, v3d, &v3dptr); RNA_pointer_create(&scene->id, &RNA_ToolSettings, ts, &toolsptr); @@ -492,6 +493,7 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C) /* mode */ if(ob) { v3d->modeselect = ob->mode; + is_paint = ELEM4(ob->mode, OB_MODE_SCULPT, OB_MODE_VERTEX_PAINT, OB_MODE_WEIGHT_PAINT,OB_MODE_TEXTURE_PAINT); } else { v3d->modeselect = OB_MODE_OBJECT; @@ -504,20 +506,21 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C) /* Draw type */ uiItemR(layout, &v3dptr, "viewport_shade", UI_ITEM_R_ICON_ONLY, "", ICON_NONE); - if (obedit==NULL && ((ob && ob->mode & (OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_PAINT|OB_MODE_TEXTURE_PAINT)))) { - /* Manipulators aren't used in weight paint mode */ - - PointerRNA meshptr; + 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 */ + PointerRNA meshptr; - RNA_pointer_create(&ob->id, &RNA_Mesh, ob->data, &meshptr); - if(ob->mode & (OB_MODE_TEXTURE_PAINT|OB_MODE_VERTEX_PAINT)) { - uiItemR(layout, &meshptr, "use_paint_mask", UI_ITEM_R_ICON_ONLY, "", ICON_NONE); - } - else { - - row= uiLayoutRow(layout, 1); - uiItemR(row, &meshptr, "use_paint_mask", UI_ITEM_R_ICON_ONLY, "", ICON_NONE); - uiItemR(row, &meshptr, "use_paint_mask_vertex", UI_ITEM_R_ICON_ONLY, "", ICON_NONE); + RNA_pointer_create(&ob->id, &RNA_Mesh, ob->data, &meshptr); + if(ob->mode & (OB_MODE_TEXTURE_PAINT|OB_MODE_VERTEX_PAINT)) { + uiItemR(layout, &meshptr, "use_paint_mask", UI_ITEM_R_ICON_ONLY, "", ICON_NONE); + } + else { + row= uiLayoutRow(layout, 1); + uiItemR(row, &meshptr, "use_paint_mask", UI_ITEM_R_ICON_ONLY, "", ICON_NONE); + uiItemR(row, &meshptr, "use_paint_mask_vertex", UI_ITEM_R_ICON_ONLY, "", ICON_NONE); + } } } else { const char *str_menu; diff --git a/source/blender/editors/space_view3d/view3d_intern.h b/source/blender/editors/space_view3d/view3d_intern.h index 07754c0883c..40037f82376 100644 --- a/source/blender/editors/space_view3d/view3d_intern.h +++ b/source/blender/editors/space_view3d/view3d_intern.h @@ -28,8 +28,8 @@ * \ingroup spview3d */ -#ifndef ED_VIEW3D_INTERN_H -#define ED_VIEW3D_INTERN_H +#ifndef __VIEW3D_INTERN_H__ +#define __VIEW3D_INTERN_H__ #include "ED_view3d.h" @@ -215,5 +215,5 @@ extern float view3d_camera_border_hack_col[4]; extern short view3d_camera_border_hack_test; #endif -#endif /* ED_VIEW3D_INTERN_H */ +#endif /* __VIEW3D_INTERN_H__ */ |