[Bf-blender-cvs] [d2b28a8bf1b] blender2.8: UI: Use icon for Material Link

Pablo Vazquez noreply at git.blender.org
Sun Jul 15 01:22:37 CEST 2018


Commit: d2b28a8bf1b4d5abd9507e02702c6dc511ccf2c6
Author: Pablo Vazquez
Date:   Sun Jul 15 01:22:24 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBd2b28a8bf1b4d5abd9507e02702c6dc511ccf2c6

UI: Use icon for Material Link

Communicates the same by giving more room to the Material datablock name

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

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

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

diff --git a/release/scripts/startup/bl_ui/properties_material.py b/release/scripts/startup/bl_ui/properties_material.py
index ed133f427f2..b601922e944 100644
--- a/release/scripts/startup/bl_ui/properties_material.py
+++ b/release/scripts/startup/bl_ui/properties_material.py
@@ -119,25 +119,23 @@ class EEVEE_MATERIAL_PT_context_material(MaterialButtonsPanel, Panel):
                 col.operator("object.material_slot_move", icon='TRIA_UP', text="").direction = 'UP'
                 col.operator("object.material_slot_move", icon='TRIA_DOWN', text="").direction = 'DOWN'
 
+        row = layout.row()
+
+        if ob:
+            row.template_ID(ob, "active_material", new="material.new")
+
+            if slot:
+                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")
 
-        split = layout.split(percentage=0.65)
-
-        if ob:
-            split.template_ID(ob, "active_material", new="material.new")
-            row = split.row()
-
-            if slot:
-                row.prop(slot, "link", text="")
-            else:
-                row.label()
         elif mat:
-            split.template_ID(space, "pin_id")
-            split.separator()
+            row.template_ID(space, "pin_id")
 
 
 def panel_node_draw(layout, ntree, output_type):



More information about the Bf-blender-cvs mailing list