diff options
author | Hans Goudey <h.goudey@me.com> | 2021-06-29 05:17:19 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-06-29 05:17:19 +0300 |
commit | d6480167adec8310097a64fb11eab34daae7b327 (patch) | |
tree | 2fa286db14f6da05f89c3814cb92afd4c318f8de /source | |
parent | 60a2038fbaaf78b3019e6375e28904f2a124e78d (diff) |
Cleanup: Order return arguments last, use r_ prefix
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/displist.cc | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/source/blender/blenkernel/intern/displist.cc b/source/blender/blenkernel/intern/displist.cc index 757c86681e0..789b0a92da0 100644 --- a/source/blender/blenkernel/intern/displist.cc +++ b/source/blender/blenkernel/intern/displist.cc @@ -1095,9 +1095,9 @@ static void displist_surf_indices(DispList *dl) static void displist_make_surf(Depsgraph *depsgraph, const Scene *scene, Object *ob, - ListBase *dispbase, - Mesh **r_final, - const bool for_render) + const bool for_render, + ListBase *r_dispbase, + Mesh **r_final) { ListBase nubase = {nullptr, nullptr}; const Curve *cu = (const Curve *)ob->data; @@ -1112,7 +1112,7 @@ static void displist_make_surf(Depsgraph *depsgraph, bool force_mesh_conversion = BKE_curve_calc_modifiers_pre( depsgraph, scene, ob, &nubase, &nubase, for_render); - LISTBASE_FOREACH (Nurb *, nu, &nubase) { + LISTBASE_FOREACH (const Nurb *, nu, &nubase) { if (!(for_render || nu->hide == 0) || !BKE_nurb_check_valid_uv(nu)) { continue; } @@ -1126,7 +1126,7 @@ static void displist_make_surf(Depsgraph *depsgraph, DispList *dl = (DispList *)MEM_callocN(sizeof(DispList), "makeDispListsurf"); dl->verts = (float *)MEM_mallocN(len * sizeof(float[3]), "dlverts"); - BLI_addtail(dispbase, dl); + BLI_addtail(r_dispbase, dl); dl->parts = 1; dl->nr = len; dl->col = nu->mat_nr; @@ -1148,7 +1148,7 @@ static void displist_make_surf(Depsgraph *depsgraph, DispList *dl = (DispList *)MEM_callocN(sizeof(DispList), "makeDispListsurf"); dl->verts = (float *)MEM_mallocN(len * sizeof(float[3]), "dlverts"); - BLI_addtail(dispbase, dl); + BLI_addtail(r_dispbase, dl); dl->col = nu->mat_nr; dl->charidx = nu->charidx; @@ -1175,7 +1175,7 @@ static void displist_make_surf(Depsgraph *depsgraph, BKE_nurbList_duplicate(&ob->runtime.curve_cache->deformed_nurbs, &nubase); curve_calc_modifiers_post( - depsgraph, scene, ob, dispbase, for_render, force_mesh_conversion, r_final); + depsgraph, scene, ob, r_dispbase, for_render, force_mesh_conversion, r_final); BKE_nurbList_free(&nubase); } @@ -1400,8 +1400,8 @@ static void calc_bevfac_mapping(const Curve *cu, static void do_makeDispListCurveTypes(Depsgraph *depsgraph, const Scene *scene, Object *ob, - ListBase *dispbase, const bool for_render, + ListBase *r_dispbase, Mesh **r_final) { const Curve *cu = (const Curve *)ob->data; @@ -1412,7 +1412,7 @@ static void do_makeDispListCurveTypes(Depsgraph *depsgraph, } if (ob->type == OB_SURF) { - displist_make_surf(depsgraph, scene, ob, dispbase, r_final, for_render); + displist_make_surf(depsgraph, scene, ob, for_render, r_dispbase, r_final); return; } @@ -1442,7 +1442,7 @@ static void do_makeDispListCurveTypes(Depsgraph *depsgraph, /* no bevel or extrude, and no width correction? */ if (BLI_listbase_is_empty(&dlbev) && cu->width == 1.0f) { - curve_to_displist(cu, &nubase, for_render, dispbase); + curve_to_displist(cu, &nubase, for_render, r_dispbase); } else { const float widfac = cu->width - 1.0f; @@ -1460,7 +1460,7 @@ static void do_makeDispListCurveTypes(Depsgraph *depsgraph, if (BLI_listbase_is_empty(&dlbev)) { DispList *dl = (DispList *)MEM_callocN(sizeof(DispList), "makeDispListbev"); dl->verts = (float *)MEM_mallocN(sizeof(float[3]) * bl->nr, "dlverts"); - BLI_addtail(dispbase, dl); + BLI_addtail(r_dispbase, dl); if (bl->poly != -1) { dl->type = DL_POLY; @@ -1510,7 +1510,7 @@ static void do_makeDispListCurveTypes(Depsgraph *depsgraph, /* for each part of the bevel use a separate displblock */ DispList *dl = (DispList *)MEM_callocN(sizeof(DispList), "makeDispListbev1"); dl->verts = data = (float *)MEM_mallocN(sizeof(float[3]) * dlb->nr * steps, "dlverts"); - BLI_addtail(dispbase, dl); + BLI_addtail(r_dispbase, dl); dl->type = DL_SURF; @@ -1606,8 +1606,8 @@ static void do_makeDispListCurveTypes(Depsgraph *depsgraph, } if (bottom_capbase.first) { - BKE_displist_fill(&bottom_capbase, dispbase, bottom_no, false); - BKE_displist_fill(&top_capbase, dispbase, top_no, false); + BKE_displist_fill(&bottom_capbase, r_dispbase, bottom_no, false); + BKE_displist_fill(&top_capbase, r_dispbase, top_no, false); BKE_displist_free(&bottom_capbase); BKE_displist_free(&top_capbase); } @@ -1617,7 +1617,7 @@ static void do_makeDispListCurveTypes(Depsgraph *depsgraph, } if (!(cu->flag & CU_DEFORM_FILL)) { - curve_to_filledpoly(cu, dispbase); + curve_to_filledpoly(cu, r_dispbase); } if ((cu->flag & CU_PATH) || @@ -1627,10 +1627,10 @@ static void do_makeDispListCurveTypes(Depsgraph *depsgraph, BKE_nurbList_duplicate(&ob->runtime.curve_cache->deformed_nurbs, &nubase); curve_calc_modifiers_post( - depsgraph, scene, ob, dispbase, for_render, force_mesh_conversion, r_final); + depsgraph, scene, ob, r_dispbase, for_render, force_mesh_conversion, r_final); if (cu->flag & CU_DEFORM_FILL && !ob->runtime.data_eval) { - curve_to_filledpoly(cu, dispbase); + curve_to_filledpoly(cu, r_dispbase); } BKE_nurbList_free(&nubase); @@ -1653,7 +1653,7 @@ void BKE_displist_make_curveTypes(Depsgraph *depsgraph, ListBase *dispbase = &(ob->runtime.curve_cache->disp); Mesh *mesh_eval = nullptr; - do_makeDispListCurveTypes(depsgraph, scene, ob, dispbase, for_render, &mesh_eval); + do_makeDispListCurveTypes(depsgraph, scene, ob, for_render, dispbase, &mesh_eval); if (mesh_eval != nullptr) { BKE_object_eval_assign_data(ob, &mesh_eval->id, true); @@ -1670,7 +1670,7 @@ void BKE_displist_make_curveTypes_forRender( "CurveCache for Curve"); } - do_makeDispListCurveTypes(depsgraph, scene, ob, dispbase, true, r_final); + do_makeDispListCurveTypes(depsgraph, scene, ob, true, dispbase, r_final); } void BKE_displist_minmax(const ListBase *dispbase, float min[3], float max[3]) |