diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2018-09-26 08:57:04 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2018-09-26 09:05:13 +0300 |
commit | bb8023ff7f1a2b27dca92c8f8d147768b2206da0 (patch) | |
tree | 3d280aef182b58e398e59d17f1870d808a027bfe /source | |
parent | f5c4cc877eb7fd6383f160a8d371dab93b36632d (diff) |
Fix misleading field naming.
This is not any kind of length, it is the number of true values.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenlib/intern/expr_pylike_eval.c | 2 | ||||
-rw-r--r-- | source/blender/draw/intern/draw_cache.c | 8 | ||||
-rw-r--r-- | source/blender/draw/intern/draw_cache_impl.h | 4 | ||||
-rw-r--r-- | source/blender/draw/intern/draw_cache_impl_mesh.c | 4 |
4 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/blenlib/intern/expr_pylike_eval.c b/source/blender/blenlib/intern/expr_pylike_eval.c index dde296fbd43..7bcf32dd880 100644 --- a/source/blender/blenlib/intern/expr_pylike_eval.c +++ b/source/blender/blenlib/intern/expr_pylike_eval.c @@ -43,7 +43,7 @@ * - Operators: * +, -, *, /, ==, !=, <, <=, >, >=, and, or, not, ternary if * - Functions: - * radians, degrees, + * min, max, radians, degrees, * abs, fabs, floor, ceil, trunc, int, * sin, cos, tan, asin, acos, atan, atan2, * exp, log, sqrt, pow, fmod diff --git a/source/blender/draw/intern/draw_cache.c b/source/blender/draw/intern/draw_cache.c index 301aa7c9970..9e6e50bb516 100644 --- a/source/blender/draw/intern/draw_cache.c +++ b/source/blender/draw/intern/draw_cache.c @@ -2973,19 +2973,19 @@ GPUBatch *DRW_cache_mesh_surface_weights_get(Object *ob, ToolSettings *ts, bool if (paint_mode && ts->multipaint) { /* Multipaint needs to know all selected bones, not just the active group. * This is actually a relatively expensive operation, but caching would be difficult. */ - wstate.defgroup_sel = BKE_object_defgroup_selected_get(ob, wstate.defgroup_len, &wstate.defgroup_sel_len); + wstate.defgroup_sel = BKE_object_defgroup_selected_get(ob, wstate.defgroup_len, &wstate.defgroup_sel_count); - if (wstate.defgroup_sel_len > 1) { + if (wstate.defgroup_sel_count > 1) { wstate.flags |= DRW_MESH_WEIGHT_STATE_MULTIPAINT | (ts->auto_normalize ? DRW_MESH_WEIGHT_STATE_AUTO_NORMALIZE : 0); if (me->editflag & ME_EDIT_MIRROR_X) { BKE_object_defgroup_mirror_selection( - ob, wstate.defgroup_len, wstate.defgroup_sel, wstate.defgroup_sel, &wstate.defgroup_sel_len); + ob, wstate.defgroup_len, wstate.defgroup_sel, wstate.defgroup_sel, &wstate.defgroup_sel_count); } } /* With only one selected bone Multipaint reverts to regular mode. */ else { - wstate.defgroup_sel_len = 0; + wstate.defgroup_sel_count = 0; MEM_SAFE_FREE(wstate.defgroup_sel); } } diff --git a/source/blender/draw/intern/draw_cache_impl.h b/source/blender/draw/intern/draw_cache_impl.h index ca14d6ae3cc..4bd0046a48a 100644 --- a/source/blender/draw/intern/draw_cache_impl.h +++ b/source/blender/draw/intern/draw_cache_impl.h @@ -105,8 +105,8 @@ struct DRW_MeshWeightState { char alert_mode; /* Set of all selected bones for Multipaint. */ - bool *defgroup_sel; - int defgroup_sel_len; + bool *defgroup_sel; /* [defgroup_len] */ + int defgroup_sel_count; }; /* DRW_MeshWeightState.flags */ diff --git a/source/blender/draw/intern/draw_cache_impl_mesh.c b/source/blender/draw/intern/draw_cache_impl_mesh.c index cc3360d76e9..0e451fe12a6 100644 --- a/source/blender/draw/intern/draw_cache_impl_mesh.c +++ b/source/blender/draw/intern/draw_cache_impl_mesh.c @@ -1127,7 +1127,7 @@ static void evaluate_vertex_weight(float vweight[3], const MDeformVert *dvert, c if (wstate->flags & DRW_MESH_WEIGHT_STATE_MULTIPAINT) { /* Multi-Paint feature */ input = BKE_defvert_multipaint_collective_weight( - dvert, wstate->defgroup_len, wstate->defgroup_sel, wstate->defgroup_sel_len, + dvert, wstate->defgroup_len, wstate->defgroup_sel, wstate->defgroup_sel_count, (wstate->flags & DRW_MESH_WEIGHT_STATE_AUTO_NORMALIZE) != 0); /* make it black if the selected groups have no weight on a vertex */ @@ -1624,7 +1624,7 @@ bool DRW_mesh_weight_state_compare(const struct DRW_MeshWeightState *a, const st a->defgroup_len == b->defgroup_len && a->flags == b->flags && a->alert_mode == b->alert_mode && - a->defgroup_sel_len == b->defgroup_sel_len && + a->defgroup_sel_count == b->defgroup_sel_count && ((!a->defgroup_sel && !b->defgroup_sel) || (a->defgroup_sel && b->defgroup_sel && memcmp(a->defgroup_sel, b->defgroup_sel, a->defgroup_len * sizeof(bool)) == 0)); |