Page MenuHome

Small bugfix for the Cycles UI script throwing an AttributeError on missing object context
ClosedPublic

Authored by Ralf Hölzemer (cheleb) on Feb 7 2016, 5:07 PM.

Details

Summary

This happens when the properties panel is pinned to the material tab.

Traceback (most recent call last):
  File "/home/ralf/Source/blender/build/bin/2.76/scripts/addons/cycles/ui.py", line 613, in draw
    is_sortable = len(ob.material_slots) > 1
AttributeError: 'NoneType' object has no attribute 'material_slots'

location: <unknown location>:-1

Fixed by moving the material_slots access after the object context check.

Steps to reproduce

  • open
  • check the console output

Diff Detail

Repository
rB Blender

Event Timeline

Ralf Hölzemer (cheleb) retitled this revision from to Small bugfix for the Cycles UI script throwing an AttributeError on missing object context.
Ralf Hölzemer (cheleb) updated this object.
Ralf Hölzemer (cheleb) set the repository for this revision to rB Blender.
This revision was automatically updated to reflect the committed changes.