[Bf-blender-cvs] [0f96739b316] temp-sculpt-colors: temp-sculpt-colors: fix color filter

Joseph Eagar noreply at git.blender.org
Tue Feb 15 19:45:03 CET 2022


Commit: 0f96739b316fd604f03f7465d95df22e49a31396
Author: Joseph Eagar
Date:   Tue Feb 15 10:43:26 2022 -0800
Branches: temp-sculpt-colors
https://developer.blender.org/rB0f96739b316fd604f03f7465d95df22e49a31396

temp-sculpt-colors: fix color filter

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

M	source/blender/editors/sculpt_paint/sculpt.c
M	source/blender/editors/sculpt_paint/sculpt_filter_color.c
M	source/blender/makesdna/DNA_userdef_types.h
M	source/blender/makesrna/intern/rna_attribute.c

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

diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index dcf97058a2a..48f2b634d9d 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -3955,9 +3955,6 @@ bool SCULPT_mode_poll(bContext *C)
 
 bool SCULPT_vertex_colors_poll(bContext *C)
 {
-  if (!U.experimental.use_sculpt_vertex_colors) {
-    return false;
-  }
   return SCULPT_mode_poll(C);
 }
 
diff --git a/source/blender/editors/sculpt_paint/sculpt_filter_color.c b/source/blender/editors/sculpt_paint/sculpt_filter_color.c
index f21caa3fb4a..dbbbabc9cd7 100644
--- a/source/blender/editors/sculpt_paint/sculpt_filter_color.c
+++ b/source/blender/editors/sculpt_paint/sculpt_filter_color.c
@@ -190,10 +190,7 @@ static void color_filter_task_cb(void *__restrict userdata,
       }
     }
 
-    float col[4];
-    SCULPT_vertex_color_get(ss, vd.index, col);
-
-    copy_v3_v3(col, final_color);
+    SCULPT_vertex_color_set(ss, vd.index, final_color);
 
     if (vd.mvert) {
       BKE_pbvh_vert_mark_update(ss->pbvh, vd.index);
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index 59b17c5c7c4..ce09494c289 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -645,11 +645,10 @@ typedef struct UserDef_Experimental {
   char use_new_curves_type;
   char use_new_point_cloud_type;
   char use_full_frame_compositor;
-  char use_sculpt_vertex_colors;
   char use_sculpt_tools_tilt;
   char use_extended_asset_browser;
   char use_override_templates;
-  char _pad[2];
+  char _pad[3];
   /** `makesdna` does not allow empty structs. */
 } UserDef_Experimental;
 
diff --git a/source/blender/makesrna/intern/rna_attribute.c b/source/blender/makesrna/intern/rna_attribute.c
index 6e77f911e9c..7c7e15a5f0a 100644
--- a/source/blender/makesrna/intern/rna_attribute.c
+++ b/source/blender/makesrna/intern/rna_attribute.c
@@ -342,7 +342,7 @@ static int rna_Attributes_layer_skip(CollectionPropertyIterator *UNUSED(iter), v
 static int rna_Attributes_noncolor_layer_skip(CollectionPropertyIterator *UNUSED(iter), void *data)
 {
   CustomDataLayer *layer = (CustomDataLayer *)data;
-  return !(CD_TYPE_AS_MASK(layer->type) & (CD_MASK_PROP_COLOR | CD_MASK_MLOOPCOL));
+  return !(CD_TYPE_AS_MASK(layer->type) & CD_MASK_COLOR_ALL);
 }
 
 /* Attributes are spread over multiple domains in separate CustomData, we use repeated



More information about the Bf-blender-cvs mailing list