Page MenuHome

Cleanup: Rename original curve object type enum
ClosedPublic

Authored by Hans Goudey (HooglyBoogly) on Feb 15 2022, 4:44 AM.

Details

Summary

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.

To summarize for the records, 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.

Diff Detail

Repository
rB Blender

Event Timeline

Hans Goudey (HooglyBoogly) requested review of this revision.Feb 15 2022, 4:44 AM
Hans Goudey (HooglyBoogly) created this revision.

The renaming seems fine, although I'm wondering if we should also rename ID_CU to ID_CU_LEGACY since it's also similar to ID_CV.


Seems this patch misses renaming the enum it's self, getting a lot of errors error: ‘OB_CURVES_LEGACY’ undeclared (first use in this function); errors.

What Campbell says sounds reasonable to me.

Fine with me, I don't think you need me to review the details of this.

Hans Goudey (HooglyBoogly) edited the summary of this revision. (Show Details)

Futher renaming included in this update.

Sorry about the incomplete change. VS code was freezing when renaming, I guess I made the diff before it was done. The problem seems to be fixed in the latest release.

Accepting, I think it would be good to have a brief comment for OB_CURVES_LEGACY ID_CU_LEGACY mentioning they're still in use, referencing the task to replace them.

source/blender/makesdna/DNA_ID.h
1001 ↗(On Diff #48447)

Note that ID_CV is intended to be used instead, reference the task.

source/blender/makesdna/DNA_object_types.h
474 ↗(On Diff #48447)

This could include a note that OB_CURVES_LEGACY is still in use but will eventually be replaced by OB_CURVES with a link to the task.

This revision is now accepted and ready to land.Feb 17 2022, 8:38 AM