Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/properties_data_mesh.py
| # SPDX-License-Identifier: GPL-2.0-or-later | # SPDX-License-Identifier: GPL-2.0-or-later | ||||
| import bpy | import bpy | ||||
| from bpy.types import Menu, Panel, UIList | from bpy.types import Menu, Panel, UIList | ||||
| from rna_prop_ui import PropertyPanel | from rna_prop_ui import PropertyPanel | ||||
| from bpy.app.translations import pgettext_tip as tip_ | |||||
| class MESH_MT_vertex_group_context_menu(Menu): | class MESH_MT_vertex_group_context_menu(Menu): | ||||
| bl_label = "Vertex Group Specials" | bl_label = "Vertex Group Specials" | ||||
| def draw(self, _context): | def draw(self, _context): | ||||
| layout = self.layout | layout = self.layout | ||||
| layout.operator( | layout.operator( | ||||
| ▲ Show 20 Lines • Show All 573 Lines • ▼ Show 20 Lines | def draw_attribute_warnings(self, context, layout): | ||||
| unique_names_len = len(unique_names) | unique_names_len = len(unique_names) | ||||
| unique_names.add(name) | unique_names.add(name) | ||||
| if len(unique_names) == unique_names_len: | if len(unique_names) == unique_names_len: | ||||
| colliding_names.append(name) | colliding_names.append(name) | ||||
| if not colliding_names: | if not colliding_names: | ||||
| return | return | ||||
| layout.label(text="Name collisions: " + ", ".join(set(colliding_names)), icon='ERROR') | layout.label(text=tip_("Name collisions: ") + ", ".join(set(colliding_names)), icon='ERROR') | ||||
mont29: should be `tip_` here, same rational as usual (this is not actually a label, but actual more… | |||||
Done Inline ActionsDamn, my bad! pioverfour: Damn, my bad! | |||||
| class ColorAttributesListBase(): | class ColorAttributesListBase(): | ||||
| display_domain_names = { | display_domain_names = { | ||||
| 'POINT': "Vertex", | 'POINT': "Vertex", | ||||
| 'EDGE': "Edge", | 'EDGE': "Edge", | ||||
| 'FACE': "Face", | 'FACE': "Face", | ||||
| 'CORNER': "Face Corner", | 'CORNER': "Face Corner", | ||||
| ▲ Show 20 Lines • Show All 115 Lines • Show Last 20 Lines | |||||
should be tip_ here, same rational as usual (this is not actually a label, but actual more complex/detailed info for the user).