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
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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"),
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user