From 340c564020f580579e2d7db63ba860527cd72ea3 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 1 May 2019 12:35:00 +1000 Subject: UI: move image paint panels into the image side-bar - Move painting brush panels into the image side-bar. - Add active tool panel to the image side-bar. --- source/blender/editors/space_buttons/space_buttons.c | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) (limited to 'source/blender/editors/space_buttons/space_buttons.c') diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c index 1b1c3bf6d13..f9244049d54 100644 --- a/source/blender/editors/space_buttons/space_buttons.c +++ b/source/blender/editors/space_buttons/space_buttons.c @@ -203,14 +203,14 @@ static void buttons_main_region_layout_properties(const bContext *C, static void buttons_main_region_layout_tool(const bContext *C, ARegion *ar) { - const WorkSpace *workspace = CTX_wm_workspace(C); const enum eContextObjectMode mode = CTX_data_mode_enum(C); const char *contexts_base[5] = {NULL}; contexts_base[0] = ".active_tool"; const char **contexts = &contexts_base[1]; - if (workspace->tools_space_type == SPACE_VIEW3D) { + /* Hard coded to 3D view. */ + { switch (mode) { case CTX_MODE_EDIT_MESH: ARRAY_SET_ITEMS(contexts, ".mesh_edit"); @@ -267,22 +267,6 @@ static void buttons_main_region_layout_tool(const bContext *C, ARegion *ar) break; } } - else if (workspace->tools_space_type == SPACE_IMAGE) { - switch (workspace->tools_mode) { - case SI_MODE_VIEW: - break; - case SI_MODE_PAINT: - ARRAY_SET_ITEMS(contexts, ".paint_common_2d", ".imagepaint_2d"); - break; - case SI_MODE_MASK: - break; - case SI_MODE_UV: - if (mode == CTX_MODE_EDIT_MESH) { - ARRAY_SET_ITEMS(contexts, ".uv_sculpt"); - } - break; - } - } /* for grease pencil we don't use tool system yet, so we need check outside * workspace->tools_space_type because this value is not available -- cgit v1.2.3