[Bf-blender-cvs] [9e2ec6c86a9] blender2.8: Fix T54064: Can't create new Cycles materials

Mai Lavelle noreply at git.blender.org
Tue Feb 13 13:05:59 CET 2018


Commit: 9e2ec6c86a9ea2e387fe5e523df06c0a462819b7
Author: Mai Lavelle
Date:   Tue Feb 13 06:57:57 2018 -0500
Branches: blender2.8
https://developer.blender.org/rB9e2ec6c86a9ea2e387fe5e523df06c0a462819b7

Fix T54064: Can't create new Cycles materials

Was caused by object mode removal

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

M	intern/cycles/blender/addon/ui.py

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

diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py
index d5f72654c72..0166b494db7 100644
--- a/intern/cycles/blender/addon/ui.py
+++ b/intern/cycles/blender/addon/ui.py
@@ -753,7 +753,7 @@ class CYCLES_PT_context_material(CyclesButtonsPanel, 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'
 
-            if ob.mode == 'EDIT':
+            if context.workspace.object_mode == 'EDIT':
                 row = layout.row(align=True)
                 row.operator("object.material_slot_assign", text="Assign")
                 row.operator("object.material_slot_select", text="Select")



More information about the Bf-blender-cvs mailing list