Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-08-14 02:35:13 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-08-14 02:35:13 +0400
commitae6a63253499eb83f5e6c260e598e7f8fd0cae13 (patch)
tree6847d362b69dc98b1ae3426b4133e44f2297361e
parent5e4ab9fa318a83b41e4a42811def88c187b0c1f8 (diff)
fix for error in world buttons when the world was None
-rw-r--r--release/scripts/ui/properties_world.py13
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