Fix edit-curve display for hidden handles

When the first handle was hidden, all others would show as hidden too.
This commit is contained in:
Campbell Barton 2019-02-19 10:04:15 +11:00
parent 53e95a982c
commit ec57d76db8
Notes: blender-bot 2023-02-14 04:46:12 +01:00
Referenced by issue #61714, set image path via python crash
Referenced by issue #61712, crash when reloading texture
1 changed files with 3 additions and 3 deletions

View File

@ -739,12 +739,12 @@ static void curve_create_edit_data_and_handles(
for (Nurb *nu = rdata->nurbs->first; nu; nu = nu->next, nu_id++) {
const BezTriple *bezt = nu->bezt;
const BPoint *bp = nu->bp;
if (bezt && bezt->hide == false) {
if (bezt) {
for (int a = 0; a < nu->pntsu; a++, bezt++) {
if (elbp_verts) {
if (elbp_verts && bezt->hide == false) {
GPU_indexbuf_add_point_vert(elbp_verts, vbo_len_used + 1);
}
if (elbp_lines) {
if (elbp_lines && bezt->hide == false) {
GPU_indexbuf_add_line_verts(elbp_lines, vbo_len_used + 1, vbo_len_used + 0);
GPU_indexbuf_add_line_verts(elbp_lines, vbo_len_used + 1, vbo_len_used + 2);
}