Commit: 61393ea09b925844f8f8a95a58d3e52cfea81b0c
Author: Joseph Eagar
Date:   Sat Feb 12 08:01:58 2022 -0800
Branches: temp-sculpt-colors
https://developer.blender.org/rB61393ea09b925844f8f8a95a58d3e52cfea81b0c

temp-sculpt-colors: BKE_id_attribute_new no longer
                    takes a namespace mask argument.

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

M       source/blender/blenkernel/BKE_attribute.h
M       source/blender/blenkernel/intern/attribute.c
M       source/blender/blenkernel/intern/fluid.c
M       source/blender/editors/geometry/geometry_attributes.cc
M       source/blender/io/alembic/intern/abc_reader_mesh.cc
M       source/blender/makesrna/intern/rna_attribute.c

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

diff --git a/source/blender/blenkernel/BKE_attribute.h 
b/source/blender/blenkernel/BKE_attribute.h
index 68966ae7114..4dc35d64706 100644
--- a/source/blender/blenkernel/BKE_attribute.h
+++ b/source/blender/blenkernel/BKE_attribute.h
@@ -60,7 +60,6 @@ struct CustomDataLayer *BKE_id_attribute_new(struct ID *id,
                                              const char *name,
                                              int type,
                                              AttributeDomain domain,
-                                             const CustomDataMask list_mask,
                                              struct ReportList *reports);
 bool BKE_id_attribute_remove(struct ID *id,
                              struct CustomDataLayer *layer,
@@ -128,8 +127,7 @@ void BKE_id_attributes_render_color_set(struct ID *id, 
struct CustomDataLayer *a
 
 bool BKE_id_attribute_find_unique_name(struct ID *id,
                                        const char *name,
-                                       char *outname,
-                                       CustomDataMask mask);
+                                       char *outname);
 
 #ifdef __cplusplus
 }
diff --git a/source/blender/blenkernel/intern/attribute.c 
b/source/blender/blenkernel/intern/attribute.c
index 036d42e46c0..d5886f84be8 100644
--- a/source/blender/blenkernel/intern/attribute.c
+++ b/source/blender/blenkernel/intern/attribute.c
@@ -135,7 +135,6 @@ bool BKE_id_attribute_rename(ID *id,
 
 typedef struct AttrUniqueData {
   ID *id;
-  CustomDataMask mask;
 } AttrUniqueData;
 
 static bool unique_name_cb(void *arg, const char *name)
@@ -154,7 +153,7 @@ static bool unique_name_cb(void *arg, const char *name)
     for (int i = 0; i < cdata->totlayer; i++) {
       CustomDataLayer *layer = cdata->layers + i;
 
-      if ((CD_TYPE_AS_MASK(layer->type) & data->mask) && STREQ(layer->name, 
name)) {
+      if (STREQ(layer->name, name)) {
         return true;
       }
     }
@@ -165,10 +164,9 @@ static bool unique_name_cb(void *arg, const char *name)
 
 bool BKE_id_attribute_find_unique_name(ID *id,
                                        const char *name,
-                                       char *outname,
-                                       CustomDataMask mask)
+                                       char *outname)
 {
-  AttrUniqueData data = {.id = id, .mask = mask};
+  AttrUniqueData data = {.id = id};
 
   BLI_strncpy_utf8(outname, name, MAX_CUSTOMDATA_LAYER_NAME);
 
@@ -179,7 +177,6 @@ CustomDataLayer *BKE_id_attribute_new(ID *id,
                                       const char *name,
                                       const int type,
                                       const AttributeDomain domain,
-                                      const CustomDataMask list_mask,
                                       ReportList *reports)
 {
   DomainInfo info[ATTR_DOMAIN_NUM];
@@ -192,7 +189,7 @@ CustomDataLayer *BKE_id_attribute_new(ID *id,
   }
 
   char uniquename[MAX_CUSTOMDATA_LAYER_NAME];
-  BKE_id_attribute_find_unique_name(id, name, uniquename, list_mask);
+  BKE_id_attribute_find_unique_name(id, name, uniquename);
 
   switch (GS(id->name)) {
     case ID_ME: {
diff --git a/source/blender/blenkernel/intern/fluid.c 
b/source/blender/blenkernel/intern/fluid.c
index 726e6f8962b..ef2fa2266c4 100644
--- a/source/blender/blenkernel/intern/fluid.c
+++ b/source/blender/blenkernel/intern/fluid.c
@@ -3320,7 +3320,7 @@ static Mesh *create_liquid_geometry(FluidDomainSettings 
*fds,
 
   if (use_speedvectors) {
     CustomDataLayer *velocity_layer = BKE_id_attribute_new(
-        &me->id, "velocity", CD_PROP_FLOAT3, ATTR_DOMAIN_POINT, 
CD_MASK_PROP_ALL, NULL);
+        &me->id, "velocity", CD_PROP_FLOAT3, ATTR_DOMAIN_POINT, NULL);
     velarray = velocity_layer->data;
   }
 
diff --git a/source/blender/editors/geometry/geometry_attributes.cc 
b/source/blender/editors/geometry/geometry_attributes.cc
index ee2cd07e4d8..8dcbd177994 100644
--- a/source/blender/editors/geometry/geometry_attributes.cc
+++ b/source/blender/editors/geometry/geometry_attributes.cc
@@ -96,7 +96,7 @@ static int geometry_attribute_add_exec(bContext *C, 
wmOperator *op)
   CustomDataType type = (CustomDataType)RNA_enum_get(op->ptr, "data_type");
   AttributeDomain domain = (AttributeDomain)RNA_enum_get(op->ptr, "domain");
   CustomDataLayer *layer = BKE_id_attribute_new(
-      id, name, type, domain, CD_MASK_PROP_ALL, op->reports);
+      id, name, type, domain, op->reports);
 
   if (layer == nullptr) {
     return OPERATOR_CANCELLED;
@@ -226,7 +226,7 @@ static int geometry_color_attribute_add_exec(bContext *C, 
wmOperator *op)
   CustomDataType type = (CustomDataType)RNA_enum_get(op->ptr, "data_type");
   AttributeDomain domain = (AttributeDomain)RNA_enum_get(op->ptr, "domain");
   CustomDataLayer *layer = BKE_id_attribute_new(
-      id, name, type, domain, CD_MASK_PROP_ALL, op->reports);
+      id, name, type, domain, op->reports);
 
   if (layer == NULL) {
     return OPERATOR_CANCELLED;
diff --git a/source/blender/io/alembic/intern/abc_reader_mesh.cc 
b/source/blender/io/alembic/intern/abc_reader_mesh.cc
index e926381c1f1..1d00b55ca78 100644
--- a/source/blender/io/alembic/intern/abc_reader_mesh.cc
+++ b/source/blender/io/alembic/intern/abc_reader_mesh.cc
@@ -458,7 +458,7 @@ static void read_velocity(const V3fArraySamplePtr 
&velocities,
   }
 
   CustomDataLayer *velocity_layer = BKE_id_attribute_new(
-      &config.mesh->id, "velocity", CD_PROP_FLOAT3, ATTR_DOMAIN_POINT, 
CD_MASK_PROP_ALL, nullptr);
+      &config.mesh->id, "velocity", CD_PROP_FLOAT3, ATTR_DOMAIN_POINT, 
nullptr);
   float(*velocity)[3] = (float(*)[3])velocity_layer->data;
 
   for (int i = 0; i < num_velocity_vectors; i++) {
diff --git a/source/blender/makesrna/intern/rna_attribute.c 
b/source/blender/makesrna/intern/rna_attribute.c
index 4a990cb44bc..6e77f911e9c 100644
--- a/source/blender/makesrna/intern/rna_attribute.c
+++ b/source/blender/makesrna/intern/rna_attribute.c
@@ -314,7 +314,7 @@ static void rna_ByteIntAttributeValue_set(PointerRNA *ptr, 
const int new_value)
 static PointerRNA rna_AttributeGroup_new(
     ID *id, ReportList *reports, const char *name, const int type, const int 
domain)
 {
-  CustomDataLayer *layer = BKE_id_attribute_new(id, name, type, domain, 
CD_MASK_PROP_ALL, reports);
+  CustomDataLayer *layer = BKE_id_attribute_new(id, name, type, domain, 
reports);
   DEG_id_tag_update(id, ID_RECALC_GEOMETRY);
   WM_main_add_notifier(NC_GEOM | ND_DATA, id);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to