[Bf-blender-cvs] [56d1d19c88e] master: UI: Add option to create color attribute directly from canvas selector.

Jung Jaeyun noreply at git.blender.org
Wed Apr 20 16:55:34 CEST 2022


Commit: 56d1d19c88e0fceea197c44d78f93fb26d8f9824
Author: Jung Jaeyun
Date:   Wed Apr 20 16:54:46 2022 +0200
Branches: master
https://developer.blender.org/rB56d1d19c88e0fceea197c44d78f93fb26d8f9824

UI: Add option to create color attribute directly from canvas selector.

Added + and - buttons to create and delete color attributes from canvas selector.

{T97345}

{F13006374}

Reviewed By: jbakker, Ethan1080

Maniphest Tasks: T97345

Differential Revision: https://developer.blender.org/D14672

===================================================================

M	release/scripts/startup/bl_ui/space_view3d_toolbar.py

===================================================================

diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 10dfd182836..570d7c12e30 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -526,7 +526,10 @@ class SelectPaintSlotHelper:
 
             case 'COLOR_ATTRIBUTE':
                 mesh = ob.data
-                layout.template_list(
+
+                row = layout.row()
+                col = row.column()
+                col.template_list(
                     "MESH_UL_color_attributes_selector",
                     "color_attributes",
                     mesh,
@@ -536,6 +539,10 @@ class SelectPaintSlotHelper:
                     rows=3,
                 )
 
+                col = row.column(align=True)
+                col.operator("geometry.color_attribute_add", icon='ADD', text="")
+                col.operator("geometry.color_attribute_remove", icon='REMOVE', text="")
+
         if settings.missing_uvs:
             layout.separator()
             split = layout.split()



More information about the Bf-blender-cvs mailing list