* Fix context.cloth, was not being set correct.
* Fix errors with context pinning, scripts should
  not assume context.object to be there.
* Always show preview even if e.g. the material is not
  set, to keep ID buttons from jumping while you're
  using them.
This commit is contained in:
2009-06-18 14:20:25 +00:00
parent 7e57823c47
commit 5ea992df98
13 changed files with 41 additions and 26 deletions

View File

@@ -14,7 +14,7 @@ class DATA_PT_camera(DataButtonsPanel):
__label__ = "Lens"
def poll(self, context):
return (context.object.type == 'CAMERA')
return (context.object and context.object.type == 'CAMERA')
def draw(self, context):
layout = self.layout
@@ -87,4 +87,4 @@ class DATA_PT_camera_display(DataButtonsPanel):
col.itemR(cam, "draw_size", text="Size")
bpy.types.register(DATA_PT_camera)
bpy.types.register(DATA_PT_camera_display)
bpy.types.register(DATA_PT_camera_display)