From 1ccf577b31febe249ca34339e923d718b19432c4 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Fri, 18 Feb 2022 09:50:29 -0600 Subject: 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 --- source/blender/editors/space_outliner/outliner_draw.cc | 4 ++-- source/blender/editors/space_outliner/outliner_intern.hh | 2 +- source/blender/editors/space_outliner/outliner_select.cc | 2 +- source/blender/editors/space_outliner/outliner_tools.cc | 4 ++-- source/blender/editors/space_outliner/outliner_tree.cc | 2 +- source/blender/editors/space_outliner/tree/tree_element_id.cc | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) (limited to 'source/blender/editors/space_outliner') diff --git a/source/blender/editors/space_outliner/outliner_draw.cc b/source/blender/editors/space_outliner/outliner_draw.cc index dd7ca128282..bc58ad226ee 100644 --- a/source/blender/editors/space_outliner/outliner_draw.cc +++ b/source/blender/editors/space_outliner/outliner_draw.cc @@ -2592,7 +2592,7 @@ TreeElementIcon tree_element_get_icon(TreeStoreElem *tselem, TreeElement *te) case OB_CAMERA: data.icon = ICON_OUTLINER_OB_CAMERA; break; - case OB_CURVE: + case OB_CURVES_LEGACY: data.icon = ICON_OUTLINER_OB_CURVE; break; case OB_MBALL: @@ -2655,7 +2655,7 @@ TreeElementIcon tree_element_get_icon(TreeStoreElem *tselem, TreeElement *te) case ID_ME: data.icon = ICON_OUTLINER_DATA_MESH; break; - case ID_CU: + case ID_CU_LEGACY: data.icon = ICON_OUTLINER_DATA_CURVE; break; case ID_MB: diff --git a/source/blender/editors/space_outliner/outliner_intern.hh b/source/blender/editors/space_outliner/outliner_intern.hh index bba4bac0e37..0516758e887 100644 --- a/source/blender/editors/space_outliner/outliner_intern.hh +++ b/source/blender/editors/space_outliner/outliner_intern.hh @@ -108,7 +108,7 @@ typedef struct TreeElementIcon { ID_LI, \ ID_OB, \ ID_ME, \ - ID_CU, \ + ID_CU_LEGACY, \ ID_MB, \ ID_NT, \ ID_MA, \ diff --git a/source/blender/editors/space_outliner/outliner_select.cc b/source/blender/editors/space_outliner/outliner_select.cc index df10ce002c3..c6b9d9577b5 100644 --- a/source/blender/editors/space_outliner/outliner_select.cc +++ b/source/blender/editors/space_outliner/outliner_select.cc @@ -1171,7 +1171,7 @@ static void outliner_set_properties_tab(bContext *C, TreeElement *te, TreeStoreE context = BCONTEXT_OBJECT; break; case ID_ME: - case ID_CU: + case ID_CU_LEGACY: case ID_MB: case ID_IM: case ID_LT: diff --git a/source/blender/editors/space_outliner/outliner_tools.cc b/source/blender/editors/space_outliner/outliner_tools.cc index 18c37e08eff..53a81cf161e 100644 --- a/source/blender/editors/space_outliner/outliner_tools.cc +++ b/source/blender/editors/space_outliner/outliner_tools.cc @@ -117,7 +117,7 @@ static void get_element_operation_type( break; case ID_ME: - case ID_CU: + case ID_CU_LEGACY: case ID_MB: case ID_LT: case ID_LA: @@ -236,7 +236,7 @@ static void unlink_material_fn(bContext *UNUSED(C), totcol = me->totcol; matar = me->mat; } - else if (GS(tsep->id->name) == ID_CU) { + else if (GS(tsep->id->name) == ID_CU_LEGACY) { Curve *cu = (Curve *)tsep->id; totcol = cu->totcol; matar = cu->mat; diff --git a/source/blender/editors/space_outliner/outliner_tree.cc b/source/blender/editors/space_outliner/outliner_tree.cc index 1605d5874ae..06a5918f25c 100644 --- a/source/blender/editors/space_outliner/outliner_tree.cc +++ b/source/blender/editors/space_outliner/outliner_tree.cc @@ -579,7 +579,7 @@ static void outliner_add_id_contents(SpaceOutliner *space_outliner, * would require going over all tfaces, sort images in use. etc... */ break; } - case ID_CU: { + case ID_CU_LEGACY: { Curve *cu = (Curve *)id; if (outliner_animdata_test(cu->adt)) { diff --git a/source/blender/editors/space_outliner/tree/tree_element_id.cc b/source/blender/editors/space_outliner/tree/tree_element_id.cc index e126b024d52..64c73f57107 100644 --- a/source/blender/editors/space_outliner/tree/tree_element_id.cc +++ b/source/blender/editors/space_outliner/tree/tree_element_id.cc @@ -34,7 +34,7 @@ std::unique_ptr TreeElementID::createFromID(TreeElement &legacy_t return std::make_unique(legacy_te, (Scene &)id); case ID_OB: case ID_ME: - case ID_CU: + case ID_CU_LEGACY: case ID_MB: case ID_MA: case ID_TE: -- cgit v1.2.3