Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2022-02-18 18:50:29 +0300
committerHans Goudey <h.goudey@me.com>2022-02-18 18:50:29 +0300
commitddf189892c596d939228cc531b775bfd6708bb2d (patch)
treecb3b28527696ef5a6a3eec581a55e6141c2e686d /source/blender/makesrna/intern/rna_key.c
parent48b17da1d9fe4d559c5b0fa58029df05a45d3960 (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/makesrna/intern/rna_key.c')
-rw-r--r--source/blender/makesrna/intern/rna_key.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/makesrna/intern/rna_key.c b/source/blender/makesrna/intern/rna_key.c
index 51dcfd13657..7687dcbb11f 100644
--- a/source/blender/makesrna/intern/rna_key.c
+++ b/source/blender/makesrna/intern/rna_key.c
@@ -47,7 +47,7 @@
static Key *rna_ShapeKey_find_key(ID *id)
{
switch (GS(id->name)) {
- case ID_CU:
+ case ID_CU_LEGACY:
return ((Curve *)id)->key;
case ID_KE:
return (Key *)id;
@@ -556,7 +556,7 @@ static void rna_ShapeKey_data_begin(CollectionPropertyIterator *iter, PointerRNA
KeyBlock *kb = (KeyBlock *)ptr->data;
int tot = kb->totelem, size = key->elemsize;
- if (GS(key->from->name) == ID_CU && tot > 0) {
+ if (GS(key->from->name) == ID_CU_LEGACY && tot > 0) {
Curve *cu = (Curve *)key->from;
StructRNA *type = NULL;
NurbInfo info = {0};
@@ -593,7 +593,7 @@ static int rna_ShapeKey_data_length(PointerRNA *ptr)
KeyBlock *kb = (KeyBlock *)ptr->data;
int tot = kb->totelem;
- if (GS(key->from->name) == ID_CU) {
+ if (GS(key->from->name) == ID_CU_LEGACY) {
tot = rna_ShapeKey_curve_find_index(key, tot);
}
@@ -613,7 +613,7 @@ static PointerRNA rna_ShapeKey_data_get(CollectionPropertyIterator *iter)
return rna_pointer_inherit_refine(&iter->parent, point->type, point->data);
}
- if (GS(key->from->name) == ID_CU) {
+ if (GS(key->from->name) == ID_CU_LEGACY) {
Curve *cu = (Curve *)key->from;
type = rna_ShapeKey_curve_point_type(cu->nurb.first);
@@ -635,7 +635,7 @@ int rna_ShapeKey_data_lookup_int(PointerRNA *ptr, int index, PointerRNA *r_ptr)
return false;
}
- if (GS(key->from->name) == ID_CU) {
+ if (GS(key->from->name) == ID_CU_LEGACY) {
NurbInfo info;
rna_ShapeKey_NurbInfo_find_index(key, index, false, &info);