[Bf-blender-cvs] [14f5c40b806] greasepencil-object: UI: Use icon for Material Link
Antonio Vazquez
noreply at git.blender.org
Sun Jul 15 11:46:22 CEST 2018
Commit: 14f5c40b806b6b706206dc621279d8962a76ba2a
Author: Antonio Vazquez
Date: Sun Jul 15 11:46:14 2018 +0200
Branches: greasepencil-object
https://developer.blender.org/rB14f5c40b806b6b706206dc621279d8962a76ba2a
UI: Use icon for Material Link
Follow the same UI design used in commitd2b28a8bf1b4d5abd9507e02702c6dc511ccf2c6
===================================================================
M release/scripts/startup/bl_ui/properties_material_gpencil.py
===================================================================
diff --git a/release/scripts/startup/bl_ui/properties_material_gpencil.py b/release/scripts/startup/bl_ui/properties_material_gpencil.py
index a8880637f3a..e8fb7fdd571 100644
--- a/release/scripts/startup/bl_ui/properties_material_gpencil.py
+++ b/release/scripts/startup/bl_ui/properties_material_gpencil.py
@@ -143,19 +143,23 @@ class MATERIAL_PT_gpencil_slots(Panel):
row.operator("gpencil.color_select", text="Select")
#row.operator("gpencil.color_deselect", text="Deselect")
- split = layout.split(percentage=0.65)
+ row = layout.row()
if ob:
- split.template_ID(ob, "active_material", new="material.new")
- row = split.row()
+ row.template_ID(ob, "active_material", new="material.new")
if slot:
- row.prop(slot, "link", text="")
- else:
- row.label()
+ icon_link = 'MESH_DATA' if slot.link == 'DATA' else 'OBJECT_DATA'
+ row.prop(slot, "link", icon=icon_link, icon_only=True)
+
+ if ob.mode == 'EDIT':
+ row = layout.row(align=True)
+ row.operator("object.material_slot_assign", text="Assign")
+ row.operator("object.material_slot_select", text="Select")
+ row.operator("object.material_slot_deselect", text="Deselect")
+
elif mat:
- split.template_ID(space, "pin_id")
- split.separator()
+ row.template_ID(space, "pin_id")
# Used as parent for "Stroke" and "Fill" panels
More information about the Bf-blender-cvs
mailing list