diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2020-05-01 15:35:29 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2020-05-01 15:35:29 +0300 |
commit | d49b148459502535c2faf1ddc2b85df78cbae836 (patch) | |
tree | 17aef98529fe2e92150959c0d6ece692050e5cb6 /source/blender/editors | |
parent | 185e1d53950faa9b56c812793f2bbda21d7489f8 (diff) |
Revert "Improve proportional edit drawing"
Accident!
This reverts commit ae049a6c6ac545b2c9eadf759f40ad864f436ff1.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/transform/transform_constraints.c | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/source/blender/editors/transform/transform_constraints.c b/source/blender/editors/transform/transform_constraints.c index 195057460fe..3d4fdba9bce 100644 --- a/source/blender/editors/transform/transform_constraints.c +++ b/source/blender/editors/transform/transform_constraints.c @@ -822,72 +822,6 @@ void drawConstraint(TransInfo *t) } } -static void drawPropVerts(TransInfo *t) -{ - if (ELEM(t->mode, TFM_EDGE_SLIDE, TFM_VERT_SLIDE)) { - return; - } - - int vec_len; - if (t->spacetype == SPACE_VIEW3D) { - vec_len = 3; - } - else if (t->spacetype == SPACE_IMAGE) { - vec_len = 2; - } - else { - return; - } - - const float vertex_size = UI_GetThemeValuef(TH_VERTEX_SIZE) * 1.666f; - float color[3]; - UI_GetThemeColor3fv(TH_EDITMESH_ACTIVE, color); - - GPUVertFormat *format = immVertexFormat(); - uint pos = GPU_vertformat_attr_add(format, "pos", GPU_COMP_F32, vec_len, GPU_FETCH_FLOAT); - uint col = GPU_vertformat_attr_add(format, "color", GPU_COMP_F32, 4, GPU_FETCH_FLOAT); - if (vec_len == 3) { - immBindBuiltinProgram(GPU_SHADER_3D_FLAT_COLOR); - } - else { - immBindBuiltinProgram(GPU_SHADER_2D_FLAT_COLOR); - } - - GPU_point_size(vertex_size); - GPU_blend(true); - - FOREACH_TRANS_DATA_CONTAINER (t, tc) { - if (tc->use_local_mat) { - GPU_matrix_push(); - GPU_matrix_mul(tc->mat); - } - - immBeginAtMost(GPU_PRIM_POINTS, tc->data_len); - for (int i = 0; i < tc->data_len; i++) { - TransData td = tc->data[i]; - if (td.factor == 0.0) { - break; - } - - immAttr4f(col, UNPACK3(color), td.factor * 0.5f); - if (vec_len == 3) { - immVertex3fv(pos, td.loc); - } - else { - immVertex2fv(pos, td.loc); - } - } - immEnd(); - - if (tc->use_local_mat) { - GPU_matrix_pop(); - } - } - - GPU_blend(false); - immUnbindProgram(); -} - /* called from drawview.c, as an extra per-window draw option */ void drawPropCircle(const struct bContext *C, TransInfo *t) { @@ -940,8 +874,6 @@ void drawPropCircle(const struct bContext *C, TransInfo *t) immUnbindProgram(); - drawPropVerts(t); - if (depth_test_enabled) { GPU_depth_test(true); } |