From 14d5a45750e0b71c2795949dfbe94dbc552435a7 Mon Sep 17 00:00:00 2001 From: Romain Toumi Date: Tue, 20 Jul 2021 17:22:59 -0400 Subject: UI: Fix Cycles Materials menu Layout Fix an incoherence between the Eevee Materials menu and the Cycles Materials menu : Eevee : {F10230448} Cycles : {F10230449} Simply Fixed by replacing the Cycles UI code by the Eevee UI code. Thanks to @Brainzman for helping me create this diff and translate Reviewed By: Blendify Differential Revision: https://developer.blender.org/D11979 --- intern/cycles/blender/addon/ui.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'intern') diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py index 30892cdbbc0..058528aeff5 100644 --- a/intern/cycles/blender/addon/ui.py +++ b/intern/cycles/blender/addon/ui.py @@ -1136,7 +1136,7 @@ class CYCLES_PT_context_material(CyclesButtonsPanel, Panel): col = row.column(align=True) col.operator("object.material_slot_add", icon='ADD', text="") col.operator("object.material_slot_remove", icon='REMOVE', text="") - + col.separator() col.menu("MATERIAL_MT_context_menu", icon='DOWNARROW_HLT', text="") if is_sortable: @@ -1151,16 +1151,15 @@ class CYCLES_PT_context_material(CyclesButtonsPanel, Panel): row.operator("object.material_slot_select", text="Select") row.operator("object.material_slot_deselect", text="Deselect") - split = layout.split(factor=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", text="", icon=icon_link, icon_only=True) + elif mat: split.template_ID(space, "pin_id") split.separator() -- cgit v1.2.3