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/editors/object/object_relations.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/editors/object/object_relations.c')
-rw-r--r--source/blender/editors/object/object_relations.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index 8834941d083..1204a57d59f 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -169,7 +169,7 @@ static int vertex_parent_set_exec(bContext *C, wmOperator *op)
}
}
}
- else if (ELEM(obedit->type, OB_SURF, OB_CURVE)) {
+ else if (ELEM(obedit->type, OB_SURF, OB_CURVES_LEGACY)) {
ListBase *editnurb = object_editcurve_get(obedit);
for (Nurb *nu = editnurb->first; nu != NULL; nu = nu->next) {
@@ -341,7 +341,7 @@ EnumPropertyItem prop_clear_parent_types[] = {
/* Helper for ED_object_parent_clear() - Remove deform-modifiers associated with parent */
static void object_remove_parent_deform_modifiers(Object *ob, const Object *par)
{
- if (ELEM(par->type, OB_ARMATURE, OB_LATTICE, OB_CURVE)) {
+ if (ELEM(par->type, OB_ARMATURE, OB_LATTICE, OB_CURVES_LEGACY)) {
ModifierData *md, *mdn;
/* assume that we only need to remove the first instance of matching deform modifier here */
@@ -363,7 +363,7 @@ static void object_remove_parent_deform_modifiers(Object *ob, const Object *par)
free = true;
}
}
- else if ((md->type == eModifierType_Curve) && (par->type == OB_CURVE)) {
+ else if ((md->type == eModifierType_Curve) && (par->type == OB_CURVES_LEGACY)) {
CurveModifierData *cmd = (CurveModifierData *)md;
if (cmd->object == par) {
free = true;
@@ -531,7 +531,7 @@ bool ED_object_parent_set(ReportList *reports,
switch (partype) {
case PAR_FOLLOW:
case PAR_PATH_CONST: {
- if (par->type != OB_CURVE) {
+ if (par->type != OB_CURVES_LEGACY) {
return false;
}
Curve *cu = par->data;
@@ -626,7 +626,7 @@ bool ED_object_parent_set(ReportList *reports,
*/
/* XXX currently this should only happen for meshes, curves, surfaces,
* and lattices - this stuff isn't available for meta-balls yet. */
- if (ELEM(ob->type, OB_MESH, OB_CURVE, OB_SURF, OB_FONT, OB_LATTICE)) {
+ if (ELEM(ob->type, OB_MESH, OB_CURVES_LEGACY, OB_SURF, OB_FONT, OB_LATTICE)) {
ModifierData *md;
switch (partype) {
@@ -968,7 +968,7 @@ static int parent_set_invoke_menu(bContext *C, wmOperatorType *ot)
uiItemEnumO_ptr(layout, ot, NULL, 0, "type", PAR_BONE);
uiItemEnumO_ptr(layout, ot, NULL, 0, "type", PAR_BONE_RELATIVE);
}
- else if (parent->type == OB_CURVE) {
+ else if (parent->type == OB_CURVES_LEGACY) {
uiItemEnumO_ptr(layout, ot, NULL, 0, "type", PAR_CURVE);
uiItemEnumO_ptr(layout, ot, NULL, 0, "type", PAR_FOLLOW);
uiItemEnumO_ptr(layout, ot, NULL, 0, "type", PAR_PATH_CONST);
@@ -1820,7 +1820,7 @@ static void single_obdata_users(
ob->data,
BKE_id_copy_ex(bmain, ob->data, NULL, LIB_ID_COPY_DEFAULT | LIB_ID_COPY_ACTIONS));
break;
- case OB_CURVE:
+ case OB_CURVES_LEGACY:
case OB_SURF:
case OB_FONT:
ob->data = cu = ID_NEW_SET(