diff options
author | Hans Goudey <h.goudey@me.com> | 2022-02-18 18:50:29 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-02-18 18:50:29 +0300 |
commit | ddf189892c596d939228cc531b775bfd6708bb2d (patch) | |
tree | cb3b28527696ef5a6a3eec581a55e6141c2e686d /source/blender/editors/curve/editcurve.c | |
parent | 48b17da1d9fe4d559c5b0fa58029df05a45d3960 (diff) |
Cleanup: Rename original curve object type enum
This commit renames enums related the "Curve" object type and ID type
to add `_LEGACY` to the end. The idea is to make our aspirations clearer
in the code and to avoid ambiguities between `CURVE` and `CURVES`.
Ref T95355
To summarize for the record, the plans are:
- In the short/medium term, replace the `Curve` object data type with
`Curves`
- In the longer term (no immediate plans), use a proper data block for
3D text and surfaces.
Differential Revision: https://developer.blender.org/D14114
Diffstat (limited to 'source/blender/editors/curve/editcurve.c')
-rw-r--r-- | source/blender/editors/curve/editcurve.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index 20a2251b6e1..a33fbb29f85 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -72,7 +72,7 @@ static bool curve_delete_vertices(Object *obedit, View3D *v3d); ListBase *object_editcurve_get(Object *ob) { - if (ob && ELEM(ob->type, OB_CURVE, OB_SURF)) { + if (ob && ELEM(ob->type, OB_CURVES_LEGACY, OB_SURF)) { Curve *cu = ob->data; return &cu->editnurb->nurbs; } @@ -1238,7 +1238,7 @@ void ED_curve_editnurb_load(Main *bmain, Object *obedit) return; } - if (ELEM(obedit->type, OB_CURVE, OB_SURF)) { + if (ELEM(obedit->type, OB_CURVES_LEGACY, OB_SURF)) { Curve *cu = obedit->data; ListBase newnurb = {NULL, NULL}, oldnurb = cu->nurb; @@ -1273,7 +1273,7 @@ void ED_curve_editnurb_make(Object *obedit) EditNurb *editnurb = cu->editnurb; KeyBlock *actkey; - if (ELEM(obedit->type, OB_CURVE, OB_SURF)) { + if (ELEM(obedit->type, OB_CURVES_LEGACY, OB_SURF)) { actkey = BKE_keyblock_from_object(obedit); if (actkey) { @@ -5637,7 +5637,7 @@ static int curve_extrude_exec(bContext *C, wmOperator *UNUSED(op)) } /* First test: curve? */ - if (obedit->type != OB_CURVE) { + if (obedit->type != OB_CURVES_LEGACY) { LISTBASE_FOREACH (Nurb *, nu, &editnurb->nurbs) { if ((nu->pntsv == 1) && (ED_curve_nurb_select_count(v3d, nu) < nu->pntsu)) { as_curve = true; @@ -5646,7 +5646,7 @@ static int curve_extrude_exec(bContext *C, wmOperator *UNUSED(op)) } } - if (obedit->type == OB_CURVE || as_curve) { + if (obedit->type == OB_CURVES_LEGACY || as_curve) { changed = ed_editcurve_extrude(cu, editnurb, v3d); } else { @@ -6715,7 +6715,7 @@ static int shade_smooth_exec(bContext *C, wmOperator *op) Object *obedit = objects[ob_index]; ListBase *editnurb = object_editcurve_get(obedit); - if (obedit->type != OB_CURVE) { + if (obedit->type != OB_CURVES_LEGACY) { continue; } @@ -6874,7 +6874,7 @@ int ED_curve_join_objects_exec(bContext *C, wmOperator *op) cu = ob_active->data; BLI_movelisttolist(&cu->nurb, &tempbase); - if (ob_active->type == OB_CURVE && CU_IS_2D(cu)) { + if (ob_active->type == OB_CURVES_LEGACY && CU_IS_2D(cu)) { /* Account for mixed 2D/3D curves when joining */ BKE_curve_dimension_update(cu); } @@ -6984,7 +6984,7 @@ static bool match_texture_space_poll(bContext *C) { Object *object = CTX_data_active_object(C); - return object && ELEM(object->type, OB_CURVE, OB_SURF, OB_FONT); + return object && ELEM(object->type, OB_CURVES_LEGACY, OB_SURF, OB_FONT); } static int match_texture_space_exec(bContext *C, wmOperator *UNUSED(op)) |