diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-03-25 07:40:23 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-03-25 07:40:43 +0300 |
commit | b67c3a0db9173ac400b1d0593a72f2aa23c66bab (patch) | |
tree | c660321e6484a42fa3f578e122ed320546f4d062 /source/blender/editors/gizmo_library/gizmo_types/move3d_gizmo.c | |
parent | f3cff06087c717669e28c60adbac13deca939645 (diff) |
Gizmo: add option to move & dial gizmos to select as filled
Draw as an outline while using solid selection.
Diffstat (limited to 'source/blender/editors/gizmo_library/gizmo_types/move3d_gizmo.c')
-rw-r--r-- | source/blender/editors/gizmo_library/gizmo_types/move3d_gizmo.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/editors/gizmo_library/gizmo_types/move3d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/move3d_gizmo.c index 0fe5a4e7d80..3870ce984b5 100644 --- a/source/blender/editors/gizmo_library/gizmo_types/move3d_gizmo.c +++ b/source/blender/editors/gizmo_library/gizmo_types/move3d_gizmo.c @@ -104,7 +104,11 @@ static void move_geom_draw( wm_gizmo_geometryinfo_draw(&wm_gizmo_geom_data_move3d, select); #else const int draw_style = RNA_enum_get(gz->ptr, "draw_style"); - const bool filled = (draw_options & ED_GIZMO_MOVE_DRAW_FLAG_FILL) != 0; + const bool filled = ( + (draw_options & + (select ? + (ED_GIZMO_MOVE_DRAW_FLAG_FILL | ED_GIZMO_MOVE_DRAW_FLAG_FILL_SELECT) : + ED_GIZMO_MOVE_DRAW_FLAG_FILL))); GPU_line_width(gz->line_width); @@ -440,6 +444,7 @@ static void GIZMO_GT_move_3d(wmGizmoType *gzt) }; static EnumPropertyItem rna_enum_draw_options[] = { {ED_GIZMO_MOVE_DRAW_FLAG_FILL, "FILL", 0, "Filled", ""}, + {ED_GIZMO_MOVE_DRAW_FLAG_FILL_SELECT, "FILL_SELECT", 0, "Use fill for selection test", ""}, {ED_GIZMO_MOVE_DRAW_FLAG_ALIGN_VIEW, "ALIGN_VIEW", 0, "Align View", ""}, {0, NULL, 0, NULL, NULL}, }; |