Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Dobarro <pablodp606@gmail.com>2020-07-09 18:16:24 +0300
committerPablo Dobarro <pablodp606@gmail.com>2020-07-09 19:24:50 +0300
commit03a00bda2b3f6729997ddfa31dfe84cc56e7707e (patch)
tree5b6c4d7837bf10ba6ac78613b9391077c6009043 /release
parent1e3247c0787df31c34e0fdc03c6fa11b35e55d03 (diff)
Sculpt: Make Sculpt Vertex Colors features experimental
This disables all Sculpt Vertex Colors tools, operators, panels and rendering capabilities and puts them under the "Use Sculpt Vertex Colors" experimental option. Reviewed By: brecht Differential Revision: https://developer.blender.org/D8239
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_ui/properties_data_mesh.py7
-rw-r--r--release/scripts/startup/bl_ui/space_toolsystem_toolbar.py23
-rw-r--r--release/scripts/startup/bl_ui/space_userpref.py1
-rw-r--r--release/scripts/startup/bl_ui/space_view3d_toolbar.py3
4 files changed, 30 insertions, 4 deletions
diff --git a/release/scripts/startup/bl_ui/properties_data_mesh.py b/release/scripts/startup/bl_ui/properties_data_mesh.py
index fbd8e2d7cff..27df265d013 100644
--- a/release/scripts/startup/bl_ui/properties_data_mesh.py
+++ b/release/scripts/startup/bl_ui/properties_data_mesh.py
@@ -464,6 +464,10 @@ class DATA_PT_sculpt_vertex_colors(MeshButtonsPanel, Panel):
bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
+ @classmethod
+ def poll(cls, context):
+ return context.preferences.experimental.use_sculpt_vertex_colors
+
def draw(self, context):
layout = self.layout
@@ -508,7 +512,8 @@ 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")
- col.prop(mesh, "use_remesh_preserve_vertex_colors", text="Vertex Colors")
+ if context.preferences.experimental.use_sculpt_vertex_colors:
+ col.prop(mesh, "use_remesh_preserve_vertex_colors", text="Vertex Colors")
col.operator("object.voxel_remesh", text="Voxel Remesh")
else:
diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
index 75e7cc1b9c6..b7852eb92e0 100644
--- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
@@ -50,11 +50,14 @@ def generate_from_enum_ex(
attr,
cursor='DEFAULT',
tooldef_keywords={},
+ exclude_filter = {}
):
tool_defs = []
for enum in type.bl_rna.properties[attr].enum_items_static:
name = enum.name
idname = enum.identifier
+ if idname in exclude_filter:
+ continue
tool_defs.append(
ToolDef.from_dict(
dict(
@@ -1178,12 +1181,18 @@ class _defs_sculpt:
@staticmethod
def generate_from_brushes(context):
+ if bpy.context.preferences.experimental.use_sculpt_vertex_colors:
+ exclude_filter = {}
+ else:
+ exclude_filter = {'PAINT', 'SMEAR'}
+
return generate_from_enum_ex(
context,
idname_prefix="builtin_brush.",
icon_prefix="brush.sculpt.",
type=bpy.types.Brush,
attr="sculpt_tool",
+ exclude_filter = exclude_filter,
)
@ToolDef.from_fn
@@ -2485,9 +2494,19 @@ class VIEW3D_PT_tools_active(ToolSelectPanelHelper, Panel):
None,
_defs_sculpt.mesh_filter,
_defs_sculpt.cloth_filter,
- _defs_sculpt.color_filter,
+ lambda context: (
+ (_defs_sculpt.color_filter,)
+ if bpy.context.preferences.view.show_developer_ui and \
+ bpy.context.preferences.experimental.use_sculpt_vertex_colors
+ else ()
+ ),
None,
- _defs_sculpt.mask_by_color,
+ lambda context: (
+ (_defs_sculpt.mask_by_color,)
+ if bpy.context.preferences.view.show_developer_ui and \
+ bpy.context.preferences.experimental.use_sculpt_vertex_colors
+ else ()
+ ),
None,
_defs_transform.translate,
_defs_transform.rotate,
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index e5171df597a..5392ed9cc25 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -2143,6 +2143,7 @@ class USERPREF_PT_experimental_new_features(ExperimentalPanel, Panel):
self._draw_items(
context, (
({"property": "use_new_particle_system"}, "T73324"),
+ ({"property": "use_sculpt_vertex_colors"}, "T71947"),
),
)
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index f1358d4dd01..3286209bd63 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -812,7 +812,8 @@ 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")
- col.prop(mesh, "use_remesh_preserve_vertex_colors", text="Vertex Colors")
+ if preferences.experimental.use_preserver_vertex_colors:
+ col.prop(mesh, "use_remesh_preserve_vertex_colors", text="Vertex Colors")
layout.operator("object.voxel_remesh", text="Remesh")