diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-08-08 10:06:24 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-08-09 11:02:10 +0300 |
commit | 00f22403ac9dce95117cb6ef5c948f1da881f05d (patch) | |
tree | d02eb2b0a6cb46e0b13a0d250456972c50f45d23 /source/blender/editors/mesh | |
parent | fdb1c81117a3595044d65aef5e6ecfafe30471e7 (diff) |
Manipulator: replace hard coded color w/ theme
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r-- | source/blender/editors/mesh/editmesh_bisect.c | 6 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_extrude.c | 8 |
2 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/editors/mesh/editmesh_bisect.c b/source/blender/editors/mesh/editmesh_bisect.c index 9b97484c8d9..9f011140e49 100644 --- a/source/blender/editors/mesh/editmesh_bisect.c +++ b/source/blender/editors/mesh/editmesh_bisect.c @@ -50,6 +50,8 @@ #include "ED_screen.h" #include "ED_view3d.h" +#include "UI_resources.h" + #include "mesh_intern.h" /* own include */ #define USE_MANIPULATOR @@ -619,6 +621,10 @@ static void manipulator_mesh_bisect_setup(const bContext *C, wmManipulatorGroup man->translate_c = WM_manipulator_new_ptr(wt_grab, mgroup, NULL); man->rotate_c = WM_manipulator_new_ptr(wt_dial, mgroup, NULL); + UI_GetThemeColor3fv(TH_MANIPULATOR_PRIMARY, man->translate_z->color); + UI_GetThemeColor3fv(TH_MANIPULATOR_PRIMARY, man->translate_c->color); + UI_GetThemeColor3fv(TH_MANIPULATOR_SECONDARY, man->rotate_c->color); + RNA_enum_set(man->translate_z->ptr, "draw_style", ED_MANIPULATOR_ARROW_STYLE_NORMAL); RNA_enum_set(man->translate_c->ptr, "draw_style", ED_MANIPULATOR_GRAB_STYLE_RING); diff --git a/source/blender/editors/mesh/editmesh_extrude.c b/source/blender/editors/mesh/editmesh_extrude.c index e7be66e0276..315882bd764 100644 --- a/source/blender/editors/mesh/editmesh_extrude.c +++ b/source/blender/editors/mesh/editmesh_extrude.c @@ -53,6 +53,8 @@ #include "ED_transform.h" #include "ED_view3d.h" +#include "UI_resources.h" + #include "MEM_guardedalloc.h" #include "mesh_intern.h" /* own include */ @@ -1083,6 +1085,12 @@ static void manipulator_mesh_spin_setup(const bContext *C, wmManipulatorGroup *m man->rotate_c = WM_manipulator_new_ptr(wt_dial, mgroup, NULL); man->angle_z = WM_manipulator_new_ptr(wt_dial, mgroup, NULL); + UI_GetThemeColor3fv(TH_MANIPULATOR_PRIMARY, man->translate_z->color); + UI_GetThemeColor3fv(TH_MANIPULATOR_PRIMARY, man->translate_c->color); + UI_GetThemeColor3fv(TH_MANIPULATOR_SECONDARY, man->rotate_c->color); + UI_GetThemeColor3fv(TH_AXIS_Z, man->angle_z->color); + + RNA_enum_set(man->translate_z->ptr, "draw_style", ED_MANIPULATOR_ARROW_STYLE_NORMAL); RNA_enum_set(man->translate_c->ptr, "draw_style", ED_MANIPULATOR_GRAB_STYLE_RING); |