[Bf-blender-cvs] [a5d9b3442d4] master: Cleanup: Move attribute domain count out of enum

Hans Goudey noreply at git.blender.org
Mon May 30 17:34:52 CEST 2022


Commit: a5d9b3442d4ea5daaa56d8166bb52cfbca589643
Author: Hans Goudey
Date:   Mon May 30 17:30:37 2022 +0200
Branches: master
https://developer.blender.org/rBa5d9b3442d4ea5daaa56d8166bb52cfbca589643

Cleanup: Move attribute domain count out of enum

The number of attribute domains is not an attribute domain.
This way it doesn't have to be handled in switch statements.

Differential Revision: https://developer.blender.org/D15065

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

M	source/blender/blenkernel/BKE_attribute.h

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

diff --git a/source/blender/blenkernel/BKE_attribute.h b/source/blender/blenkernel/BKE_attribute.h
index f3a29736bc8..cc50076e964 100644
--- a/source/blender/blenkernel/BKE_attribute.h
+++ b/source/blender/blenkernel/BKE_attribute.h
@@ -30,9 +30,8 @@ typedef enum AttributeDomain {
   ATTR_DOMAIN_CORNER = 3,   /* Mesh Corner */
   ATTR_DOMAIN_CURVE = 4,    /* A single curve in a larger curve data-block */
   ATTR_DOMAIN_INSTANCE = 5, /* Instance */
-
-  ATTR_DOMAIN_NUM
 } AttributeDomain;
+#define ATTR_DOMAIN_NUM 6
 
 typedef enum AttributeDomainMask {
   ATTR_DOMAIN_MASK_POINT = (1 << 0),



More information about the Bf-blender-cvs mailing list