Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Vazquez <venomgfx@gmail.com>2018-07-15 02:22:24 +0300
committerPablo Vazquez <venomgfx@gmail.com>2018-07-15 02:22:33 +0300
commitd2b28a8bf1b4d5abd9507e02702c6dc511ccf2c6 (patch)
treef437c7df3191a62038a684ab5879a8b1c0f62ba3 /release/scripts/startup/bl_ui/properties_material.py
parentb6a97baa0efa65da678d72408cb29eebf1ee658a (diff)
UI: Use icon for Material Link
Communicates the same by giving more room to the Material datablock name
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_material.py')
-rw-r--r--release/scripts/startup/bl_ui/properties_material.py22
1 files changed, 10 insertions, 12 deletions
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):