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:
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_data_mesh.py')
-rw-r--r--release/scripts/startup/bl_ui/properties_data_mesh.py41
1 files changed, 37 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 050bf56966f..80b9b773d9b 100644
--- a/release/scripts/startup/bl_ui/properties_data_mesh.py
+++ b/release/scripts/startup/bl_ui/properties_data_mesh.py
@@ -1,6 +1,4 @@
# SPDX-License-Identifier: GPL-2.0-or-later
-
-# <pep8 compliant>
import bpy
from bpy.types import Menu, Panel, UIList
from rna_prop_ui import PropertyPanel
@@ -60,12 +58,29 @@ class MESH_MT_shape_key_context_menu(Menu):
layout.operator("object.join_shapes")
layout.operator("object.shape_key_transfer")
layout.separator()
- layout.operator("object.shape_key_remove", icon='X', text="Delete All Shape Keys").all = True
+ op = layout.operator("object.shape_key_remove", icon='X', text="Delete All Shape Keys")
+ op.all = True
+ op.apply_mix = False
+ op = layout.operator("object.shape_key_remove", text="Apply All Shape Keys")
+ op.all = True
+ op.apply_mix = True
layout.separator()
layout.operator("object.shape_key_move", icon='TRIA_UP_BAR', text="Move to Top").type = 'TOP'
layout.operator("object.shape_key_move", icon='TRIA_DOWN_BAR', text="Move to Bottom").type = 'BOTTOM'
+class MESH_MT_color_attribute_context_menu(Menu):
+ bl_label = "Color Attribute Specials"
+
+ def draw(self, _context):
+ layout = self.layout
+
+ layout.operator(
+ "geometry.color_attribute_duplicate",
+ icon='DUPLICATE',
+ )
+
+
class MESH_MT_attribute_context_menu(Menu):
bl_label = "Attribute Specials"
@@ -401,6 +416,8 @@ class DATA_PT_shape_keys(MeshButtonsPanel, Panel):
row.active = enable_edit_value
row.prop(key, "eval_time")
+ layout.prop(ob, "add_rest_position_attribute")
+
class DATA_PT_uv_texture(MeshButtonsPanel, Panel):
bl_label = "UV Maps"
@@ -497,6 +514,16 @@ class MESH_UL_attributes(UIList):
'CORNER': "Face Corner",
}
+ def filter_items(self, _context, data, property):
+ attributes = getattr(data, property)
+ flags = []
+ indices = [i for i in range(len(attributes))]
+
+ for item in attributes:
+ flags.append(self.bitflag_filter_item if item.is_internal else 0)
+
+ return flags, indices
+
def draw_item(self, _context, layout, _data, attribute, _icon, _active_data, _active_propname, _index):
data_type = attribute.bl_rna.properties['data_type'].enum_items[attribute.data_type]
@@ -584,7 +611,8 @@ class ColorAttributesListBase():
for idx, item in enumerate(attrs):
skip = (
(item.domain not in {"POINT", "CORNER"}) or
- (item.data_type not in {"FLOAT_COLOR", "BYTE_COLOR"})
+ (item.data_type not in {"FLOAT_COLOR", "BYTE_COLOR"}) or
+ (not item.is_internal)
)
ret.append(self.bitflag_filter_item if not skip else 0)
idxs.append(idx)
@@ -651,12 +679,17 @@ class DATA_PT_vertex_colors(DATA_PT_mesh_attributes, Panel):
col.operator("geometry.color_attribute_add", icon='ADD', text="")
col.operator("geometry.color_attribute_remove", icon='REMOVE', text="")
+ col.separator()
+
+ col.menu("MESH_MT_color_attribute_context_menu", icon='DOWNARROW_HLT', text="")
+
self.draw_attribute_warnings(context, layout)
classes = (
MESH_MT_vertex_group_context_menu,
MESH_MT_shape_key_context_menu,
+ MESH_MT_color_attribute_context_menu,
MESH_MT_attribute_context_menu,
MESH_UL_vgroups,
MESH_UL_fmaps,