[Bf-blender-cvs] [501a3e93ec1] master: GPencil: Display dot icon for active material in Assign menu
Antonio Vazquez
noreply at git.blender.org
Thu Oct 31 11:50:37 CET 2019
Commit: 501a3e93ec1fe785960977b2d714f68e5c0cabfe
Author: Antonio Vazquez
Date: Thu Oct 31 11:49:46 2019 +0100
Branches: master
https://developer.blender.org/rB501a3e93ec1fe785960977b2d714f68e5c0cabfe
GPencil: Display dot icon for active material in Assign menu
Now, a dot icon is displayed in front of the current object active material.
===================================================================
M release/scripts/startup/bl_ui/space_view3d.py
===================================================================
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index bbd8f2e1711..ac1243561a3 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -4505,11 +4505,13 @@ class VIEW3D_MT_assign_material(Menu):
def draw(self, context):
layout = self.layout
ob = context.active_object
+ mat_active = ob.active_material
for slot in ob.material_slots:
mat = slot.material
if mat:
- layout.operator("gpencil.stroke_change_color", text=mat.name).material = mat.name
+ layout.operator("gpencil.stroke_change_color", text=mat.name,
+ icon='LAYER_ACTIVE' if mat == mat_active else 'BLANK1').material = mat.name
class VIEW3D_MT_gpencil_copy_layer(Menu):
More information about the Bf-blender-cvs
mailing list