diff --git a/scripts/startup/bl_ui/space_view3d_toolbar.py b/scripts/startup/bl_ui/space_view3d_toolbar.py index 0b512f3e98b..ee7a2881899 100644 --- a/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -624,8 +624,11 @@ class VIEW3D_PT_slots_paint_canvas(SelectPaintSlotHelper, View3DPanel, Panel): if mat and mat.texture_paint_images and mat.texture_paint_slots: label = mat.texture_paint_slots[mat.paint_active_slot].name elif paint.canvas_source == 'COLOR_ATTRIBUTE': - label = (me.color_attributes.active_color.name if me.color_attributes.active_color - else iface_("Color Attribute")) + active_color = me.color_attributes.active_color + label = ( + active_color.name if active_color else + iface_("Color Attribute") + ) elif paint.canvas_image: label = paint.canvas_image.name @@ -642,7 +645,7 @@ class VIEW3D_PT_slots_color_attributes(Panel): me = context.object.data active_color = me.color_attributes.active_color self.bl_label = ( - iface_(active_color.name) if active_color else + active_color.name if active_color else iface_("Color Attributes") ) @@ -683,7 +686,7 @@ class VIEW3D_PT_slots_vertex_groups(Panel): ob = context.object groups = ob.vertex_groups self.bl_label = ( - iface_(groups.active.name) if groups and groups.active else + groups.active.name if groups and groups.active else iface_("Vertex Groups") )