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
This commit is contained in:
@@ -221,7 +221,8 @@ OperationCode bone_target_opcode(ID *target,
|
||||
|
||||
bool object_have_geometry_component(const Object *object)
|
||||
{
|
||||
return ELEM(object->type, OB_MESH, OB_CURVE, OB_FONT, OB_SURF, OB_MBALL, OB_LATTICE, OB_GPENCIL);
|
||||
return ELEM(
|
||||
object->type, OB_MESH, OB_CURVES_LEGACY, OB_FONT, OB_SURF, OB_MBALL, OB_LATTICE, OB_GPENCIL);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
@@ -537,7 +538,7 @@ void DepsgraphRelationBuilder::build_id(ID *id)
|
||||
break;
|
||||
case ID_ME:
|
||||
case ID_MB:
|
||||
case ID_CU:
|
||||
case ID_CU_LEGACY:
|
||||
case ID_LT:
|
||||
case ID_CV:
|
||||
case ID_PT:
|
||||
@@ -827,7 +828,7 @@ void DepsgraphRelationBuilder::build_object_data(Object *object)
|
||||
/* type-specific data. */
|
||||
switch (object->type) {
|
||||
case OB_MESH:
|
||||
case OB_CURVE:
|
||||
case OB_CURVES_LEGACY:
|
||||
case OB_FONT:
|
||||
case OB_SURF:
|
||||
case OB_MBALL:
|
||||
@@ -983,7 +984,7 @@ void DepsgraphRelationBuilder::build_object_parent(Object *object)
|
||||
add_relation(parent_key, object_transform_key, "Lattice Deform Parent");
|
||||
add_relation(geom_key, object_transform_key, "Lattice Deform Parent Geom");
|
||||
}
|
||||
else if (object->parent->type == OB_CURVE) {
|
||||
else if (object->parent->type == OB_CURVES_LEGACY) {
|
||||
Curve *cu = (Curve *)object->parent->data;
|
||||
|
||||
if (cu->flag & CU_PATH) {
|
||||
@@ -2040,7 +2041,7 @@ void DepsgraphRelationBuilder::build_shapekeys(Key *key)
|
||||
* Therefore, each user of a piece of shared geometry data ends up evaluating
|
||||
* its own version of the stuff, complete with whatever modifiers it may use.
|
||||
*
|
||||
* - The data-blocks for the geometry data - "obdata" (e.g. ID_ME, ID_CU, ID_LT.)
|
||||
* - The data-blocks for the geometry data - "obdata" (e.g. ID_ME, ID_CU_LEGACY, ID_LT.)
|
||||
* are used for
|
||||
* 1) calculating the bounding boxes of the geometry data,
|
||||
* 2) aggregating inward links from other objects (e.g. for text on curve)
|
||||
@@ -2125,7 +2126,7 @@ void DepsgraphRelationBuilder::build_object_data_geometry(Object *object)
|
||||
/* Materials. */
|
||||
build_materials(object->mat, object->totcol);
|
||||
/* Geometry collision. */
|
||||
if (ELEM(object->type, OB_MESH, OB_CURVE, OB_LATTICE)) {
|
||||
if (ELEM(object->type, OB_MESH, OB_CURVES_LEGACY, OB_LATTICE)) {
|
||||
// add geometry collider relations
|
||||
}
|
||||
/* Make sure uber update is the last in the dependencies. */
|
||||
@@ -2220,7 +2221,7 @@ void DepsgraphRelationBuilder::build_object_data_geometry_datablock(ID *obdata)
|
||||
break;
|
||||
case ID_MB:
|
||||
break;
|
||||
case ID_CU: {
|
||||
case ID_CU_LEGACY: {
|
||||
Curve *cu = (Curve *)obdata;
|
||||
if (cu->bevobj != nullptr) {
|
||||
ComponentKey bevob_geom_key(&cu->bevobj->id, NodeType::GEOMETRY);
|
||||
|
||||
Reference in New Issue
Block a user