[Bf-blender-cvs] [5237937] master: Cycles: Fix an AttributeErro exceptionr on missing object context
Sergey Sharybin
noreply at git.blender.org
Wed Feb 10 10:37:24 CET 2016
Commit: 5237937a08b52ab44a5683b780a5456f59d28b66
Author: Sergey Sharybin
Date: Wed Feb 10 10:34:19 2016 +0100
Branches: master
https://developer.blender.org/rB5237937a08b52ab44a5683b780a5456f59d28b66
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
===================================================================
M intern/cycles/blender/addon/ui.py
===================================================================
diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py
index 755feed..9234df5 100644
--- a/intern/cycles/blender/addon/ui.py
+++ b/intern/cycles/blender/addon/ui.py
@@ -610,9 +610,9 @@ class Cycles_PT_context_material(CyclesButtonsPanel, Panel):
ob = context.object
slot = context.material_slot
space = context.space_data
- is_sortable = len(ob.material_slots) > 1
if ob:
+ is_sortable = len(ob.material_slots) > 1
rows = 1
if (is_sortable):
rows = 4
More information about the Bf-blender-cvs
mailing list