[Bf-blender-cvs] [1dcc741f433] temp-sculpt-colors: temp-sculpt-colors: commit patch

Joseph Eagar noreply at git.blender.org
Wed Nov 3 22:38:33 CET 2021


Commit: 1dcc741f433367b32ca2b7557bc4160f05e985c6
Author: Joseph Eagar
Date:   Wed Nov 3 12:15:13 2021 -0700
Branches: temp-sculpt-colors
https://developer.blender.org/rB1dcc741f433367b32ca2b7557bc4160f05e985c6

temp-sculpt-colors: commit patch

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

M	release/datafiles/locale
M	release/scripts/addons
M	release/scripts/addons_contrib
M	release/scripts/startup/bl_ui/properties_data_mesh.py
M	release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
M	release/scripts/startup/bl_ui/space_userpref.py
M	release/scripts/startup/bl_ui/space_view3d_toolbar.py
M	source/blender/blenkernel/BKE_blender_version.h
M	source/blender/blenkernel/BKE_data_transfer.h
M	source/blender/blenkernel/BKE_paint.h
M	source/blender/blenkernel/BKE_pbvh.h
M	source/blender/blenkernel/intern/brush.c
M	source/blender/blenkernel/intern/data_transfer.c
M	source/blender/blenkernel/intern/paint.c
M	source/blender/blenkernel/intern/pbvh.c
M	source/blender/blenloader/intern/versioning_300.c
M	source/blender/draw/engines/workbench/workbench_engine.c
M	source/blender/draw/intern/draw_cache_impl_mesh.c
M	source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_vcol.cc
M	source/blender/editors/datafiles/CMakeLists.txt
M	source/blender/editors/include/UI_icons.h
M	source/blender/editors/object/object_bake_api.c
M	source/blender/editors/sculpt_paint/paint_hide.c
M	source/blender/editors/sculpt_paint/paint_mask.c
M	source/blender/editors/sculpt_paint/sculpt.c
M	source/blender/editors/sculpt_paint/sculpt_cloth.c
M	source/blender/editors/sculpt_paint/sculpt_detail.c
M	source/blender/editors/sculpt_paint/sculpt_dyntopo.c
M	source/blender/editors/sculpt_paint/sculpt_expand.c
M	source/blender/editors/sculpt_paint/sculpt_face_set.c
M	source/blender/editors/sculpt_paint/sculpt_filter_color.c
M	source/blender/editors/sculpt_paint/sculpt_filter_mask.c
M	source/blender/editors/sculpt_paint/sculpt_filter_mesh.c
M	source/blender/editors/sculpt_paint/sculpt_intern.h
M	source/blender/editors/sculpt_paint/sculpt_mask_expand.c
M	source/blender/editors/sculpt_paint/sculpt_mask_init.c
M	source/blender/editors/sculpt_paint/sculpt_paint_color.c
M	source/blender/editors/sculpt_paint/sculpt_smooth.c
M	source/blender/editors/sculpt_paint/sculpt_transform.c
M	source/blender/editors/sculpt_paint/sculpt_undo.c
M	source/blender/editors/space_node/drawnode.cc
M	source/blender/gpu/GPU_buffers.h
M	source/blender/gpu/intern/gpu_buffers.c
M	source/blender/makesrna/intern/rna_userdef.c
M	source/blender/modifiers/intern/MOD_datatransfer.c
M	source/blender/nodes/shader/nodes/node_shader_vertex_color.c
M	source/blender/windowmanager/intern/wm_toolsystem.c
M	source/tools

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

diff --git a/release/datafiles/locale b/release/datafiles/locale
index 62e82958a76..326997b913d 160000
--- a/release/datafiles/locale
+++ b/release/datafiles/locale
@@ -1 +1 @@
-Subproject commit 62e82958a760dad775d9b3387d7fb535fd6de4c6
+Subproject commit 326997b913d04bc5bc4656973d1e1a819f860dd2
diff --git a/release/scripts/addons b/release/scripts/addons
index 4475cbd11a6..59c8409947c 160000
--- a/release/scripts/addons
+++ b/release/scripts/addons
@@ -1 +1 @@
-Subproject commit 4475cbd11a636382d57571e0f5dfeff1f90bd6b7
+Subproject commit 59c8409947c4174983a36ec28dfeda2be9e254d2
diff --git a/release/scripts/addons_contrib b/release/scripts/addons_contrib
index 788441f2930..98f6085e9d7 160000
--- a/release/scripts/addons_contrib
+++ b/release/scripts/addons_contrib
@@ -1 +1 @@
-Subproject commit 788441f2930465bbfba8f0797b12dcef1d46694d
+Subproject commit 98f6085e9d71ba35d41e5aafbcb7981bd7c48275
diff --git a/release/scripts/startup/bl_ui/properties_data_mesh.py b/release/scripts/startup/bl_ui/properties_data_mesh.py
index d9ad094ac4f..74d9c595986 100644
--- a/release/scripts/startup/bl_ui/properties_data_mesh.py
+++ b/release/scripts/startup/bl_ui/properties_data_mesh.py
@@ -461,44 +461,6 @@ class DATA_PT_vertex_colors(MeshButtonsPanel, Panel):
         col.operator("mesh.vertex_color_add", icon='ADD', text="")
         col.operator("mesh.vertex_color_remove", icon='REMOVE', text="")
 
-
-class DATA_PT_sculpt_vertex_colors(MeshButtonsPanel, Panel):
-    bl_label = "Sculpt Vertex Colors"
-    bl_options = {'DEFAULT_CLOSED'}
-    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
-
-    @classmethod
-    def poll(cls, context):
-        return super().poll(context) and context.preferences.experimental.use_sculpt_vertex_colors
-
-    def draw(self, context):
-        layout = self.layout
-
-        me = context.mesh
-
-        row = layout.row()
-        col = row.column()
-
-        col.template_list(
-            "MESH_UL_vcols",
-            "svcols",
-            me,
-            "sculpt_vertex_colors",
-            me.sculpt_vertex_colors,
-            "active_index",
-            rows=2,
-        )
-
-        col = row.column(align=True)
-        col.operator("mesh.sculpt_vertex_color_add", icon='ADD', text="")
-        col.operator("mesh.sculpt_vertex_color_remove", icon='REMOVE', text="")
-
-        row = layout.row()
-        col = row.column()
-        col.operator("sculpt.vertex_to_loop_colors", text="Store Sculpt Vertex Color")
-        col.operator("sculpt.loop_to_vertex_colors", text="Load Sculpt Vertex Color")
-
-
 class DATA_PT_remesh(MeshButtonsPanel, Panel):
     bl_label = "Remesh"
     bl_options = {'DEFAULT_CLOSED'}
@@ -522,8 +484,7 @@ class DATA_PT_remesh(MeshButtonsPanel, Panel):
             col.prop(mesh, "use_remesh_preserve_volume", text="Volume")
             col.prop(mesh, "use_remesh_preserve_paint_mask", text="Paint Mask")
             col.prop(mesh, "use_remesh_preserve_sculpt_face_sets", text="Face Sets")
-            if context.preferences.experimental.use_sculpt_vertex_colors:
-                col.prop(mesh, "use_remesh_preserve_vertex_colors", text="Vertex Colors")
+            col.prop(mesh, "use_remesh_preserve_vertex_colors", text="Vertex Colors")
 
             col.operator("object.voxel_remesh", text="Voxel Remesh")
         else:
@@ -614,6 +575,12 @@ class DATA_PT_mesh_attributes(MeshButtonsPanel, Panel):
         col.operator("geometry.attribute_add", icon='ADD', text="")
         col.operator("geometry.attribute_remove", icon='REMOVE', text="")
 
+        active = mesh.attributes.active
+        print(active.domain, active.data_type)
+        if active.domain == "POINT" and active.data_type == "FLOAT_COLOR":
+            layout.operator("sculpt.vertex_to_loop_colors", text="Save To Corners")
+            layout.operator("sculpt.loop_to_vertex_colors", text="Load From Corners")
+
         self.draw_attribute_warnings(context, layout)
 
     def draw_attribute_warnings(self, context, layout):
@@ -663,7 +630,6 @@ classes = (
     DATA_PT_shape_keys,
     DATA_PT_uv_texture,
     DATA_PT_vertex_colors,
-    DATA_PT_sculpt_vertex_colors,
     DATA_PT_face_maps,
     DATA_PT_mesh_attributes,
     DATA_PT_normals,
diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
index c5191e80aef..be9c3b023a6 100644
--- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
@@ -1293,8 +1293,6 @@ class _defs_sculpt:
         exclude_filter = {}
         # Use 'bpy.context' instead of 'context' since it can be None.
         prefs = bpy.context.preferences
-        if not prefs.experimental.use_sculpt_vertex_colors:
-            exclude_filter = {'PAINT', 'SMEAR'}
 
         return generate_from_enum_ex(
             context,
@@ -2851,17 +2849,13 @@ class VIEW3D_PT_tools_active(ToolSelectPanelHelper, Panel):
             _defs_sculpt.cloth_filter,
             lambda context: (
                 (_defs_sculpt.color_filter,)
-                if context is None or (
-                        context.preferences.view.show_developer_ui and
-                        context.preferences.experimental.use_sculpt_vertex_colors)
+                if context is None
                 else ()
             ),
             None,
             lambda context: (
                 (_defs_sculpt.mask_by_color,)
-                if context is None or (
-                        context.preferences.view.show_developer_ui and
-                        context.preferences.experimental.use_sculpt_vertex_colors)
+                if context is None
                 else ()
             ),
             None,
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index 0093110d326..57bafe60613 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -2247,7 +2247,6 @@ class USERPREF_PT_experimental_new_features(ExperimentalPanel, Panel):
     def draw(self, context):
         self._draw_items(
             context, (
-                ({"property": "use_sculpt_vertex_colors"}, "T71947"),
                 ({"property": "use_sculpt_tools_tilt"}, "T82877"),
                 ({"property": "use_extended_asset_browser"}, ("project/view/130/", "Project Page")),
                 ({"property": "use_override_templates"}, ("T73318", "Milestone 4")),
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 16b5ed33f3f..5c4bd3f3eb4 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -837,8 +837,7 @@ class VIEW3D_PT_sculpt_voxel_remesh(Panel, View3DPaintPanel):
         col.prop(mesh, "use_remesh_preserve_volume", text="Volume")
         col.prop(mesh, "use_remesh_preserve_paint_mask", text="Paint Mask")
         col.prop(mesh, "use_remesh_preserve_sculpt_face_sets", text="Face Sets")
-        if context.preferences.experimental.use_sculpt_vertex_colors:
-            col.prop(mesh, "use_remesh_preserve_vertex_colors", text="Vertex Colors")
+        col.prop(mesh, "use_remesh_preserve_vertex_colors", text="Vertex Colors")
 
         layout.operator("object.voxel_remesh", text="Remesh")
 
diff --git a/source/blender/blenkernel/BKE_blender_version.h b/source/blender/blenkernel/BKE_blender_version.h
index d71cb559911..4a34a7ec2fc 100644
--- a/source/blender/blenkernel/BKE_blender_version.h
+++ b/source/blender/blenkernel/BKE_blender_version.h
@@ -39,7 +39,7 @@ extern "C" {
 
 /* Blender file format version. */
 #define BLENDER_FILE_VERSION BLENDER_VERSION
-#define BLENDER_FILE_SUBVERSION 22
+#define BLENDER_FILE_SUBVERSION 26
 
 /* Minimum Blender version that supports reading file written with the current
  * version. Older Blender versions will test this and show a warning if the file
diff --git a/source/blender/blenkernel/BKE_data_transfer.h b/source/blender/blenkernel/BKE_data_transfer.h
index a2544e43c3d..e1e8eb598f4 100644
--- a/source/blender/blenkernel/BKE_data_transfer.h
+++ b/source/blender/blenkernel/BKE_data_transfer.h
@@ -54,9 +54,11 @@ enum {
   DT_TYPE_UV = 1 << 24,
   DT_TYPE_SHARP_FACE = 1 << 25,
   DT_TYPE_FREESTYLE_FACE = 1 << 26,
-#define DT_TYPE_MAX 27
+  DT_TYPE_PROPCOL = 1 << 27,
+#define DT_TYPE_MAX 28
 
-  DT_TYPE_VERT_ALL = DT_TYPE_MDEFORMVERT | DT_TYPE_SHAPEKEY | DT_TYPE_SKIN | DT_TYPE_BWEIGHT_VERT,
+  DT_TYPE_VERT_ALL = DT_TYPE_MDEFORMVERT | DT_TYPE_SHAPEKEY | DT_TYPE_SKIN | DT_TYPE_BWEIGHT_VERT |
+                     DT_TYPE_PROPCOL,
   DT_TYPE_EDGE_ALL = DT_TYPE_SHARP_EDGE | DT_TYPE_SEAM | DT_TYPE_CREASE | DT_TYPE_BWEIGHT_EDGE |
                      DT_TYPE_FREESTYLE_EDGE,
   DT_TYPE_LOOP_ALL = DT_TYPE_VCOL | DT_TYPE_LNOR | DT_TYPE_UV,
@@ -74,7 +76,12 @@ int BKE_object_data_transfer_dttype_to_cdtype(const int dtdata_type);
 int BKE_object_data_transfer_dttype_to_srcdst_index(const int dtdata_type);
 
 #define DT_DATATYPE_IS_VERT(_dt) \
-  ELEM(_dt, DT_TYPE_MDEFORMVERT, DT_TYPE_SHAPEKEY, DT_TYPE_SKIN, DT_TYPE_BWEIGHT_VERT)
+  ELEM(_dt, \
+       DT_TYPE_MDEFORMVERT, \
+       DT_TYPE_SHAPEKEY, \
+       DT_TYPE_SKIN, \
+       DT_TYPE_BWEIGHT_VERT, \
+       DT_TYPE_PROPCOL)
 #define DT_DATATYPE_IS_EDGE(_dt) \
   ELEM(_dt, \
        DT_TYPE_CREASE, \
@@ -94,7 +101,8 @@ enum {
   DT_MULTILAYER_INDEX_SHAPEKEY = 1,
   DT_MULTILAYER_INDEX_VCOL = 2,
   DT_MULTILAYER_INDEX_UV = 3,
-  DT_MULTILAYER_INDEX_MAX = 4,
+  DT_MULTILAYER_INDEX_PROPCOL = 4,
+  DT_MULTILAYER_INDEX_MAX = 5,
 };
 
 /* Below we keep positive values for real layers idx (generated dynamically). */
diff --git a/source/blender/blenkernel/BKE_paint.h b/source/blender/blenkernel/BKE_paint.h
index 73413b61456..2d2406fb17b 100644
--- a/source/blender/blenkernel/BKE_paint.h
+++ b/source/blender/blenkernel/BKE_paint.h
@@ -467,6 +467,12 @@ typedef struct SculptSession {
 
   struct KeyBlock *shapekey_active;
   struct MPropCol *vcol;
+  float (*f3col)[3];
+  struct MLoopCol *mcol;
+
+  int vcol_domain;
+  int vcol_type;
+
   float *vmask;
 
   /* Mesh connectivity maps.

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list