diff options
author | Joerg Mueller <nexyon@gmail.com> | 2010-08-16 13:37:08 +0400 |
---|---|---|
committer | Joerg Mueller <nexyon@gmail.com> | 2010-08-16 13:37:08 +0400 |
commit | 2b7a774ab0dfd3bc66240b387a586b5122ab2661 (patch) | |
tree | 11b863eb5c0a138dbfbc8b65d42d2724ddc80946 /release/scripts/ui/properties_world.py | |
parent | 02314f11d83f4ee7e0b2d3f052d36ac492cfc910 (diff) | |
parent | a91d538f47171a40463016b91c22d39d694d923a (diff) |
svn merge -r 31314:31370 https://svn.blender.org/svnroot/bf-blender/trunk/blendersoc-2010-nexyon
Diffstat (limited to 'release/scripts/ui/properties_world.py')
-rw-r--r-- | release/scripts/ui/properties_world.py | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/release/scripts/ui/properties_world.py b/release/scripts/ui/properties_world.py index 1fa0d15a90b..bb5758ff902 100644 --- a/release/scripts/ui/properties_world.py +++ b/release/scripts/ui/properties_world.py @@ -29,8 +29,7 @@ class WorldButtonsPanel(): @classmethod def poll(cls, context): - rd = context.scene.render - return (rd.engine in cls.COMPAT_ENGINES) + return (context.world and context.scene.render.engine in cls.COMPAT_ENGINES) class WORLD_PT_context_world(WorldButtonsPanel, bpy.types.Panel): @@ -70,12 +69,6 @@ class WORLD_PT_preview(WorldButtonsPanel, bpy.types.Panel): self.layout.template_preview(context.world) - - - - - - class WORLD_PT_world(WorldButtonsPanel, bpy.types.Panel): bl_label = "World" COMPAT_ENGINES = {'BLENDER_RENDER'} @@ -141,8 +134,8 @@ class WORLD_PT_indirect_lighting(WorldButtonsPanel, bpy.types.Panel): @classmethod def poll(cls, context): - light = context.world.lighting - return light.gather_method == 'APPROXIMATE' + light = getattr(context.world, "lighting", None) + return light and light.gather_method == 'APPROXIMATE' def draw_header(self, context): light = context.world.lighting |