[Bf-blender-cvs] [3e0ffe5a396] master: Cleanup: Add comment about unsed custom data type

Hans Goudey noreply at git.blender.org
Thu Feb 3 22:11:22 CET 2022


Commit: 3e0ffe5a396e5879f3e8d5cfbdfa438d87df0394
Author: Hans Goudey
Date:   Thu Feb 3 14:35:51 2022 -0600
Branches: master
https://developer.blender.org/rB3e0ffe5a396e5879f3e8d5cfbdfa438d87df0394

Cleanup: Add comment about unsed custom data type

Since f59767ff97295404d, these hair layer types are unused. Since DNA
compatibility was broken with any files that would contain them, the
indices can be reused to avoid growing custom data's typemap.

===================================================================

M	source/blender/blenkernel/intern/customdata.cc
M	source/blender/makesdna/DNA_customdata_types.h

===================================================================

diff --git a/source/blender/blenkernel/intern/customdata.cc b/source/blender/blenkernel/intern/customdata.cc
index d235e6d15e1..8b752fc3533 100644
--- a/source/blender/blenkernel/intern/customdata.cc
+++ b/source/blender/blenkernel/intern/customdata.cc
@@ -1793,10 +1793,10 @@ static const LayerTypeInfo LAYERTYPEINFO[CD_NUMTYPES] = {
     {sizeof(float[3]), "vec3f", 1, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr},
     /* 44: CD_RADIUS */
     {sizeof(float), "MFloatProperty", 1, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr},
-    /* 45: CD_HAIRCURVE */ /* DEPRECATED */
-    {-1, "HairCurve", 1, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr},
-    /* 46: CD_HAIRMAPPING */ /* DEPRECATED */
-    {-1, "HairMapping", 1, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr},
+    /* 45: CD_HAIRCURVE */ /* UNUSED */
+    {-1, "", 1, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr},
+    /* 46: CD_HAIRMAPPING */ /* UNUSED */
+    {-1, "", 1, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr},
     /* 47: CD_PROP_COLOR */
     {sizeof(MPropCol),
      "MPropCol",
diff --git a/source/blender/makesdna/DNA_customdata_types.h b/source/blender/makesdna/DNA_customdata_types.h
index 629a5e88de7..ddeab9a0759 100644
--- a/source/blender/makesdna/DNA_customdata_types.h
+++ b/source/blender/makesdna/DNA_customdata_types.h
@@ -160,10 +160,10 @@ typedef enum CustomDataType {
   CD_CUSTOMLOOPNORMAL = 41,
   CD_SCULPT_FACE_SETS = 42,
 
-  /* CD_LOCATION = 43, */ /* UNUSED */
-  /* CD_RADIUS = 44, */   /* UNUSED */
-  CD_HAIRCURVE = 45,
-  CD_HAIRMAPPING = 46,
+  /* CD_LOCATION = 43, */    /* UNUSED */
+  /* CD_RADIUS = 44, */      /* UNUSED */
+  /* CD_HAIRCURVE = 45, */   /* UNUSED, can be reused. */
+  /* CD_HAIRMAPPING = 46, */ /* UNUSED, can be reused. */
 
   CD_PROP_COLOR = 47,
   CD_PROP_FLOAT3 = 48,



More information about the Bf-blender-cvs mailing list