diff options
author | Laurynas Duburas <laurynas> | 2022-03-22 17:54:13 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-03-22 17:54:13 +0300 |
commit | 6bbc3b56108193ed383fcab1261360901c4c340a (patch) | |
tree | 1605841a0ce42db1bc7dab67210cd0dd721d97c5 /source/blender/makesrna/intern/rna_curve_api.c | |
parent | b0aaf6ff4a9731e9142d8cf32ebcc1a01a4f5cc8 (diff) |
Curve: Validation message split from nurb_check_valid
Split retrieval of translated text for the "invalid" messages for NURBS
curves from the actual calculation, which is a lower-level function.
Also fixes an issue where "At least two points required" would always
display in the "Active Spline" panel.
Differential Revision: https://developer.blender.org/D14315
Diffstat (limited to 'source/blender/makesrna/intern/rna_curve_api.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_curve_api.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/source/blender/makesrna/intern/rna_curve_api.c b/source/blender/makesrna/intern/rna_curve_api.c index f31e72ce652..b7be5293578 100644 --- a/source/blender/makesrna/intern/rna_curve_api.c +++ b/source/blender/makesrna/intern/rna_curve_api.c @@ -43,22 +43,19 @@ static void rna_Nurb_valid_message(Nurb *nu, int direction, int *result_len, con int pnts; short order, flag; - const char *dir; if (direction == 0) { pnts = nu->pntsu; order = nu->orderu; flag = nu->flagu; - dir = "U"; } else { pnts = nu->pntsv; order = nu->orderv; flag = nu->flagv; - dir = "V"; } char buf[64]; - if (BKE_nurb_valid_message(pnts, order, flag, type, is_surf, dir, buf, sizeof(buf))) { + if (BKE_nurb_valid_message(pnts, order, flag, type, is_surf, direction, buf, sizeof(buf))) { const int buf_len = strlen(buf); *r_result = BLI_strdupn(buf, buf_len); *result_len = buf_len; |