*More single column stuff.
[blender.git] / release / scripts / ui / properties_material.py
index 8a9a40f2b12f090badccbef59221d49504caa92b..e0f5d94a863a3b1bfea6fb20e217420a5197c5ed 100644 (file)
@@ -106,7 +106,10 @@ class MATERIAL_PT_context_material(MaterialButtonsPanel):
                 split.template_ID(space, "pin_id")
                 split.itemS()
         else:
-            layout.template_ID(ob, "active_material", new="material.new")
+            if ob:
+                layout.template_ID(ob, "active_material", new="material.new")
+            elif mat:
+                layout.template_ID(space, "pin_id")
 
         if mat:
             if col2: