diff options
5 files changed, 24 insertions, 13 deletions
diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c index 5632ae28960..f4485b2565e 100644 --- a/source/blender/blenkernel/intern/curve.c +++ b/source/blender/blenkernel/intern/curve.c @@ -4337,14 +4337,17 @@ void BKE_nurbList_handles_autocalc(ListBase *editnurb, uint8_t flag) } } +/** + * \param code: + * - 1 (#HD_AUTO): set auto-handle. + * - 2 (#HD_VECT): set vector-handle. + * - 3 (#HD_ALIGN) it toggle, vector-handles become #HD_FREE. + * + * - 5: Set align, like 3 but no toggle. + * - 6: Clear align (setting #HD_FREE), like 3 but no toggle. + */ void BKE_nurbList_handles_set(ListBase *editnurb, const char code) { - /* code==1: set autohandle */ - /* code==2: set vectorhandle */ - /* code==3 (HD_ALIGN) it toggle, vectorhandles become HD_FREE */ - /* code==4: sets icu flag to become IPO_AUTO_HORIZ, horizontal extremes on auto-handles */ - /* code==5: Set align, like 3 but no toggle */ - /* code==6: Clear align, like 3 but no toggle */ BezTriple *bezt; int a; diff --git a/source/blender/blenloader/intern/versioning_legacy.c b/source/blender/blenloader/intern/versioning_legacy.c index dc8f7a0305a..5bbdb2ccfd1 100644 --- a/source/blender/blenloader/intern/versioning_legacy.c +++ b/source/blender/blenloader/intern/versioning_legacy.c @@ -1316,13 +1316,13 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) } } - /* btw. armature_rebuild_pose is further only called on leave editmode */ + /* Note: #BKE_pose_rebuild is further only called on leave edit-mode. */ if (ob->type == OB_ARMATURE) { if (ob->pose) { BKE_pose_tag_recalc(bmain, ob->pose); } - /* cannot call stuff now (pointers!), done in setup_app_data */ + /* Cannot call stuff now (pointers!), done in #setup_app_data. */ ob->id.recalc |= ID_RECALC_ALL; /* new generic xray option */ diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index de37ddec885..231e6fbc2d9 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -3101,7 +3101,8 @@ static bool merge_firstlast(BMEditMesh *em, * so do extra check for data here */ - /* do sanity check in mergemenu in edit.c ?*/ + /* While #merge_type_itemf does a sanity check, this operation runs on all edit-mode objects. + * Some of them may not have the expected selection state. */ if (use_first == false) { if (!em->bm->selected.last || ((BMEditSelection *)em->bm->selected.last)->htype != BM_VERT) { return false; diff --git a/source/blender/editors/sculpt_paint/paint_vertex_color_utils.c b/source/blender/editors/sculpt_paint/paint_vertex_color_utils.c index 7120f6a8748..dbc6044d2d8 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex_color_utils.c +++ b/source/blender/editors/sculpt_paint/paint_vertex_color_utils.c @@ -610,7 +610,9 @@ BLI_INLINE uint mcol_alpha_sub(uint col_src, int fac) return col_mix; } -/* wpaint has 'ED_wpaint_blend_tool' */ +/** + * \note weight-paint has an equivalent function: #ED_wpaint_blend_tool + */ uint ED_vpaint_blend_tool(const int tool, const uint col, const uint paintcol, const int alpha_i) { switch ((IMB_BlendMode)tool) { diff --git a/source/blender/editors/sculpt_paint/paint_vertex_weight_utils.c b/source/blender/editors/sculpt_paint/paint_vertex_weight_utils.c index dc777572858..a65895a3405 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex_weight_utils.c +++ b/source/blender/editors/sculpt_paint/paint_vertex_weight_utils.c @@ -273,10 +273,15 @@ BLI_INLINE float wval_exclusion(float weight, float paintval, float fac) return temp * fac + weight * mfac; } -/* vpaint has 'vpaint_blend_tool' */ -/* result is not clamped from [0-1] */ +/** + * \param weight: Typically the current weight: #MDeformWeight.weight + * + * \return The final weight, not that this is _not_ clamped from [0-1]. + * Clamping must be done on the final #MDeformWeight.weight + * + * \note vertex-paint has an equivalent function: #ED_vpaint_blend_tool + */ float ED_wpaint_blend_tool(const int tool, - /* dw->weight */ const float weight, const float paintval, const float alpha) |