Cycles: Fix an AttributeErro exceptionr on missing object context
This happens when the properties panel is pinned to the material tab. Patch by Ralf Hölzemer (aka cheleb), thanks! Differential Revision: https://developer.blender.org/D1776
This commit is contained in:
parent
2cbf32e0fb
commit
5237937a08
@ -610,9 +610,9 @@ class Cycles_PT_context_material(CyclesButtonsPanel, Panel):
|
|||||||
ob = context.object
|
ob = context.object
|
||||||
slot = context.material_slot
|
slot = context.material_slot
|
||||||
space = context.space_data
|
space = context.space_data
|
||||||
is_sortable = len(ob.material_slots) > 1
|
|
||||||
|
|
||||||
if ob:
|
if ob:
|
||||||
|
is_sortable = len(ob.material_slots) > 1
|
||||||
rows = 1
|
rows = 1
|
||||||
if (is_sortable):
|
if (is_sortable):
|
||||||
rows = 4
|
rows = 4
|
||||||
|
Loading…
Reference in New Issue
Block a user