[Bf-blender-cvs] [14d5a45750e] master: UI: Fix Cycles Materials menu Layout
Romain Toumi
noreply at git.blender.org
Tue Jul 20 23:23:38 CEST 2021
Commit: 14d5a45750e0b71c2795949dfbe94dbc552435a7
Author: Romain Toumi
Date: Tue Jul 20 17:22:59 2021 -0400
Branches: master
https://developer.blender.org/rB14d5a45750e0b71c2795949dfbe94dbc552435a7
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
===================================================================
M intern/cycles/blender/addon/ui.py
===================================================================
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()
More information about the Bf-blender-cvs
mailing list