diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-07-11 11:38:01 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-07-11 11:49:18 +0300 |
commit | c17611af951e46fb82bf43d7449240f2f829b78f (patch) | |
tree | 51992764ea21b663b68c6aabb11fea843d115474 /source/blender/editors/manipulator_library | |
parent | 64d40c82c324f7029e27ff59a4b1ca3200cddbef (diff) |
Manipulator: changes for overlay options
There are now 3 categories in the overlay popover:
- Navigation
- Active (camera, lamp... etc)
- Tool (manipulator)
The user preference for mini axis now controls if the mini axis
displays minimal or a full-interactive widget.
Part of design: T55863
Diffstat (limited to 'source/blender/editors/manipulator_library')
-rw-r--r-- | source/blender/editors/manipulator_library/manipulator_draw_utils.c | 13 | ||||
-rw-r--r-- | source/blender/editors/manipulator_library/manipulator_types/arrow3d_manipulator.c | 6 |
2 files changed, 1 insertions, 18 deletions
diff --git a/source/blender/editors/manipulator_library/manipulator_draw_utils.c b/source/blender/editors/manipulator_library/manipulator_draw_utils.c index a0b226b7502..80181c57115 100644 --- a/source/blender/editors/manipulator_library/manipulator_draw_utils.c +++ b/source/blender/editors/manipulator_library/manipulator_draw_utils.c @@ -59,12 +59,11 @@ /** * Main draw call for ManipulatorGeomInfo data */ -void wm_manipulator_geometryinfo_draw(const ManipulatorGeomInfo *info, const bool select, const float color[4]) +void wm_manipulator_geometryinfo_draw(const ManipulatorGeomInfo *info, const bool UNUSED(select), const float color[4]) { /* TODO store the Batches inside the ManipulatorGeomInfo and updated it when geom changes * So we don't need to re-created and discard it every time */ - const bool use_lighting = true || (!select && ((U.manipulator_flag & USER_MANIPULATOR_SHADED) != 0)); Gwn_VertBuf *vbo; Gwn_IndexBuf *el; Gwn_Batch *batch; @@ -72,11 +71,6 @@ void wm_manipulator_geometryinfo_draw(const ManipulatorGeomInfo *info, const boo Gwn_VertFormat format = {0}; uint pos_id = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT); - uint nor_id; - - if (use_lighting) { - nor_id = GWN_vertformat_attr_add(&format, "nor", GWN_COMP_I16, 3, GWN_FETCH_INT_TO_FLOAT_UNIT); - } /* Elements */ GWN_indexbuf_init(&elb, GWN_PRIM_TRIS, info->ntris, info->nverts); @@ -91,11 +85,6 @@ void wm_manipulator_geometryinfo_draw(const ManipulatorGeomInfo *info, const boo GWN_vertbuf_attr_fill(vbo, pos_id, info->verts); - if (use_lighting) { - /* Normals are expected to be smooth. */ - GWN_vertbuf_attr_fill(vbo, nor_id, info->normals); - } - batch = GWN_batch_create_ex(GWN_PRIM_TRIS, vbo, el, GWN_BATCH_OWNS_VBO | GWN_BATCH_OWNS_INDEX); GWN_batch_program_set_builtin(batch, GPU_SHADER_3D_UNIFORM_COLOR); diff --git a/source/blender/editors/manipulator_library/manipulator_types/arrow3d_manipulator.c b/source/blender/editors/manipulator_library/manipulator_types/arrow3d_manipulator.c index a5bcef7ed5e..0430a12bc99 100644 --- a/source/blender/editors/manipulator_library/manipulator_types/arrow3d_manipulator.c +++ b/source/blender/editors/manipulator_library/manipulator_types/arrow3d_manipulator.c @@ -163,16 +163,10 @@ static void arrow_draw_geom(const ArrowManipulator3D *arrow, const bool select, const float len = 0.25f; const float width = 0.06f; - const bool use_lighting = (!select && ((U.manipulator_flag & USER_MANIPULATOR_SHADED) != 0)); /* translate to line end */ gpuTranslate3f(0.0f, 0.0f, arrow_length); - if (use_lighting) { - immUnbindProgram(); - immBindBuiltinProgram(GPU_SHADER_3D_SMOOTH_COLOR); - } - imm_draw_circle_fill_3d(pos, 0.0, 0.0, width, 8); imm_draw_cylinder_fill_3d(pos, width, 0.0, len, 8, 1); } |