*More single column stuff.
[blender.git] / release / scripts / ui / properties_data_lamp.py
index bb1bb4ca146ba3dc4f2772a3c07be1c40f50da27..b7ddf227dae0afa81248f1a5144655cd6a2694f7 100644 (file)
@@ -60,7 +60,10 @@ class DATA_PT_context_lamp(DataButtonsPanel):
                 split.template_ID(space, "pin_id")
                 split.itemS()
         else:
                 split.template_ID(space, "pin_id")
                 split.itemS()
         else:
-            layout.template_ID(ob, "data")
+            if ob:
+                layout.template_ID(ob, "data")
+            elif lamp:
+                layout.template_ID(space, "pin_id")
 
 
 class DATA_PT_lamp(DataButtonsPanel):
 
 
 class DATA_PT_lamp(DataButtonsPanel):