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/makesdna/DNA_object_types.h | |
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/makesdna/DNA_object_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_object_types.h | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h index 8c235f403f0..9e0bf7dcc5a 100644 --- a/source/blender/makesdna/DNA_object_types.h +++ b/source/blender/makesdna/DNA_object_types.h @@ -471,7 +471,8 @@ typedef struct ObHook { enum { OB_EMPTY = 0, OB_MESH = 1, - OB_CURVE = 2, + /** Curve object is still used but replaced by "Curves" for the future (see T95355). */ + OB_CURVES_LEGACY = 2, OB_SURF = 3, OB_FONT = 4, OB_MBALL = 5, @@ -515,17 +516,26 @@ enum { OB_VOLUME)) #define OB_TYPE_SUPPORT_VGROUP(_type) (ELEM(_type, OB_MESH, OB_LATTICE, OB_GPENCIL)) #define OB_TYPE_SUPPORT_EDITMODE(_type) \ - (ELEM(_type, OB_MESH, OB_FONT, OB_CURVE, OB_SURF, OB_MBALL, OB_LATTICE, OB_ARMATURE, OB_CURVES)) -#define OB_TYPE_SUPPORT_PARVERT(_type) (ELEM(_type, OB_MESH, OB_SURF, OB_CURVE, OB_LATTICE)) + (ELEM(_type, \ + OB_MESH, \ + OB_FONT, \ + OB_CURVES_LEGACY, \ + OB_SURF, \ + OB_MBALL, \ + OB_LATTICE, \ + OB_ARMATURE, \ + OB_CURVES)) +#define OB_TYPE_SUPPORT_PARVERT(_type) \ + (ELEM(_type, OB_MESH, OB_SURF, OB_CURVES_LEGACY, OB_LATTICE)) /** Matches #OB_TYPE_SUPPORT_EDITMODE. */ -#define OB_DATA_SUPPORT_EDITMODE(_type) (ELEM(_type, ID_ME, ID_CU, ID_MB, ID_LT, ID_AR)) +#define OB_DATA_SUPPORT_EDITMODE(_type) (ELEM(_type, ID_ME, ID_CU_LEGACY, ID_MB, ID_LT, ID_AR)) /* is this ID type used as object data */ #define OB_DATA_SUPPORT_ID(_id_type) \ (ELEM(_id_type, \ ID_ME, \ - ID_CU, \ + ID_CU_LEGACY, \ ID_MB, \ ID_LA, \ ID_SPK, \ @@ -540,7 +550,7 @@ enum { #define OB_DATA_SUPPORT_ID_CASE \ ID_ME: \ - case ID_CU: \ + case ID_CU_LEGACY: \ case ID_MB: \ case ID_LA: \ case ID_SPK: \ |