Fix T54064: Can't create new Cycles materials
authorMai Lavelle <mai.lavelle@gmail.com>
Tue, 13 Feb 2018 11:57:57 +0000 (06:57 -0500)
committerMai Lavelle <mai.lavelle@gmail.com>
Tue, 13 Feb 2018 12:03:12 +0000 (07:03 -0500)
Was caused by object mode removal

intern/cycles/blender/addon/ui.py

index d5f72654c723ccbc7476a3a24f935f90c9a23534..0166b494db77ddd3ccf9cd7365491517e2e091bd 100644 (file)
@@ -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")